Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am building a web app using java EE and glassfish v3. I want to move it to production mode soon, however i have zero experience with using glassfish in production, i would appreciate if you give me some guidance about how to approach the following scenario:

say i have deployed the web app using admin console pointing to the .war file. But what if i want to update this live application, do i need to :

a) undeploy --> build new war file (with updates) --> paste the war file to the app folder -->redeploy?

b) move in only the changed files , ie : .class files , jsp, etc... without undeploying before?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Personally I use a maven plugin and a tool similar to jenkins to do my deploys to production but you can always do it by hand like this:

  1. Open the admin console (by default it's bound to port 4848)
  2. Choose "Applications" on the menu
  3. Next to the application you want to redeploy there should be a link labeled "Redeploy", click it.
  4. Choose new war (and options related to precompiling jsp's and stuff)
  5. Press OK

The new version of the application should be deployed after this process.

Hope this helps.

share|improve this answer
    
thx a lot. Two questions:1- is it more efficient to use maven or do it manually? or is it the same?. 2- I read some articles online that redeploy leaks some old sessions , is this true? –  shadesco Jun 9 '12 at 14:12
    
1) It's just as efficient. What the maven plugin does is use the command line version of what I just sent you. The advantage for us is to have a central place where the team can run build/deploy jobs for the development and production environments. –  Khai Jun 9 '12 at 23:36
    
2) I know there are some classloader leaks that lead to OOM on the PermGen memory area but I'm not sure if they're directly related to Glassfish or commonly used libraries or just circular references that keep the GC from unloading those classes. Don't know what you mean about session leaks but one of the reasons to use redeploy instead of undeploy/deploy is being able to keep the schedulers and sessions from the previous deploy untouched (if you choose to do so). –  Khai Jun 9 '12 at 23:39
    
Found these links where you can read more about classloader leaks and how to track and fix them frankkieviet.blogspot.pt/2006/10/… frankkieviet.blogspot.pt/2006/10/… –  Khai Jun 10 '12 at 0:49
    
thx a lot bro! much appreciated ! –  shadesco Jun 10 '12 at 2:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.