[jboss-user] [Clustering/JBoss] - Singleton persistence archive, datasource?

huberth do-not-reply at jboss.com
Fri Nov 10 09:43:35 EST 2006


This may seem a bit odd, but I'm trying to keep my persistence archive and datasource definition in the hasingleton directory so that they only get deployed on the master.  I've successfully placed all services that use an entity manager there as well, so no services should require these things on anything but the master.

The reason I'd like to do this is that the database (TimesTen in-memory db) can only be used on the master given our db replication configuration (TimesTen's active/standby pair) and, for the sake of managing the replication, I need to guarantee that there are no connections to the standby db.

Simply placing my persistence jar file and my app-ds.xml into the deploy-hasingleton directory yields a 'NameNotFoundException: app-ds not bound' while trying to deploy the persistence unit.  The incomplete deployment listing at the end of startup indicates that the persistence unit failed to deploy due to a dependency on the corresponding datasource's ManagedConnectionFactory.

I suspect bad timing, as the line following the exception suggests that the datasource is bound immediately afterward (admittedly, I may be jumping to conclusions on this).  I attempted to add a jboss.depends property to my persistence.xml (naming the offending service), but that didn't seem to change anything.  I've also tried moving just the app-ds.xml file back to the 'deploy' directory to no avail.

This all works if all of these files are in the deploy directory with, of course, the exception that I have the undesirable db connections on the non-master node.

Is there some way to accomplish this?  Or is this whole idea doomed to fail for this or other reasons?  Are there other ways of forcing all db connections off of the non-master?

Any help would be greatly appreciated.

Hubert

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

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



More information about the jboss-user mailing list