users@glassfish.java.net

RE: Glassfish - Reload WebModule using JMX

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sun, 10 May 2009 10:13:36 -0400

did you see this caveat from jean francois?

"Since the JMX call skip the entire GlassFish deployment code, annotation will not works."
--re-display contents of jxmDeploy.sh (for clarity)
--easily reconfiged for bat/cmd files

#!/bin/sh


AS_HOST=localhost

AS_ADMINUSER=some_admin

AS_ADMINPASSWORD=super_duper

AS_ADMINPORT=4848


$JAVA_HOME/bin/java -classpath
./target/classes:$S1AS_HOME/lib/appserv-deployment-client.jar:$S1AS_HOME/lib/jmxremote_optional.jar:.
org.glassfish.deployment.util.JMXReload $1 $AS_HOST $2 $AS_ADMINUSER
$AS_ADMINPASSWORD $AS_ADMINPORT
--then deploy by restarting your webapp
% asadmin deploydir myApp

% cd myApp //do some change and recompile

% jmxDeploy --restart myApp

Bon Chance!
Martin Gainty
Etats Unis
GMT+5
______________________________________________
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sun, 10 May 2009 05:33:51 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Glassfish - Reload WebModule using JMX
>
> Hey,
> I've found this article:
> http://weblogs.java.net/blog/jfarcand/archive/2006/01/fast_web_applic_1.html#post
> where the author describes how to reload (not stop/start but reload()) a WebModule.
> I'd love to use this feature (or stop/start, doesn't matter actually) on my WebModule in my EAR, but somehow it doesn't work.
> The web module is a spring app, and it reloads fine (invoking the reload() method causes Spring to reload according to my logfiles), but looks like the classes are not reloaded (I've tried to change some simple things in a controller).
> Any ideas why? AFAIK gf (2.1) is using a ClassLoader per web module so..
>
> Touching a .reload file in the root of the exploded EAR reloads the whole app, but I'd prefer to avoid this. (a .reload file in the webmodule_war subdirectory doesn't do anything, unfortunately). Any ideas?
> [Message sent by forum member 'korneljan' (korneljan)]
>
> http://forums.java.net/jive/thread.jspa?messageID=345697
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009