[JBoss Seam] - Logger object nulled after passivation
by pdpantages
Hello forum:
Seam 1.2.1.GA,
Jboss 4.0.5
I have a problem with my Logger disappearing on me.
This seems to happen if I don't touch its containing component ( a SFSB ) for > 5 mins. The bean is passivated. When it is re-activated, the logger is null.
My scenario is this:
I have a long running conversation continaing two components, say bean1, bean2.
Both components are SFSB, Conversational, scope CONVERSATION.
The operator can move between two pages, within the same long runnig conversation, to interact with one component or the other.
I have an ajax poll that touches the page's backing bean when the operator is on the page.
The poll keeps the page up to date and keeps the conversation from timing out if the operator doesn't touch it, as long as the browser or tab is not closed.
Each page polls its own bean but not the other pages's bean.
So, when the operator hangs around the second page for >5 minutes, bean1 is passivated.
Thank when he returns to the fist page, bean1 is re-activated, and the first ajax poll throws an NPE when it tries to print a log message.
This happens cases where I have a single conversation or use nested conversations for the two pages involved.
I saw the commentary in
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=110879
which says that injected objects are not passivated as they are cleared after invocation. Is hte @Logger Log treated differently? It is non-null before passivation (see below) but is cleared after.
My logger is injected with the usual:
| @Logger
| private Log log;
|
Some debug statements in bean1:
| @PrePassivate
| public void prePasivate()
| {
| System.out.println("PDP prePasivate()");
| System.out.println("PDP log is " + log );
| }
|
| @PostActivate
| public void postActive()
| {
| System.out.println("PDP postActive()");
| System.out.println("PDP log is " + log );
| }
|
The output:
anonymous wrote :
| PDP prePasivate()
| PDP log is org.jboss.seam.log.LogImpl@dbbc62
| PDP postActive()
| PDP log is null
|
Any ideas would be appreciaed...
Thanks, PdP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073314#4073314
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073314
18Â years, 10Â months
[JBoss Seam] - Re: Strange behavior of jar file loading
by pierospinelli
OK.
This is the tree created by build.xml explode tag : it gets the exception I reported previously:
C:\JBOSS\JBOSS-4.2.1.GA\SERVER\DEFAULT\DEPLOY\SCHEDULER.EAR
| | antlr-2.7.6.jar
| | antlr-|.0b7.jar
| | drools-compiler-4.0.0.MR2.jar
| | drools-core-4.0.0.MR2.jar
| | janino-2.5.6.jar
| | jboss-el.jar
| | jboss-seam.jar
| | jbpm-jpdl.jar
| | mvel14-1.2beta16.jar
| | security.drl
| |
| ----META-INF
| | application.xml
| | jboss-app.xml
| |
| ----scheduler.jar
| | | import.sql
| | | seam.properties
| | | TestJob1.class
| | |
| | ----it
| | | ----ecohmedia
| | | | ----seam
| | | | | | CRUDDomain.class
| | | | | | CRUDManager$1.class
| | | | | | CRUDManager$2.class
| | | | | | CRUDManager.class
| | | | | | CRUDManagerLocal.class
| | | | | | CRUDRelation.class
| | | | | |
| | | | | ----scheduler
| | | | | | ExitClass.class
| | | | | | JobClass.class
| | | | | | JobClassException.class
| | | | | | JobDefCRUD.class
| | | | | | JobDefCRUDLocal.class
| | | | | | JobInstanceCRUD.class
| | | | | | JobInstanceCRUDLocal.class
| | | | | | JobParamCRUD.class
| | | | | | JobParamCRUDLocal.class
| | | | | | JobParDefCRUD.class
| | | | | | JobParDefCRUDLocal.class
| | | | | | JobRunner.class
| | | | | | JobRunnerLocal.class
| | | | | |
| | | | | ----entity
| | | | | ExitCommand.class
| | | | | JobDefinition.class
| | | | | JobExit.class
| | | | | JobInstance.class
| | | | | JobLog.class
| | | | | JobParameter.class
| | | | | JobParameterDef.class
| | | | | JobStatus.class
| | | | |
| | | | ----test
| | | | DataRowHandler.class
| | | | IfHandler.class
| | | | JsfEcoLibrary$JsfFunctions.class
| | | | JsfEcoLibrary.class
| | | |
| | | ----genesi
| | | ----sirv
| | | ----org
| | | | Authenticator.class
| | | | OrgUnitCRUD.class
| | | | OrgUnitCRUDLocal$ManagerDomain.class
| | | | OrgUnitCRUDLocal$OrgUnitDomain.class
| | | | OrgUnitCRUDLocal.class
| | | | RuoloUtenteCRUD.class
| | | | RuoloUtenteCRUDLocal.class
| | | | UserCRUD.class
| | | | UserCRUDLocal$OrgUnitDomain.class
| | | | UserCRUDLocal.class
| | | |
| | | ----entity
| | | DirEntry.class
| | | OrgUnit.class
| | | RuoloUtente.class
| | | Utente.class
| | |
| | ----META-INF
| | ejb-jar.xml
| | persistence.xml
| |
| ----scheduler.war
| | error.xhtml
| | home.xhtml
| | index.html
| | jobInstancesCRUD.xhtml
| | jobsCRUD.xhtml
| | login.page.xml
| | login.xhtml
| | orgUnitCRUD.xhtml
| | ruoloUtenteCRUD.xhtml
| |
| ----img
| | back.gif
| | cal-next.png
| | cal-prev.png
| | descsort.gif
| | dtpick.gif
| | filter.gif
| | first.gif
| | forward.gif
| | last.gif
| | sort.gif
| |
| ----layout
| | display.xhtml
| | edit.xhtml
| | loginout.xhtml
| | menu.xhtml
| | menu2.xhtml
| | menuJobInstance.xhtml
| | template.xhtml
| |
| ----stylesheet
| | theme.css
| |
| ----WEB-INF
| | components.xml
| | ecohmedia-func.taglib.xml
| | ecohmedia.taglib.xml
| | faces-config.xml
| | managedColumn.xhtml
| | managedColumns.xhtml
| | managedCombo.xhtml
| | managedForm.xhtml
| | managedInput.xhtml
| | managedInputs.xhtml
| | managedList.xhtml
| | managedLongInput.xhtml
| | managedSelectOne.xhtml
| | managedTable.xhtml
| | pages.xml
| | web.xml
| |
| ----classes
| | db_quartz.properties
| | messages_en.properties
| |
| ----lib
| ajax4jsf-1.1.1.jar
| commons-beanutils-1.7.0.jar
| commons-digester-1.6.jar
| jboss-seam-debug.jar
| jboss-seam-ioc.jar
| jboss-seam-mail.jar
| jboss-seam-pdf.jar
| jboss-seam-remoting.jar
| jboss-seam-ui.jar
| jsf-facelets.jar
| richfaces-|.0.1.jar
|
In order to obtain all working fine, I had manually to move the lib subdirectory two levels upper,
from anonymous wrote : scheduler.ear/scheduler.war/WEB-INF/lib
to anonymous wrote : scheduler.ear/lib, as in the following tree:
C:\JBOSS\JBOSS-4.2.1.GA\SERVER\DEFAULT\DEPLOY\SCHEDULER.EAR
| | antlr-2.7.6.jar
| | antlr-|.0b7.jar
| | drools-compiler-4.0.0.MR2.jar
| | drools-core-4.0.0.MR2.jar
| | janino-2.5.6.jar
| | jboss-el.jar
| | jboss-seam.jar
| | jbpm-jpdl.jar
| | mvel14-1.2beta16.jar
| | security.drl
| |
| ----META-INF
| | application.xml
| | jboss-app.xml
| |
| ----scheduler.jar
| | | import.sql
| | | seam.properties
| | | TestJob1.class
| | |
| |
| ----lib
| ajax4jsf-1.1.1.jar
| commons-beanutils-1.7.0.jar
| commons-digester-1.6.jar
| jboss-seam-debug.jar
| jboss-seam-ioc.jar
| jboss-seam-mail.jar
| jboss-seam-pdf.jar
| jboss-seam-remoting.jar
| jboss-seam-ui.jar
| jsf-facelets.jar
| richfaces-|.0.1.jar
| | ----it
| | | ----ecohmedia
| | | | ----seam
| | | | | | CRUDDomain.class
| | | | | | CRUDManager$1.class
| | | | | | CRUDManager$2.class
| | | | | | CRUDManager.class
| | | | | | CRUDManagerLocal.class
| | | | | | CRUDRelation.class
| | | | | |
| | | | | ----scheduler
| | | | | | ExitClass.class
| | | | | | JobClass.class
| | | | | | JobClassException.class
| | | | | | JobDefCRUD.class
| | | | | | JobDefCRUDLocal.class
| | | | | | JobInstanceCRUD.class
| | | | | | JobInstanceCRUDLocal.class
| | | | | | JobParamCRUD.class
| | | | | | JobParamCRUDLocal.class
| | | | | | JobParDefCRUD.class
| | | | | | JobParDefCRUDLocal.class
| | | | | | JobRunner.class
| | | | | | JobRunnerLocal.class
| | | | | |
| | | | | ----entity
| | | | | ExitCommand.class
| | | | | JobDefinition.class
| | | | | JobExit.class
| | | | | JobInstance.class
| | | | | JobLog.class
| | | | | JobParameter.class
| | | | | JobParameterDef.class
| | | | | JobStatus.class
| | | | |
| | | | ----test
| | | | DataRowHandler.class
| | | | IfHandler.class
| | | | JsfEcoLibrary$JsfFunctions.class
| | | | JsfEcoLibrary.class
| | | |
| | | ----genesi
| | | ----sirv
| | | ----org
| | | | Authenticator.class
| | | | OrgUnitCRUD.class
| | | | OrgUnitCRUDLocal$ManagerDomain.class
| | | | OrgUnitCRUDLocal$OrgUnitDomain.class
| | | | OrgUnitCRUDLocal.class
| | | | RuoloUtenteCRUD.class
| | | | RuoloUtenteCRUDLocal.class
| | | | UserCRUD.class
| | | | UserCRUDLocal$OrgUnitDomain.class
| | | | UserCRUDLocal.class
| | | |
| | | ----entity
| | | DirEntry.class
| | | OrgUnit.class
| | | RuoloUtente.class
| | | Utente.class
| | |
| | ----META-INF
| | ejb-jar.xml
| | persistence.xml
| |
| ----scheduler.war
| | error.xhtml
| | home.xhtml
| | index.html
| | jobInstancesCRUD.xhtml
| | jobsCRUD.xhtml
| | login.page.xml
| | login.xhtml
| | orgUnitCRUD.xhtml
| | ruoloUtenteCRUD.xhtml
| |
| ----img
| | back.gif
| | cal-next.png
| | cal-prev.png
| | descsort.gif
| | dtpick.gif
| | filter.gif
| | first.gif
| | forward.gif
| | last.gif
| | sort.gif
| |
| ----layout
| | display.xhtml
| | edit.xhtml
| | loginout.xhtml
| | menu.xhtml
| | menu2.xhtml
| | menuJobInstance.xhtml
| | template.xhtml
| |
| ----stylesheet
| | theme.css
| |
| ----WEB-INF
| | components.xml
| | ecohmedia-func.taglib.xml
| | ecohmedia.taglib.xml
| | faces-config.xml
| | managedColumn.xhtml
| | managedColumns.xhtml
| | managedCombo.xhtml
| | managedForm.xhtml
| | managedInput.xhtml
| | managedInputs.xhtml
| | managedList.xhtml
| | managedLongInput.xhtml
| | managedSelectOne.xhtml
| | managedTable.xhtml
| | pages.xml
| | web.xml
| |
| ----classes
| | db_quartz.properties
| | messages_en.properties
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073310#4073310
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073310
18Â years, 10Â months
[JBoss jBPM] - Re: jPDL Designer and Map parameters in actions
by karmen38
Hi Koen,
Thank you for the reply. I understand, it makes sense.
Maybe the designer could just leave the variable as it is, not delete it at all. It can recognize that the variable is not editable by the form and disable the editing and not update the variable in XML. Actually, disabling the editing is not even that important as not deleting the Map in XML. In this case the one can draw the process graphically, define actions and parameters, switch to XML, define additional parameters (Maps) not editable in designer, switch back to the designer and make some changes again without risk of loosing the complex variables.
Your idea about pluggable nodes is interesting. Where can I read more about it? It could be the way to go for my situation. Does the implementation involves development of Eclipse plugin or it is some code that plugs to the designer and is interpreted by designer? Actually, either way sounds good.
I will need to re-install Eclipse 3.3 with the designed to check. Will the designer binary package that is available for download from JBoss / jBPM site work with 3.3 or I need to build the designer from CVS? I read a couple of postings here about how to setup designer for Eclipse 3.2 and it works perfectly. I will try again with 3.3.
Thank you,
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073306#4073306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073306
18Â years, 10Â months
[EJB 3.0] - Re: failed to lazily initialize a collection of role:
by Wolfgang Knauf
Hi !
Probably you want to access a relationship property when the entity bean is no longer under control of the entity manager (a "detached" entity).
There are two ways around this problem:
a) set the fetch type to "EAGER"
@OneToMany(mappedBy="...", fetch=FetchType.EAGER)
| public Collection<MyChild> getChilds()
This causes the entity manager to load the child collection when the parent is loaded. May be a big performance problem.
b) prefetch your childs when the entity bean is still under entity manager control.
Imagine a find method of a session bean:
public MyParent findById (Integer id)
| {
| MyParent parent = this.entityManager.find(MyParent.class, id);
| parent.getChilds().size();
| }
"parent.getChilds().size();" forces loading of the childen.
Hope this helps
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073303#4073303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073303
18Â years, 10Â months