I am running glassfish v2.1.1 on linux. I have some datasources set up to connect to mysql and other databases. There are times where I would like to run glassfish without connecting to these databases, as some of them are only available to me at work. If I try to do so, glassfish will hang and will never start up at all. Is there a good way to get glassfish to give up connecting to the datasources and continue loading anyway? BTW, when glassfish hangs this way, I have created further problems by trying to start it again when the last start was unsuccessful.
migrated from stackoverflow.com Jun 29 '11 at 19:20
This question came from our site for professional and enthusiast programmers.
There are a couple of ways I can think of to do this. One is to switch to cluster profile (assuming you're on the developer profile), then create a standalone instance that does not have the datasources associated with it. Datasources have a Target tab in the admin page and you can pick which server instances each datasource is associated with. You'll need to run
I haven't done it, but another way is to create a second domain configured the way you need. It would also use different ports. Something like this: http://lysra.blogspot.com/2008/09/initialize-second-domain-in-glassfish.html