[JBoss Seam] - Re: Seam built-in components not working with Woodstock !!!
by b.reeve
My Environment now is
Seam : 2.0.0.CR2
Woodstock : 4.1
JSF : 1.2
Java : 5.0
Tomcat : 6.0.10
These are the files that I have
Employee.java
| package test.injection;
|
| import java.io.Serializable;
|
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
|
| @Name("employeeBean")
| @Scope(ScopeType.SESSION)
| public class Employee implements Serializable{
|
| private String name;
|
| @In(value="#{departmentSpring}")
| private DepartmentSpringBean departmentSpring;
|
| public String getName() {
| return name;
| }
|
| public void setName(String name) {
| this.name = name;
| }
|
| public String addEmployee(){
| System.out.println("Name = " + getName());
| return "/success.xhtml";
| }
| }
|
DepartmentSpringBean.java
|
| package test.injection;
|
|
| public class DepartmentSpringBean {
|
| private String departmentName;
|
| public DepartmentSpringBean(){
| }
|
| public String getDepartmentName() {
| return departmentName;
| }
|
| public void setDepartmentName(String departmentName) {
| this.departmentName = departmentName;
| }
|
| }
|
spring.xhtml
|
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core">
| <head></head>
| <body>
| <h:form id="testInjectionForm">
| <h:inputText value="#{departmentSpring.departmentName}" />
| <h:inputText value="#{employeeBean.name}" />
| <h:commandLink action="#{employeeBean.addEmployee}" value="Add Employee" />
| </h:form>
|
| </body>
| </html>
|
applicationContext.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
| <beans>
| <bean id="departmentSpring" class="test.injection.DepartmentSpringBean" />
| </beans>
|
On running the app, we can see that the seam bean setter (setName) is never called but Spring bean setter is called and also Spring bean is injected into the Seam component. Any ideas, suggestions would be helpful.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099034#4099034
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099034
18Â years, 6Â months
[JBoss Seam] - Re: EntityQuery Restrictions
by griffitm
Overriding the getOrder method as below then disables the clickable sorting feature of the data tables:
| <h:column>
| <f:facet name="header">
| <s:link styleClass="columnHeader"
| value="Description #{statusList.order=='description asc' ? messages.down : ( statusList.order=='description desc' ? messages.up : '' )}">
| <f:param name="order" value="#{statusList.order=='description asc' ? 'description desc' : 'description asc'}"/>
| </s:link>
| </f:facet>
| #{status.description}
| </h:column>
|
No longer seems to work, because I suspect the sort order is always returned by the Entity as what is returned by getOrder(). Is there any way for both to happily co-exist?
Do I need to override setOrder as well, and only return the hard coded value if null?
Thanks in advance for any help!
MG
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099031#4099031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099031
18Â years, 6Â months
[JBoss Seam] - Odd Errors and OutOfMemory
by modoc
I have some odd errors showing up in my Seam app. I am hoping that someone here can provide a little guidance.
Caused by: java.lang.IllegalStateException: could not acquire lock on @Synchronized component: mailQueue
the mailQueue component is session scoped, isn't synchronized by me, nor can I figure out why there would be any lock contention on it. The error occurs when a property on the component is referenced from a page.
Caused by: javax.el.ELException: /email.xhtml @12,50 rendered="#{!mailQueue.expired}": Error reading 'expired' on type com.digitalsanctuary.seam.SessionMailQueue_$$_javassist_4
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
This happens rarely, but does occur more than once.
I also get about 100+ of these:
02:13:30,821 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id 4b7ed37a:bc61:471a5fe3:d8b98 invoked while multiple threads active within it.
| 02:13:30,821 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action 4b7ed37a:bc61:471a5fe3:d8b98 aborting with 1 threads active!
Followed up by:
02:21:47,763 ERROR [STDERR] Exception in thread "Timer-0"
| 02:22:31,160 ERROR [STDERR] Exception in thread "Thread-4"
| 02:22:41,379 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
| 02:25:13,302 ERROR [SeamPhaseListener] uncaught exception
| 02:27:50,873 ERROR [SeamPhaseListener] uncaught exception
And then I'm out of memory and everything blows up from there.
Any ideas? The application is very simple, and used to run for months without issue.
I don't understand why there would be lock contention issues with the mailQueue, and I don't know what the arjuna coordinator is doing or why it's failing.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099028#4099028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099028
18Â years, 6Â months