[jboss-user] [JBoss/Spring Integration] - help with Jboss datasource lookup using springs

kaarthiak do-not-reply at jboss.com
Fri Sep 12 21:07:08 EDT 2008


hi all
I am trying to use springs JndiObjectFactoryBean to get a datasource connection through Jboss connection pool. When ever i do so i get an error java: not bound on starting my application. When i remove the the spring initialization server starts up fine and binds my data source correctly.

Below are some of my configs
jboss-web.xml
<resource-ref>
DB Connection
<res-ref-name>devpfmdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:devpfmdb</jndi-name>
<res-auth>Container</res-auth>
</resource-ref>
web.xml
<resource-ref>
DB Connection
<res-ref-name>devpfmdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Bean config


 java:devpfmdb



I also verified that on start up i can see
[ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=devpfmdb ' to JNDI name 'java:devpfmdb'

When i dont use spring config below code line works
DataSource envCtx = (DataSource) initCtx.lookup("java:/devpfmdb");

when i try same here it not working. Any help would really be appreciated

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176288#4176288

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176288



More information about the jboss-user mailing list