[JBoss Seam] - @Destroy not called on logout
by pdpantages
Seam 1.2.1GA,
Hello forum, I have noticed that debug statements I put in my components @Destroy method are not usually called when the user logs out. These are usually SFSB, Conversational objects, scope SESSION and CONVERSATION.
When the user logs out I call
Seam.invalidateSession(), and
identity.logout
If I destroy a conversation with the workspaces "destroy" button, I see my messages printed, but the behaviour is different if you logout.
It make no difference if I use the logger or System.out.println to emit the messages.
Is this the expected behaviour? The manual just says the method is called when the context is ended and does not distinguish between logout and other cases. I am trying to find a memory leak and wondered if this indicated any sort of problem.
I turned up Seam debug & traced a component I have called "dashboard". The first traces are due to a logout, the second from ending the conversation with the destroy button. The INFO log only appears in the latter.
| destroying: dashboardList
| destroying: dashboard
| Processing event:org.jboss.seam.preDestroy.dashboard
| intercepted: dashboard.destroy
| intercepted: dashboard.destroy
| Processing event:org.jboss.seam.preSetVariable.dashboard
| Processing event:org.jboss.seam.postSetVariable.dashboard
| intercepted: dashboard.PRE_DESTORY
| Processing event:org.jboss.seam.preRemoveVariable.dashboard
| Processing event:org.jboss.seam.postRemoveVariable.dashboard
| Stateful component was removed: dashboard
|
| destroying: dashboardList
| destroying: dashboard
| Processing event:org.jboss.seam.preDestroy.dashboard
| intercepted: dashboard.destroy
| intercepted: dashboard.destroy
| Processing event:org.jboss.seam.preSetVariable.dashboard
| Processing event:org.jboss.seam.postSetVariable.dashboard
| injecting dependencies of: dashboard
| 2007-12-08 21:19:44,390 INFO [http-0.0.0.0-8080-2] centina.sa.client.network.DashboardBean
| Client: [dashboard] (23) Destroy
| outjecting dependencies of: dashboard
| Processing event:org.jboss.seam.preSetVariable.dashboardList
| Processing event:org.jboss.seam.postSetVariable.dashboardList
| disinjecting dependencies of: dashboard
| intercepted: dashboard.PRE_DESTORY
| Processing event:org.jboss.seam.preRemoveVariable.dashboard
| Processing event:org.jboss.seam.postRemoveVariable.dashboard
| Stateful component was removed: dashboard
|
Thank you kindly for any info....
PdP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111421#4111421
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111421
18 years, 4 months
[JBoss Seam] - Tomcat, Seam 2.0.0.GA with no embedded?
by andrew.rw.robinson
I am trying to upgrade my application from Seam 1.2.1 to 2.0.0. It seems like the embedded support is much worse now though. This is what I had in a maven built war (subset of what I am using):
MyFaces 1.1.5
Facelets 1.1.14
Seam 1.2.1
Trinidad 1.0.5-SNAPSHOT
Drools (for security with seam)
EJB 3 using the embedded libs that came with Seam 1.2.1
Deployed on:
tomcat 6.0.13
java version "1.6.0_03"
I was using POJOs for my "action" beans (didn't want to have to bother with session bean interfaces) and EJB3/EntityManager for my entities.
Everything was working. When I switched to Seam 2 it now seems to have drastically different requirements. I was okay with using the JSF 1.2 RI, trinidad 1.2.5-SNAPSHOT, but I have some real issues with the embedded container. Before I just put the container in my WAR. beta2 now wants me to downgrade from JDK 1.6 to 1.5 and have to change my tomcat libraries.
I am really opposed to having to make any changes at all to the tomcat instance (including properties, configuration and libraries). I will not be hosting this app, and will not be running jboss, so I really need it to work using a virgin tomcat under JDK 1.6. Since 1.2.1 was working this way I was extremely disappointed to see this regression.
Is there a way to do this (embedded in the WAR and not in the tomcat lib directories)?
If not, are there any examples of using Seam w/ EJB3 under J2SE w/ no embedded?
If I go without the embedded, what seam functionality would I lose (I'd like to have seam page flows, drools security)?
Thanks,
Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111419#4111419
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111419
18 years, 4 months
[JBoss jBPM] - Persitence problem
by rodosa
Hi!!
I've configured jBPM to work wih MySQL. Now, I have a problem. When I want save the instance of a process it's thrown a exception that indicates that a table doesn't exist. But ... it isn't true! The table exist!! I think that maybe the hibernate.cfg file is wrong and I have to change something in it.
Do anyone know the solution at this problem?
Thanks
| 00:07:35,265 [main] WARN JDBCExceptionReporter : SQL Error: -22, SQLState: S0002
| 00:07:35,265 [main] ERROR JDBCExceptionReporter : Table not found in statement [insert into JBPM_TOKEN (ID_, VERSION_, NAME_, START_, END_, NODEENTER_, NEXTLOGINDEX_, ISABLETOREACTIVATEPARENT_, ISTERMINATIONIMPLICIT_, ISSUSPENDED_, LOCK_, NODE_, PROCESSINSTANCE_, PARENT_, SUBPROCESSINSTANCE_) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
| 00:07:35,265 [main] DEBUG JbpmContext : closing jbpmContext org.jbpm.JbpmContext@fbb7cb
| 00:07:35,265 [main] DEBUG Services : closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@db38a4
| 00:07:35,265 [main] DEBUG DbPersistenceService : committing hibernate transaction org.hibernate.transaction.JDBCTransaction@1b83048
| 00:07:35,281 [main] WARN JDBCExceptionReporter : SQL Error: -22, SQLState: S0002
| 00:07:35,281 [main] ERROR JDBCExceptionReporter : Table not found in statement [insert into JBPM_MODULEINSTANCE (ID_, VERSION_, PROCESSINSTANCE_, CLASS_) values (null, ?, ?, 'C')]
| 00:07:35,281 [main] ERROR DbPersistenceService : hibernate commit failed
| org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.context.exe.ContextInstance]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:40)
| at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
| at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
| at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
| at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
| at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
| at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
| at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
| at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
| at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)
| at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
| at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at com.Ejemplo1.Test2.testEjemplo1Process(Test2.java:50)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.sql.SQLException: Table not found in statement [insert into JBPM_MODULEINSTANCE (ID_, VERSION_, PROCESSINSTANCE_, CLASS_) values (null, ?, ?, 'C')]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
| at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
| at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:30)
| ... 52 more
| 00:07:35,281 [main] DEBUG DbPersistenceService : rolling back hibernate transaction
| 00:07:35,281 [main] DEBUG DbPersistenceService : closing hibernate session
| 00:07:35,281 [main] ERROR Services : problem closing service 'persistence'
| org.jbpm.persistence.JbpmPersistenceException: hibernate commit failed
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:219)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at com.Ejemplo1.Test2.testEjemplo1Process(Test2.java:50)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.context.exe.ContextInstance]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:40)
| at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
| at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
| at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
| at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
| at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
| at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
| at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
| at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
| at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)
| at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
| at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)
| ... 21 more
| Caused by: java.sql.SQLException: Table not found in statement [insert into JBPM_MODULEINSTANCE (ID_, VERSION_, PROCESSINSTANCE_, CLASS_) values (null, ?, ?, 'C')]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
| at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
| at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:30)
| ... 52 more
| 00:07:35,296 [main] DEBUG Services : closing service 'tx': org.jbpm.tx.TxService@58213c
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111407#4111407
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111407
18 years, 4 months