[EJB 3.0] - Re: Service Beans in Embeddable EJB 3.0?
by jazir1979
Hi again,
Mine is going to System.out, as configured in the log4j.xml in my ejb3-embedded/conf directory (which is in my classpath when I run the tests).
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
| <param name="Threshold" value="ALL"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Messagen -->
| <!--
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| -->
| <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
| </layout>
| </appender>
|
| <root>
| <appender-ref ref="CONSOLE"/>
| </root>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998145#3998145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998145
19 years, 3 months
[JBoss Seam] - @Unwrap from SFSB and session timeout issue
by jazir1979
Hi folks,
I have a "UserManager" SFSB Seam component with session scope that uses the @Unwrap annotation to unwrap a User entity bean. I believe this is the "manager component" pattern described in the Seam reference guide.
I am doing it this way because I don't want my User entity to be a seam component in its own right, and I want clustering/state replication to occur on my UserManager SFSB that has the User as an instance variable.
This all works really well until a session timeout occurs - Seam tries to find a destroy() method on the User entity bean instead of the UserManager SFSB!!
Here is the stacktrace:
| java.lang.IllegalArgumentException: method not found: destroy for component: user (check that it is declared on the session bean business interface)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1809)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1747)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
| at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:230)
| at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NoSuchMethodException: entity.User.destroy()
| at java.lang.Class.getMethod(Class.java:1581)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1788)
| ... 14 more
|
Is this behaviour expected?
cheers,
Daniel.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998144#3998144
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998144
19 years, 3 months
[JBoss Seam] - Question about usage of Page Actions
by james_027
After reading the topic page action in seam reference. I wonder if I could do and if it is a good practice of doing a check whether a user is log in or not then perform a redirect if necessary.
I don't fully understand this piece of code.
<s:button view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml"
id="done"
value="Done"/>
I got this code from xhtml file generate from seam gen' seam generate-entities command. the userFrom is a parameter variable from page.xml file. when the userFrom is empty it will be evaluated to UserList.xhtml but if userFrom is not empty it will be evaluated to .xhtml? If it happens that the userFrom has a value this will produce an error right? Can I assume that userFrom will never have a value?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998139#3998139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998139
19 years, 3 months