[JBoss Seam] - Re: Some doubts about Seam
by magoicochea
Thanks for your answers, I have another questions:
1.- When I developed applications with JSF I used a JSF/Spring/Hibernate architecure using Managed Beans/Services/DAOs, the managed beans had the presentation logic, the Services had the business logic and the DAOs had the data access logic, it was there were I performed my hibernate queries.
On the examples I've seen the entity beans would be the object that I manipulated on with the DAOs, but I have also seen that the session bean contains data, business and presentation logic. The jsp is being managed from there, business rules are being applied on its methods and it is also making queries to the database. I suppose this is just for the simplicity of the event, but how can I separate efficiently this three layers? What's the closest thing you can do to the Service/DAO pattern on JBoss Seam?
2.- When database queries were done on the example I didn't see any transaction being open, does JBoss Seam manage them transparently like Spring or were they omitted on the example?
Thanks again
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069428#4069428
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069428
17Â years, 6Â months
[JBoss Seam] - Message bundle in an EAR is not working
by reind
I have an ear packaged as:
ear/
| a.war
| /WEB-INF/faces-config.xml
| a.jar
| /com/example/a/Messages.properties
| b.war
| /WEB-INF/faces-config.xml
| b.jar
| /com/example/b/Messages.properties
faces-config.xml in a.war has:
<message-bundle>com.example.a.Messages</message-bundle>
and faces-config.xml in b.war has:
<message-bundle>com.example.b.Messages</message-bundle>
Neither messages file get's loaded though.
If I change a/faces-config.xml to
<message-bundle>Messages</message-bundle>
and move Messages.properties to:
a.jar
/Messages.properties
Then it works for the "a" module, but if I do the same for the "b" module too, it still works for "a" but not for "b".
Any ideas? I'd like to have a different message bundle for each web module and I thought the above was a good approach - what is the best practice in this case?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069427#4069427
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069427
17Â years, 6Â months
[JBoss Seam] - Re: s:convertEntity - EntityManager is closed.
by trouby
Hey,
I upgraded to CVS version and the entityManager error stopped from hapening, but I have encountered another issue,
when I add a search parameter to the EntityQuery that has a <s:convertEntity> tag, + the parameter within the myList.page.xml file,
submitting the form results a argument type mismatch
I assume it is a problem to pass parameters which are entities,
Is there any way to solve this issue? I think it is important to support search parameters via entities when using EntityQuery,
here's the stack trace, just in case:
| 01:15:38,203 ERROR [SeamPhaseListener] uncaught exception
| javax.el.ELException: java.lang.IllegalArgumentException: argument type mismatch
| at javax.el.BeanELResolver.setValue(BeanELResolver.java:116)
| at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
| at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:93)
| at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
| at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
| at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
| at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
| at org.jboss.seam.navigation.Pages.applyConvertedValidatedValuesToModel(Pages.java:753)
| at org.jboss.seam.navigation.Pages.postRestore(Pages.java:392)
| at org.jboss.seam.jsf.SeamPhaseListener.postRestorePage(SeamPhaseListener.java:527)
| at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:374)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:211)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.IllegalArgumentException: argument type mismatch
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
| ... 72 more
|
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069424#4069424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069424
17Â years, 6Â months