[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Application Scoped datasources

henk53 do-not-reply at jboss.com
Fri Aug 14 20:44:26 EDT 2009

"matanderson" wrote : I am looking for a way to setup application scoped datasources within JBoss (4.2.3 or 5).[...] Is this possible on JBoss?

I think so, put your database-ds.xml in your ear at the top level, and define a reference to it in yourear/META-INF/jboss-app.xml:

  | <jboss-app>
  | 	<module>
  | 		<service>database-ds.xml</service>
  | 	</module>
  | </jboss-app>

At least now its defined by your individual app. Jboss AS offers a mechanism to prevent classes being visible to other applications. This is called scoped class loading and works by defining a class loader repository. Maybe a similar mechanism (or perhaps even that exact mechanism) could be used to prevent the datasource from being visible to other apps.

I'm not the greatest Jboss expert, but maybe this give you some pointers and hopefully a real expert will give some better advice.

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

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

More information about the jboss-user mailing list