For the few Spring applications that I have put together, I did not have to make any special changes to them, simply deployed the WAR file.
If you are using a data source, you might have to add a WEB-INF/jboss-web.xml file to map the data source name.
I am guessing that you have already tried this and run into a problem. Care to share what it is?
Thank you for your info. As matter fact, I didn't have jboss-web.xml. Could you send me an example of yours?
I don't have Spring-related example, but here is one using plain servlets/JSPs. In my web.xml file I have:
<resource-ref> <res-ref-name>ds/SomeDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>
and in jboss-web.xml I have:
<jboss-web> <resource-ref> <res-ref-name>ds/SomeDS</res-ref-name> <jndi-name>java:ds/SomeDS</jndi-name> </resource-ref> </jboss-web>
and in my application I look up the datasource as:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/ds/SomeDS");
I got the following error in the jmx console when I invoke the oracle jdbc driver:
Not loaded in repository cache
here is my oracle-ds.xml file: