Skip to main content

Environment per Webapplication deployment

10 replies [Last post]
everflux
Offline
Joined: 2007-05-21

Hi,
I would like to switch from tomcat to glassfish, mainly using it as a servlet container. I read here
http://forums.java.net/jive/thread.jspa?messageID=206772&#206772
that there is ongoing work to support deployment specific configuration of web applications (without repackageing them).
But as I read here:
http://forums.java.net/jive/thread.jspa?messageID=85039&tstart=0
http://forums.java.net/jive/thread.jspa?threadID=19592
http://forum.java.sun.com/thread.jspa?threadID=5020966
there is still missing support for setting configuration parameters for each deployment. (Seriously, repackaging is not a real option)

Did I miss the place where I can configure the JNDI context for each deployment without hassling around with config files in the war?

Or am I completely misguided and this is not the way to go for configuring bootstrap values for web applications? (In fact it's part of the tomcat tutorial http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Environment%... )

Any feedback or ideas are very appreciated!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
everflux
Offline
Joined: 2007-05-21

I would love to see a way to configure it without the need to use an editor and especially without the need to repackage the war file of the application.
Like the database ressources it would be great to be able to assign environment properties to web applications or context paths.

drdeniro
Offline
Joined: 2008-08-21

23132

Message was edited by: drdeniro

Amy Roh

Hi everflux,

I've just blogged [1] about context.xml support in GlassFish.

[1]http://weblogs.java.net/blog/amyroh/archive/2007/05/context_webapp_1.html

Hope this helps,
Amy

glassfish@javadesktop.org wrote:
> Hi,
> I would like to switch from tomcat to glassfish, mainly using it as a servlet container. I read here
> http://forums.java.net/jive/thread.jspa?messageID=206772&#206772
> that there is ongoing work to support deployment specific configuration of web applications (without repackageing them).
> But as I read here:
> http://forums.java.net/jive/thread.jspa?messageID=85039&tstart=0
> http://forums.java.net/jive/thread.jspa?threadID=19592
> http://forum.java.sun.com/thread.jspa?threadID=5020966
> there is still missing support for setting configuration parameters for each deployment. (Seriously, repackaging is not a real option)
>
> Did I miss the place where I can configure the JNDI context for each deployment without hassling around with config files in the war?
>
> Or am I completely misguided and this is not the way to go for configuring bootstrap values for web applications? (In fact it's part of the tomcat tutorial http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Environment%... )
>
> Any feedback or ideas are very appreciated!
> [Message sent by forum member 'everflux' (everflux)]
>
> http://forums.java.net/jive/thread.jspa?messageID=218092
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

everflux
Offline
Joined: 2007-05-21

Hi Amy,
nice to see that there is progress in this issue.
The vhost solution is a mangeable workaround, in my point of view it would still be great to have the possibility to configure the context for each web application without the hassle of repackageing it or having to configure a vhost.
As I stated earlier the lack of this is a big point which avoids a greater adoption of glassfish as a replacement for tomcat. (And I really like glassfish a lot more, even if a comparison is quite unfair since tomcat is only a servlet container and glassfish offers much more.)
I would be really happy if this could get addressed in a smart way.

amyroh
Offline
Joined: 2004-05-06

> Hi Amy,
> nice to see that there is progress in this issue.
> The vhost solution is a mangeable workaround, in my

The blog also mentions webapp specific configuration using meta-inf/context.xml.

> point of view it would still be great to have the
> possibility to configure the context for each web
> application without the hassle of repackageing it or
> having to configure a vhost.
> As I stated earlier the lack of this is a big point
> which avoids a greater adoption of glassfish as a
> replacement for tomcat. (And I really like glassfish
> a lot more, even if a comparison is quite unfair
> since tomcat is only a servlet container and
> glassfish offers much more.)
> I would be really happy if this could get addressed
> in a smart way.

Which way are you thinking of other than using context.xml?

Thanks,
Amy

srt
Offline
Joined: 2005-05-01

> The blog also mentions webapp specific configuration
> using meta-inf/context.xml.

doesn't that require repacking the war?

Jan Luehe

glassfish@javadesktop.org wrote On 05/21/07 04:23,:

>Hi,
>I would like to switch from tomcat to glassfish, mainly using it as a servlet container. I read here
>http://forums.java.net/jive/thread.jspa?messageID=206772𲞴
>that there is ongoing work to support deployment specific configuration of web applications (without repackageing them).
>But as I read here:
>http://forums.java.net/jive/thread.jspa?messageID=85039&tstart=0
>http://forums.java.net/jive/thread.jspa?threadID=19592
>http://forum.java.sun.com/thread.jspa?threadID=5020966
>there is still missing support for setting configuration parameters for each deployment. (Seriously, repackaging is not a real option)
>
>Did I miss the place where I can configure the JNDI context for each deployment without hassling around with config files in the war?
>
>Or am I completely misguided and this is not the way to go for configuring bootstrap values for web applications? (In fact it's part of the tomcat tutorial http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Environment%... )
>
>Any feedback or ideas are very appreciated!
>
>

See

https://glassfish.dev.java.net/issues/show_bug.cgi?id=2439
("Add support for context.xml")

Let us know if this addresses your requirements.

Thanks,

Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

amyroh
Offline
Joined: 2004-05-06

Hi everflux,

I've just blogged [1] about context.xml support in GlassFish.

[1]http://weblogs.java.net/blog/amyroh/archive/2007/05/context_webapp_1.html

Hope this helps,
Amy

> Hi,
> I would like to switch from tomcat to glassfish,
> mainly using it as a servlet container. I read here
> http://forums.java.net/jive/thread.jspa?messageID=2067
> 72𲞴
> that there is ongoing work to support deployment
> specific configuration of web applications (without
> repackageing them).
> But as I read here:
> http://forums.java.net/jive/thread.jspa?messageID=8503
> 9&tstart=0
> http://forums.java.net/jive/thread.jspa?threadID=19592
>
> http://forum.java.sun.com/thread.jspa?threadID=5020966
>
> there is still missing support for setting
> configuration parameters for each deployment.
> (Seriously, repackaging is not a real option)
>
> Did I miss the place where I can configure the JNDI
> context for each deployment without hassling around
> with config files in the war?
>
> Or am I completely misguided and this is not the way
> to go for configuring bootstrap values for web
> applications? (In fact it's part of the tomcat
> tutorial
> http://tomcat.apache.org/tomcat-5.5-doc/config/context
> .html#Environment%20Entries )
>
> Any feedback or ideas are very appreciated!

vbkraemer
Offline
Joined: 2003-09-03

Would using a deploymentplan help?

See https://glassfish.dev.java.net/javaee5/docs/ADG/beact.html

I admit that this is not as good a solution as the one that you are looking for, but it is one thing that it in the product, now.

I will file an enhancement request for this.

vbk

vbkraemer
Offline
Joined: 2003-09-03