users@glassfish.java.net

Re: Newbie: Should I run Glassfish when Tomcat is enough?

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Jan 2009 05:18:07 PST

>
> On Jan 7, 2009, at 3:09 PM, glassfish_at_javadesktop.org
> wrote:
...
> k but that's basically deploying them, you can do that with v3 too if
> you start modifying the domain.xml which is our main server config file.

I tried that and it seems it's not enough, as if you simply add the proper block to domain.xml, the application fails when starting. If you go to the console you can see a message along the lines of "java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event118'." caused by a NullPointerException. If you go to the admin console, and deploy the expanded directory, you can then edit the domain.xml file to enable/disable them. BTW, is it a known issue that when deploying an application through the admin console, the context you provide is ignored and you end up with the name of the application as context? I had to change that each time.

> in v3, you can do java -jar glassfish/modules/glassfish.jar foo
> here foo is your exploded directory. We cannot support running
> several applications right now, you would need to deploy them. Feel
> free to file an RFE.

Editing domain.xml file should be enough for me. It's good to know there's that possibility to run just that one though, thx.

> ok so the easy answer to this problem is to deploy all your 30
> applications in disabled state and then enable the 2 or 3 you want to
> test. This can be done either by mocking with the domain.xml directly
> which I really do not recommend (but it's a free world) or through
> administrative CLI commands like asadmin deploy/enable/disable/undeploy.
> jerome

If I did not need to go to the admin console, playing with the domain.xml file would be fine with me.

My only concern would be that GF seems to be quite verbose regarding things that are started by default, but then it does not complain about being unable to deploy the application until I go explicitely to the admin console and try to check it there.

Anyway, I was finally able to startup a couple of applications with it and even though it's not as simple as what I currently use, at least I know now that I can get it to work. Setting up the HSQLDB datasource took me more than expected due to documentation issues, the first impression I got was that it was not supported and that's all hehehe, and I found out I had to change the Jython way to find the datasource, as GF does not specify the java.naming.initial property as a System property. No complains here, as I found out it is allowed to specify it thorugh other means. All the other containers I had checked used that system, so I had not thought about it until then :).

Thanks for your help,
D.
[Message sent by forum member 'greeneyed' (greeneyed)]

http://forums.java.net/jive/thread.jspa?messageID=324745