Hi!

Manie Coetzee wrote:
> Do you by any change have a piece of example code where
> a simple bean is deployed with client code, which is then
> referenced in a war files manifest file.
> 
> I have been trying to do just that for three days
> but nothing seems to work.  JBoss tells me that it added
> the client class files to the common class path but I just
> can't access them in a servlet.  Currently I'm just adding
> the client code to my war class package, which is bad, bad,
> very bad.

Well, as I outlined before, I have a little different way of doing
things. Here's what I do:
I have EJB's in a JAR.
I have JavaBeans in a WAR (in /WEB-INF/classes) along with JSP's.
I have EJB interfaces in client JAR.
All three are in an EAR file, which gets deployed.

ALong with this I have a Model-2 pull HMVC framework
(sourceforge.net/projects/webwork) that instantiate and execute the
JavaBeans. The JavaBeans access the EJB's, and this works well since
they are loaded by a classloader that has access to the client jar. Then
I use JSP's with a taglib (included in above mentioned WebWork) to
extract the results and present them as HTML. No Java code whatsoever in
the JSP's.

So, with this the setup is very clean, and it just works.

BTW, I have another application (the WebWork examples) that are deployed
only as a WAR file, and that works too.

> Another thing:
> You say that your JSP's is reloaded each time you make
> a change?  I gather you you also use Tomcat as the servlet
> engine.  

Yes.

> Can you describe for me what happens when a war file
> is put in the deploy directory and what JBoss actualy do.

The autodeployer finds it, sends it to the J2EE deployer, which deploys
it. Browser refesh, and there you go. Standard JBoss install, using the
EmbeddedTomcat service.

> I can be mistaken, but I think that JBoss or Tomcat keeps
> a cached compiled version of the JSP file, and does not
> update it when the JSP page changes.

Well.. "works for me"... not sure what's going wrong for you.

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to