Re: Enterprise Archive Problem

James <[email protected]> Wed, 20 Aug 2003 11:21:01 -0700 (PDT)
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <[email protected]>
From: Florin T.PATRASCU 
>>>
try to deploy the war|ear file as a folder ;)  instead
of having  file.war archive you'll have file.war the
folder. Similar with ear. Is how we deploy
applications and the way we use it while  debugging. 
<<<
Thanks for the suggestion.  I have done development
with the app.war directory approach on JBoss.  It is
essentially the same way I did development in Tomcat. 


I am a bit unclear as to what the difference is in
dropping an app.war directory, unzipped, into the
deploy directory instead of a app.war archive.  I am
concerned about classpath/classloader issues. Whether
I use a war archive or a .war directory, don't I have
the same classloader setup?

If I use an EAR, and put my common POJOs into their
own pojo.jar, then all *-ejb.jar and *.war inside the
EAR can see the common definitions and can load them
from the same classloader.  This I understand from
what I have read in BitterEJB.  

What is the classloader situation when I have common
POJOs to be shared across the ejb and web layers, but
where I have war and ejb-jar archives deployed
separately?  If I understand correctly, then providing
each of these archives their own copy of the pojo.jar
will not work since they have different classloaders. 
Instances of these pojo classes cannot be passed
between ejb-jar and war layers. ClassCastException
etc. occurs. Am I mis-understanding something?

Do you have any problems with passing DTOs from ejb to
web layers and vice-versa?

Your suggestion however has helped me to be a little
less obstinate on using an EAR, for now.  My ejb layer
is only doing persistence for the moment and doesn't
need to know anything about the classes type.  So, I
will just use a typeless interface on my session
facade, e.g. saveMyObject(Object) instead of 
save(MyObject) This is a fallback/temporary solution
until 3.0 is ready.

Best Regards, Jim



-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104