[jboss-user] [EJB 3.0] - Re: Self-destroying a stateful session bean

2007-03-04 Thread jlessner
I'm not sure if this is generally true. If an SFSB's remove-method is called, the instance is destroyed but the transaction which the remove-method runs in, is *not* rolled back. So in general there is a way. "[EMAIL PROTECTED]" wrote : No, as the transaction is tied to the SFSB instance. Any w

[jboss-user] [EJB 3.0] - Self-destroying a stateful session bean

2007-03-03 Thread jlessner
Does anybody know if there is a way how a stateful session bean can destroy itself without rolling back the current transaction? The only idea I had was to call the bean's own remove-method - of course not directly but through the proxy by SessionContext.getEJBObject(). Unfortunately this caused

[jboss-user] [EJB 3.0] - Re: Computed Columns in Entities

2007-03-01 Thread jlessner
The only portable way I know is by queries which return both, the actual entity and the computed value as two different result elements, e.g. EntityManager em; Query q = em.createQuery("SELECT o, COUNT(o.positions) FROM OrderEntity o ..."); List results = q.getResultList(); for (Object[] resul

[jboss-user] [EJB 3.0] - Re: LEFT JOIN Help!

2007-02-28 Thread jlessner
>From what I've understood this is *not* possible with JPA-QL because all outer >joins are a special form of relationship joins and therefore require a >relationship to refer to. So you only have a chance using SQL in your case. In >some special cases you can use sub-selects as a work-around.

[jboss-user] [EJB 3.0] - Re: Can't get session timeouts and appropriate @PreDestroy t

2007-02-26 Thread jlessner
Yes, I know the weekness of the specification in this point very well. But I'm not talking about *passivated* SFSBs but *active* ones. Does JBoss have something in store for these? "wolfc" wrote : Destruction of a (passivated) SFSB on timeout is not implemented. | | http://www.jboss.com/ind

[jboss-user] [EJB 3.0] - Things that don't help it

2007-02-24 Thread jlessner
Ok, sorry. I just discovered from older messages in this forum that standardjboss.xml and jboss.xml are ignored for EJB 3. I also found advices to manipulate ejb3-interceptors-aop.xml or use the @CacheConfig annotation for my EJB. But all I could achieve with that was a passivation not a destruc

[jboss-user] [EJB 3.0] - Can't get session timeouts and appropriate @PreDestroy to wo

2007-02-23 Thread jlessner
Hello everybody I'm trying to deploy a Stateful SessionBean with a timeout period of only a few seconds and an appropriate invocation of a PreDestroy method when the bean is discarded. I understood from various documents that I should either change the and attributes in standardjboss.xml of my