This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
even though JBoss print in its output the line:
18:37:56,560 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=bilby' to JNDI name 'java:bilby'
and I also can see this datasource defined in the JMX web-console (Started with state=3)
Why can't I get the datasource that I defined? perhaps there is a security issue that doesn't allow application recieve java resource automatically and I still need to cofigure something else to allow it?
Is you application a stand-alone app or is it an app deployed to JBoss AS?
If deployed to JBoss AS, the name "java"bilby" should return the data source. There is nothing else that you need to do; in fact, once the name appears in JNDI ther is no way to restrict any app from accessing it. I assume that no messages appear in the log ate the time of the lookup.
I discovered the source to my problem:
I am running my application on JBoss server 4.2.3.GA and use JBoss cache 3.1 as part of the application deployment.
It seems that the jar to support JBoss cahce that are part of my WEB-INF/lib are in conflict with the jar of JBoss AS
I looked at this article that discusses JBoss class-loading and my question is:
Is it possible to isolate only selected packages from my application so that the will load utility classes first from server/default/lib while the rest of the classes from my application will use same utility classes but look for them first from the application's archive?
So I could use different version of the same utility classes in the same application?