axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: Classloaders and JPA
Date Sun, 29 Oct 2000 01:56:22 GMT
Did you take a look at JibxService Library.java and JibxServiceClient
LibraryStub.java (Service and ClientStub for JiBX respectively) from dennis
sosnoski?

Get the Library.java compiled and deployed as .aar source located at
%AXIS2_HOME%\modules\jibx\target\gen\test\src\com\sosnoski\ws\library\wsdl\L
ibrary.java

confirm by http://127.0.0.1:5555/axis2/services/library
*(change the host:port to your tomcat configuration)*

then Get LibraryStub.java client
%AXIS2_HOME%\modules\jibx\target\gen\test\src\com\sosnoski\ws\library\wsdl\L
ibraryStub.java

compiled and execute the client pointing EPR to
http://127.0.0.1:5555/axis2/services/library
change the host:port to your tomcat configuration

(I'll jump in for the hibernate configuration afterwards)

Martin-
----- Original Message -----
From: "Leif Singer" <axis@singer.sh>
To: <axis-user@ws.apache.org>
Sent: Sunday, October 28, 2007 8:23 PM
Subject: Classloaders and JPA


> Hello,
>
> I'm trying to implement a simple Axis2 service using JPA. Its only
> operation is supposed to take a model object (e.g., a "Person") as its
> sole argument and persist it.
>
> I understand that each AAR uses a seperate classloader. Also, I
> believe I've read that the libraries I use (JPA, specifically) are
> being loaded by a different classloader than my AAR.
>
> The issue I'm having is this:
> 1. My service implementation can see my model classes and the
> persistence.xml.
> 2. JPA cannot see the persistence.xml in my AAR, no matter where I
> place it.
> 3. JPA cannot see my model classes in my AAR.
>
> I solved this by putting the persistence.xml into Tomcat's axis2/WEB-
> INF/classes/META-INF directory and putting my model classes into the
> axis2/WEB-INF/classes directory, i.e., outside the AAR.
>
> The trouble I have with this is that I want to have my AAR as self-
> contained as possible. I could live with a seperate persistence.xml --
> after all, it's configuration -- but would really like to have the
> model classes packaged into the AAR and *still* have JPA see them.
>
> Without a JEE container, is there a way to achieve this? What's
> considered a good practice to solve this?
>
> I use JiBX for un-/marhalling. I use Hibernate's JPA implementation. I
> tried this running in the SimpleAxisServer and Apache Tomcat 5.0.28.
>
> Thanks in advance
>    Leif Singer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message