[jboss-user] [Beginner's Corner] - JBoss 5.1.0AS and Datasource Initialization/Service Lifecycle Ordering
Mark Indictor
do-not-reply at jboss.com
Tue Aug 10 12:24:54 EDT 2010
Mark Indictor [http://community.jboss.org/people/fiddleman] created the discussion
"JBoss 5.1.0AS and Datasource Initialization/Service Lifecycle Ordering"
To view the discussion, visit: http://community.jboss.org/message/556689#556689
--------------------------------------------------------------
Hi. I'm attempting to convert a web application that has a large number of services that has been running in http://www.coderanch.com/forums/f-63/JBoss JBoss 4.3.2 without incident for several years to JBoss 5.1.0. It is proving to be more difficult than expected.
The problem that is currently blocking me is the fact that this application dynamically registers datasources based upon a "bootstrap" datasource defined in a -ds.xml file and the database names contained therein. This dynamic registration/initialization takes place in the 'CREATE' lifecycle phase. Unfortunately, at this point, the datasource defined in the -ds.xml file has not yet been registered. It would seem that the ordering of standard JBoss datasource registration with respect to the 'CREATE' lifecycle phase is different in 5.1.0 than 4.2.3.
An interesting extra piece of information is that if I start JBoss without my .WAR and .SAR files in place, the server starts up fine (and registers the default datasources). If I then hot-deploy the application, since the datasources are already defined, the order dependency becomes moot. I cannot practically deploy in this way on a production server, however, so I do need to find a solution to this problem.
Does anyone out there know if there a way to control this ordering through dependencies or some other means, or is there some fundamental rule that I was breaking in JBoss 4.2.3 that is more strictly enforced in 5.1.0. Any assistance would be greatly appreciated.
Thanks.
-mark
http://www.coderanch.com/templates/default/images/spacer.gif http://www.coderanch.com/templates/default/images/spacer.gif
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556689#556689]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100810/46ea3d10/attachment.html
More information about the jboss-user
mailing list