Bugs item #491039, was opened at 2001-12-09 22:31
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=491039&group_id=22866
Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Toby Hede (ubik42)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: Null Exception in abstract accessors
Initial Comment:
When using CMP2.0 defined accessors a Null Exception
is returned:
java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
javax.transaction.TransactionRolledBackException: null
Embedded Exception
null; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
null
Code sample:
public abstract class ThingBean implements
javax.ejb.EntityBean
{
. . .
public abstract String getName();
public abstract void setName(String name);
. . .
}
public interface ThingHome extends javax.ejb.EJBHome
{
public ThingRemote create(java.lang.Integer id)
throws
java.rmi.RemoteException,javax.ejb.CreateException;
public ThingRemote findByPrimaryKey
(java.lang.Integer pk)
throws
java.rmi.RemoteException,javax.ejb.FinderException;
}
Workaround:
Transaction must be expicilty set to 'Required' in the
of the ejb-jar.xml deployment
descriptor. I cannot find if this the Transation=
Required attribute is a requirement of the EJB2.0
specification...if it is arequirement of the
specification, this is not a bug, but the workaround
should perhaps be mentioned explicitly in the CMP
documentation.
--
>Comment By: Dain Sundstrom (dsundstrom)
Date: 2001-12-10 07:52
Message:
Logged In: YES
user_id=251431
Section 17.4.1 of EJB 2.0 final draft:
For entity beans that use EJB 2.0 container-managed
persistence, only the Required, RequiresNew, or Mandatory
transaction attributes should be used for the methods
defined in the bean’s component interface and all the
direct and indirect superinterfaces of the component
interface, excluding the getEJBHome, getEJBLocalHome,
getHandle, getPrimaryKey, and isIdentical methods; and for
the methods defined in the bean’s home interface and all
the direct and indirect superinterfaces of the home
interface, excluding the getEJBMetaData and getHomeHandle
methods specific to the remote home interface. Containers
may optionally support the use of the NotSupported,
Supports, and Never transaction attributes for the methods
of entity beans with container-managed persistence.
However, entity beans with container-managed persistence
that use these transaction attributes will not be portable.
In the future, transactions that only access readonly
properties will not be required to have a transaction, but
as stated above this will be a non-portable feature.
--
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=491039&group_id=22866
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development