users@glassfish.java.net

Re: Annotation/DD questions....

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Thu, 22 Jun 2006 20:35:01 -0400

Pls see inline comments.

>
>say I have a stateless bean like
>
>@Stateless
>public class StatelessLBean implements ejb3.StatelessLLocal {
> ...
>}
>
>and a local interface like
>
>@Local
>public interface StatelessLLocal {
>...
>}
>
>if I wanted to change its name, would I put
>
><ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" ....>
> <enterprise-beans>
> <session>
> <ejb-name>MyNewStatelessL</ejb-name>
> <local>ejb3.StatelessLLocal</local>
> <ejb-class>ejb3.StatelessLBean</ejb-class>
> <session-type>Stateless</session-type>
> </session>
> ....
>
>in the deployment descriptor? Or does this just create an alias for the
>bean?
>
>
>
This declares a completely separate bean whose name is MyNewStatelessL.
So you have 2 beans that share the same bean class.

>If I had another interface
>
>@Local
>public interface LLStatelessLLocal {
>...
>}
>
>that I wanted to associate with the (original) bean, would I put
>
><ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"....>
> <enterprise-beans>
> <session>
> <ejb-name>StatelessL</ejb-name>
> <local>ejb3.LLStatelessLLocal</local>
> </session>
> ....
>
>or do I need to put in more info than that. bonus q: is the local
>interface ejb3.StatelessLLocal still "available".
>
>
>
Can't do that. These are component-defining annotations and can't be
changed/overridden/augmented by xml descriptor.

>thanks,
>vbk
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>