[jboss-user] [JCA] - Re: Discovery of JCA ConnectionFactory without resource-ref
do-not-reply at jboss.com
Tue Nov 17 04:27:14 EST 2009
"maffeis" wrote :
| Is there a way of making such a JNDI lookup possible from a Servlet, without adding a <resource-ref> declaration to the web.xml file?
Yes you should be able to get theJCA CF by simply looking at the JNDI.
Just define the -ds.xml and deploy it in the JBoss, later on in the servlet(or any web component) just make this call
| InitialContext context = new InitialContext();
| ConnectionFactory cf = (ConnectionFactory)context.lookup(JNDINAME);
The ConectionFactory/JNDINAME should be defined in the -ds.xml at <connection-definition>/ <jndi-name> tags.
Check this for more details
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266013#4266013
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266013
More information about the jboss-user