[jboss-user] [EJB 3.0] - No active session context

curtney do-not-reply at jboss.com
Wed Jul 4 17:34:11 EDT 2007


Greetings everyone!

I am recieving a "No active session context" when the timer I have set has timed out. 

I am running JBoss 4.2
I am using Seam 2.0 Beta (perhaps relevant).

The following is the code of interest. If I remove the function (findInvitation) that accesses the database then everything runs ok.

I  have tried various transaction attribute notation (include using no annotations), but still get the error.

Any help is greatly appreciated. Thanks.


  | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  | 	@Timeout
  | 	public void timeout (Timer timer) throws Exception {
  | 		Long invitationId = (Long)timer.getInfo();
  | //using a dao object to access database.
  | 		Invitation invitation = findInvitation (invitationId);
  | 	}
  | 



The following is the relevant debug output:

2007-07-01 22:07:13,741 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1,target=[target=jboss.j2ee:service=EJB3,ear=phoenix.ear,jar=phoenix-security.jar,name=invitationService],remaining=-3,periode=0,active]
2007-07-01 22:07:13,741 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2007-07-01 22:07:13,745 INFO  [STDOUT] Pre Checking 21 for cancellation
2007-07-01 22:07:13,747 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4847013207027712
2007-07-01 22:07:13,748 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-07-01 22:07:13,748 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2007-07-01 22:07:13,752 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-07-01 22:07:13,752 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
2007-07-01 22:07:13,752 DEBUG [org.hibernate.loader.Loader] loading entity: [com.phoenix.security.domain.registration.Invitation#21]
2007-07-01 22:07:13,753 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-07-01 22:07:13,753 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2007-07-01 22:07:13,755 DEBUG [org.hibernate.SQL] 
    select
        invitation0_.id as id0_0_,
        invitation0_.user_logon as user10_0_0_,
        invitation0_.template as template0_0_,
        invitation0_.title as title0_0_,
        invitation0_.expiration as expiration0_0_,
        invitation0_.status as status0_0_,
        invitation0_.email as email0_0_,
        invitation0_.activation_key as activation7_0_0_,
        invitation0_.created as created0_0_,
        invitation0_.last_modified as last9_0_0_ 
    from
        PHOENIX_INVITATION invitation0_ 
    where
        invitation0_.id=?
2007-07-01 22:07:13,756 INFO  [STDOUT] Hibernate: 
    select
        invitation0_.id as id0_0_,
        invitation0_.user_logon as user10_0_0_,
        invitation0_.template as template0_0_,
        invitation0_.title as title0_0_,
        invitation0_.expiration as expiration0_0_,
        invitation0_.status as status0_0_,
        invitation0_.email as email0_0_,
        invitation0_.activation_key as activation7_0_0_,
        invitation0_.created as created0_0_,
        invitation0_.last_modified as last9_0_0_ 
    from
        PHOENIX_INVITATION invitation0_ 
    where
        invitation0_.id=?
2007-07-01 22:07:13,761 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2007-07-01 22:07:13,762 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.phoenix.security.domain.registration.Invitation#21]
2007-07-01 22:07:13,777 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2007-07-01 22:07:13,777 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2007-07-01 22:07:13,778 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2007-07-01 22:07:13,778 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2007-07-01 22:07:13,778 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.phoenix.security.domain.registration.Invitation#21]
2007-07-01 22:07:13,781 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3 at 6e9e64, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader at 14f1544{ url=null ,addedOrder=0}
2007-07-01 22:07:13,801 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
2007-07-01 22:07:13,802 ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBTransactionRolledbackException: No active session context
2007-07-01 22:07:13,803 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1,target=[target=jboss.j2ee:service=EJB3,ear=phoenix.ear,jar=phoenix-security.jar,name=invitationService],remaining=-66,periode=0,in_timeout]
2007-07-01 22:07:13,803 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: expired
2007-07-01 22:07:13,803 DEBUG [org.jboss.ejb.txtimer.TimerImpl] killTimer: [id=1,target=[target=jboss.j2ee:service=EJB3,ear=phoenix.ear,jar=phoenix-security.jar,name=invitationService],remaining=-66,periode=0,expired]

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060582#4060582

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060582



More information about the jboss-user mailing list