quality@glassfish.java.net

Re: ejb-jar shared by different applications (the feature request)

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Thu, 25 Feb 2010 10:03:03 +0100

Yes, that's it.. please contribute there with the feature request....

the most basic solution is to expose the EJB with @Remote interface..
than Glassfish is able to find the EJB inside the EAR.. but I believe
it can be better,..........



On Thu, Feb 25, 2010 at 10:01 AM, Richard Kolb <rjdkolb_at_gmail.com> wrote:
>
> Ok, I think I understand.
>
> Are you using a 'EJB client' to access the EJB ?
>
> So when you compile your EJB you should get two JARs, one to deploy and
> another to use in the WEB app as a dependency
>
> I can help you with a sample.
>
>
>
>
> 2010/2/25 Felipe Gaścho <fgaucho_at_gmail.com>
>>
>> my original problem: I have an EAR with an ejb-jar inside.. then I
>> created another appllication (WAR) and I tried to access the ejb-jar
>> from that.. it is impossible today..
>>
>> so, I need to re-pack the ejb-jar in the war, or find another
>> solution........
>>
>> 2010/2/25 Felipe Gaścho <fgaucho_at_gmail.com>:
>> > * with security, I mean.....
>> >
>> > 2010/2/25 Felipe Gaścho <fgaucho_at_gmail.com>:
>> >> I have an ejb-jar that should be shared by different applications...
>> >>
>> >> how you do that ?
>> >>
>> >> On Thu, Feb 25, 2010 at 9:55 AM, Richard Kolb <rjdkolb_at_gmail.com>
>> >> wrote:
>> >>> Hi Felipe
>> >>>
>> >>> 2010/2/25 Felipe Gaścho <fgaucho_at_gmail.com>
>> >>>>
>> >>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11611
>> >>>>
>> >>>> Please read, review, contribute and vote in this issue :)
>> >>>
>> >>> Sorry , I am confused. Just bear with me please.
>> >>>
>> >>>
>> >>> You have a EJB with JPA classes. e.g. Customer, Invoice
>> >>>
>> >>> The you have a WAR 1 that uses the EJB and depends on the JPA classes
>> >>> e.g.
>> >>> Customer, Invoice
>> >>> and Then another WAR 2 (possibly the same WAR) that uses the same EJB
>> >>> e.g.
>> >>> Customer, Invoice
>> >>>
>> >>> Then WAR 1 adds a customer, WAR 2 should have a new customer.
>> >>>
>> >>> What exactly is the problem ?
>> >>>
>> >>>
>> >>> regards
>> >>> Richard.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> ------------------------------------------
>> >>   Felipe Gaścho
>> >>   10+ Java Programmer
>> >>   CEJUG Senior Advisor
>> >>
>> >
>> >
>> >
>> > --
>> > ------------------------------------------
>> >   Felipe Gaścho
>> >   10+ Java Programmer
>> >   CEJUG Senior Advisor
>> >
>>
>>
>>
>> --
>> ------------------------------------------
>>   Felipe Gaścho
>>   10+ Java Programmer
>>   CEJUG Senior Advisor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>>
>
>



-- 
------------------------------------------
   Felipe Gaścho
   10+ Java Programmer
   CEJUG Senior Advisor