ejb@glassfish.java.net

Re: EJB deployment question

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Wed, 24 Mar 2010 15:23:37 -0400

On Mar 24, 2010, at 1:14 PM, bea wrote:

> Hy all,
>
> I'm having some doubts about using EJB 3.1.
>
> First, I have a @Stateless ejb which implements a @Local interface.
> I've generated a jar and deployed it to a Glassfish v3 application
> server.
>
> Second, I have a war application deployed in the same applications server.
>
> I'd like to use my ejbs from my war, as I'll have to resuse them from
> other application. Is there any way to do it? As I've seen in the EJB
> FAQ, all I have right now doesn't work.

Hi Beatriz,

The Local EJB view is intended to be used within the scope of a single application. You should
either move the EJB components within the same application as the web components or switch to
a Remote EJB interface.

With EJB 3.1, the easiest approach is to package the local EJB components
directly in the .war. You can even eliminate the Local interface and use the no-interface view, in which
case all you need is one bean class per session bean.

 --ken

>
> Any help would be appreciated.
>
> Best regards.
>
> --
> Beatriz Nombela Escobar
> beaotx_at_gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>