-
1. EJB deploy in JBoss AS
wdfink Jan 10, 2011 5:06 AM (in response to alexpr)AFAIK there is no option to destroy one SessionBean.
But if you repack your app you can use the hotdeploy feature (replace the jar/war/ear in deploy directory).
Your app will be completly undeployed and the new one will start.
-
2. EJB deploy in JBoss AS
alexpr Jan 11, 2011 1:46 AM (in response to wdfink)Hi,
Thank you so much.
AFAIK Session bean (EJB) was born to make Enterprise application modular, and developing a module is independent to each other. If I want to modify a module is simple and do not disturb any other modules. I though I could off a module, modify this, reload it while the others was still running...
Could you so me the way to implement this great thing!
Thanks
-
3. EJB deploy in JBoss AS
wdfink Jan 11, 2011 9:21 AM (in response to alexpr)As far as I understand the way for you is to pack the EJB's into different JAR files.
In this case you might able to redeploy one of it.
But remember that, in case of (declared) dependencies between, JBoss will deactivate applications that depend on the current redeploy.
If you not declare the dependency within the deployment descriptor I'm not sure what happen, I suppose that the reference to the local EJB interface will become invalid and you have to implement a retry mecanism.
-
4. EJB deploy in JBoss AS
alexpr Jan 11, 2011 9:04 PM (in response to wdfink)Yes, from now, I must pack my EJBs into different JAR files, and all reference to another EJB, I used JNDI lookup instead of @EJB injection (I mean local EJB) also following a retry mechanism. I think this way leak performance of my app ( each operation with another EJB must look up in JNDI server... ) but each EJB is independent to others. Perhaps, I must decide which EJB is modular, not all EJB do .
Do you think I do it in right way?
-
5. EJB deploy in JBoss AS
wdfink Jan 12, 2011 2:14 AM (in response to alexpr)Sounds good.
For performance I would encapsulate the JNDI lookup and store the reference during @PostConstruct and handle it at runtime via method instead of direct variable access.
The method might check the reference or you re-lookup only in case of problems with the local-IF.
-
6. EJB deploy in JBoss AS
alexpr Jan 13, 2011 4:10 AM (in response to wdfink)Do every JavaEE developer design their app with that way ?
(I'm newbie )
Br,
-
7. Re: EJB deploy in JBoss AS
aaacaesar Feb 28, 2012 2:29 PM (in response to alexpr)Don't frown. I know many experienced developers with similar questions. Everyone is on the same path, just not at the same stage. Better to reach out early in the process and avoid costly mistakes. I'd be happy to connect you to another community project around JBoss Enterprise and EJB3.1 Good Luck!