i have an EJB that use a JavaBean. This JavaBean is used by a one servlet and various JSP. I don't know where must i put this JavaBean. If i put on the WEB-INF/Classes/<package name> folder the EJB can access to it.
If i put the JavaBean into the classpath in can't make hot-deploy of this JavaBean (If i make one change on the JavaBean i have to restart the Server).
so where must i put the JavaBean to share it between an Ejb and a servlets-jsps (war file)
Thank you.
My configuration is
Jboss 2.4.3
Catalina 4.0
win 2k
-
ejb and servlet use the same JavaBean (2 messages)
- Posted by: Enrique Rodriguez
- Posted on: November 19 2001 06:02 EST
Threaded Messages (2)
- ejb and servlet use the same JavaBean by Enrique Rodriguez on November 19 2001 09:54 EST
- ejb and servlet use the same JavaBean by Enrique Rodriguez on November 20 2001 08:52 EST
-
ejb and servlet use the same JavaBean[ Go to top ]
- Posted by: Enrique Rodriguez
- Posted on: November 19 2001 09:54 EST
- in response to Enrique Rodriguez
ups¡¡
maybe i don't expalint it well.
Here is a better explanation and pardo for my poor english.
I have a JavaBean and i use it in two servlet and in one EJB. I don't know where must i put this JavaBean class.
If i put in WEB-INF/classes the ejb can't access to the JavaBean but the servlet can.
If i put in the server classapth (SERVER_HOME/lib/ext, for example) servlets and EJB can access to the JavaBean but if i change the javaBean code and i recompile it, i have to restart the server. (no hot-deploy¡¡¡¡)
So what else can i do???
Is bad idea or bad design to use the same JavaBean in a servlet and in an EJB????
Thanks.
-
ejb and servlet use the same JavaBean[ Go to top ]
- Posted by: Enrique Rodriguez
- Posted on: November 20 2001 08:52 EST
- in response to Enrique Rodriguez
Maybe this post is not interesting for anybody, because is an easy or unsual but i still with it ;-)
The best thing that i suceed is to create a .jar archive with the classes that web aplication and an EJB share, and put this file into the WEB-INF/lib and in the .ear file. I also modify the EJB manifest file and add one line,
Class-path: /path_to_the_library.jar_on_the_ear/library.jar
This go fine, but i have two library.jar.
Any better way????