• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB changes need server restart?

 
Mayuri Roi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do we need to restart application server if we have to make changes in Session bean?

For some reason, every time I make a change to session or entity bean, I have to deploy entire EAR by uninstalling the current app and then install new EAR.

Otherwise the new changes are not being reflected. Is this common with Websphere app server or am I missing something?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some appl servers provide option of changing the bean class on fly others require re deployment.
 
Mayuri Roi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradip, Thanks for the info. Can you tell me which app servers allow on fly changes for EJBs? Just curios.

I'd really appreciate if any of you can tell me how it should be done in websphere 6.
 
david lightman
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after changing a SLSB, you have to run the RMIC and deployment code.. doing such will generate the stubs etc that you need, therefore yes.

one point though, you can Update the application, with the new EAR, you do not have to uninstall and reinstall..

Websphere AS 6 supposedly has dynamic class loading but, use at your own risk..
[ October 21, 2005: Message edited by: david lightman ]
 
wei shicheng
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by david lightman:
after changing a SLSB, you have to run the RMIC and deployment code.. doing such will generate the stubs etc that you need, therefore yes.

one point though, you can Update the application, with the new EAR, you do not have to uninstall and reinstall..

Websphere AS 6 supposedly has dynamic class loading but, use at your own risk..

[ October 21, 2005: Message edited by: david lightman ]


Thank you for your info,it's very useful to me couse I alse meat with that problem.
 
Scott Selikoff
author
Bartender
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd really appreciate if any of you can tell me how it should be done in websphere 6.


For WAS6 it completely depends on your server settings.

There are two you should look at. Both, I believe, can be found from double clicking on the server in RAD/WSAD, not from the admin console. One controls deployment method, whether they are run in place or exported as EAR files, the other controls hot deployment whether or not changes made from within the workspace should be immediately reloaded.

Also it depends how you're changing the EAR. Any change to EJB contracts is pretty significant due to RMIC regeneration. Other changes, for example just to a bean file itself, can load much faster. One thing you want to watch is the System.out when you make a change. It should explicitly have "Start/Stop" messags if WAS restarted the EAR.

My personal preference is to ALWAYS restart the server. I do break this rule when the changes are small enough but lets just say WAS6 can screw up at hot deployment. Actually let me go back a step and say WAS6 can screw up just about anywhere, good luck to you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!