users@glassfish.java.net

Re: Accessing an EJB in an ear from a war

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Sun, 30 Dec 2012 02:16:54 +0100

I don't know how OSGI works on Glassfish when deploying EARs, but as far as
I know, in general, each application, be it WAR or EAR has it's own root
classloader, so it is not possible to invoke session beans of one
application from within another. How should that work? Maybe some Glassfish
specific techniques applies here like one more parent classloader shared
between all applications working as a kind of bridge? I don't know.

Regards,
Witold Szczerba

On 30 December 2012 00:56, Martin Gainty <mgainty_at_hotmail.com> wrote:

> Wittold
>
> at the bank we built our ears with an OSGI build
>
> would this help the op insofar as to specifically export-packages of the
> package names of the beans the op wants to access remotely
> This would have the additional benefit of placing the export-package
> declaration in the manifest
> ?
>
> http://wso2.org/library/tutorials/develop-osgi-bundles-using-maven-bundle-plugin#Exporting%20packages
>
> http://fusesource.com/docs/esb/4.4/esb_deploy_osgi/BestPractices-BuildBundles.html#BestPractices-BuildBundles-AEPWAV
> Dzięki
>
>
> Dzieki
> Martin
>
> ______________________________________________
>
> Nie zmienia ani nie zakłóca tego przekazu
> Nie zmienia ani nie zakłóca tego przekazu
>
> ------------------------------
> Date: Sat, 29 Dec 2012 12:28:59 +0100
> Subject: Re: Accessing an EJB in an ear from a war
> From: pljosh.mail_at_gmail.com
> To: users_at_glassfish.java.net
>
>
> Yes, you have to package everything into same ear or separate remote
> interfaces and bundle them with other applications, so they can access
> remote beans. The fact that this is all single JVM does not matter.
> Regards,
> Witold Szczerba
> ---
> Sent from my mobile phone.
> On Dec 28, 2012 3:18 PM, <forums_at_java.net> wrote:
>
> Hi, thank you for the response mvatkina! So does that mean local EJB access
> is only possible within an ear? I cannot have local access in our scenario
> described above (from VirtualWeb.war to an EJB in TestEar.ear)? It's the
> same
> Glassfish instance, same JVM...
>
> --
>
> [Message sent by forum member 'chris1234']
>
> View Post: http://forums.java.net/node/**893478<http://forums.java.net/node/893478>
>
>
>