quality@glassfish.java.net

Re: different applications sharing ejb.jar

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Tue, 23 Feb 2010 13:10:04 +0200

On 23 February 2010 09:11, Felipe Gaucho <fgaucho_at_gmail.com> wrote:

> Are you deploying the same ejb-jar twice? (packed in each app?)
>

No, actually we have common code (with Hibernate in the JAR) that does user
management. This was deployed to the domains lib.

Then I have App1 that uses the common code
And App2 that uses the common code.

I am assuming you will get the same issue if you deploy the EJB twice, since
each EJB is in it's own space and shares a space.

Again , maybe this is a Hibernate issue only.


regards
Richard.




>
>
> On 23.02.2010, at 07:46, Richard Kolb <rjdkolb_at_gmail.com> wrote:
>
> Hi Judy and Felipe
>
> On 22 February 2010 22:10, Judy Tang < <Judy.J.Tang_at_sun.com>
> Judy.J.Tang_at_sun.com> wrote:
>
>> Just checked with EJB developer and got suggestion to try with putting the
>> EJB jar into GF lib dir.
>> May be you can give this a try?
>>
>
> This causes very bad things with Hibernate and GF 2.1
> It's a big class path mess. We had endless hassles because the class's were
> loaded in another space, and then Hibernate said it was already mapped... So
> it worked some of the time and not others. Just beware.
> But, maybe JPA does not suffer from the same headaches.
>
> Btw, we were using XML files with Hibernate and not Hibernate annotations.
>
> regards
> Richard
>
>
>