users@glassfish.java.net

Re: name, mappedName, unitName... getting confused

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Wed, 15 Nov 2006 18:55:33 +0100

On Wed, Nov 15, 2006 at 06:36:24PM +0100, Antonio Goncalves wrote:
> I was asking about the attributes "name" and "mappedName" of the bean and
> "name" and "unitName" of the persistence context.

Ahum, sorry. Bit too eager to answer I guess.

The name attribute of Stateless and Stateful indicate the class. And mappedName
indicate the name under which the bean should be mapped, e.g.

@Stateless(name="MyBean", mappedName="java:comp/env/ejb/MyBean")

In other words, you set them. he same holds for PersistenceContext.


HTH, Wouter

-- 
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"