Reputation: 1766
I want to use Spring framework to create application that uses Oracle 11g to store data. Can you tell me how to configure the Spring framework to use the connection pooling with JBoss 7 and Oracle 11g.
Is it possible to put this code onto OSGI bundle?
Upvotes: 0
Views: 768
Reputation: 12548
You have to configure your datascource in JBoss first. After configuring your datasource it should hava a JNDI name like "jdbc/yourDataSource".
You can now reference this datasource from your spring context.
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/yourDataSource"/>
Have a look at the documentation
If you use relative JNDI names then you have to put additional settings into the web.xml
. For global nameing set resource-ref="false"
. For Spring it should not matter what database you use as its managed by the application server.
I cannot tell you if you can use it in a OSGI bundle.
Upvotes: 3