openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thiago Veronezi <thi...@veronezi.org>
Subject Re: need help !!! Embended OpenEjb3.1.x
Date Mon, 28 Feb 2011 19:47:02 GMT
You have no transaction if you are calling your crud methods directly. You
should wrap this call with another EJB.
Check this article...
http://www.openscope.net/2010/01/14/bean-managed-transactions-bmt/
<http://www.openscope.net/2010/01/14/bean-managed-transactions-bmt/>and then
this one...
http://openejb.apache.org/3.0/unit-testing-transactions.html

[]s,
Thiago.


On Mon, Feb 28, 2011 at 2:31 PM, kangkang <xinhua.gu@gmail.com> wrote:

> hi,
>
> our project uses GenericDao pattern in persistence layer. A DAO is sth
> like:
>
> Stateless
> @TransactionAttribute(TransactionAttributeType.REQUIRED)
> public class UserDAOBean extends GenericDAO<User, Long> implements UserDAO
>
> CRUD functions like persistence() merge() findbyid() etc. is in  GenericDAO
> class
>
> We use Embended OpenEjb to test DAO function but get followed Exception:
>
> DEBUG - The following method doesn't have a transaction policy assigned:
> public abstract java.lang.Object
> xx.xxx.persistence.dao.GenericDAO.merge(java.lang.Object)
> DEBUG - finished invoking method merge. Return
> value:xx.xxxx.persistence.entities.User@fa0bf9b7
> DEBUG - finished invoking method call. Return value:null
> FAILED: testCreateUser
> java.lang.IllegalStateException: No tx on thread
>
> we have installed openejb-javaagent-3.1.3.jar in maven pom.
>
> need help!
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/need-help-Embended-OpenEjb3-1-x-tp3328540p3328540.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message