[JBoss Seam] - Classpath question with Seam & Tomahawk
by georgesberscheid
Hi,
looking at the examples that come with Seam and at what seam-gen does, it seems to be common practice to put all EJB3's and Seam components into a JAR file, all the JSF and view stuff into a WAR file and package both in an EAR.
The issues example uses Tomahawk which goes into .war/WEB-INF/lib. What do I do if one of my Seam components, a stateless session bean that's in the JAR file needs to hold the TreeModel for a Tomahawk Tree2 component?
Do I need to move the Tomahawk and Facelets libs to the EAR root (and add it to application.xml or jboss-app.xml as java modules) or do I rather put them into server/default/deploy/jbossweb-tomcat55.sar/jsf-libs?
Should I not use any EJB3 components with references to JSF classes and make them normal Seam JAVA_BEAN components that go into .war/WEB-INF/classes?
Any help on this would be greatly appreciated.
Thanks,
Georges
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005872#4005872
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005872
19 years, 3 months
[JBoss Seam] - Re: Seam Examples
by hstang
"lightbulb432" wrote :
| 2) In the example's pages.xml there is a no-conversation-view-id attribute for the pages element and a conversation-required attribute for some of the page elements. I noticed that everytime I access a page with a conversation-required, it redirects to the no-conversation-view-id...is this the purpose of these two attributes? (i.e. The conversation-required page redirects to the no-conversation-view-id page when no conversation exists?)
|
Yes. however, it happens when no long-running conversation exists as there will ALWAYS be a temporary conversation.
"lightbulb432" wrote :
| 4) When a conversation-required page redirects to the no-conversation-view-id page, a conversation starts! (e.g. you enter confirm.seam and it forwards to home.seam?cid=1) Why is a conversation starting here...I don't see anything in pages.xml or any @Begin to indicate this...
|
http://docs.jboss.com/seam/1.1GA/reference/en/html/conversations.html
6.1 Seam's conversation model
Again, a temporary conversation != long running conversation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005865#4005865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005865
19 years, 3 months
[JBoss Seam] - Re: selectItems exception
by damatrix
I have tried taking out the A4J tags and removed the name from si:selectitems configuration but to no avail.
I think the problem is from the seam managed persistence context. During startup seam loads it up as a component as shown below
| 00:08:02,125 INFO [Component] Component: em, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
|
|
The selectitems documentation stated that i needed to make sure that my enties were managed by a seam managed persistence context, and since i'd been using "em" to represent my entity manager, i just configured a seam managed persistence context with the same "em" name for my entity manager in my EJBs.
However i still get the following exception when i try to inject it using the @In notation, unless i set create to true, i.e @In(create=true).
| javax.ejb.EJBTransactionRolledbackException: org.jboss.seam.RequiredException: In attribute requires value for component: pavilionListing.em
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
|
Added to that, although the selectOneMenu DOES fill up with the list of objects i want selected, my save method is not called when i click it(it uses h:commandButton) i.e. nothing happens . When i change it to use s:button the method on the EJB does get called but i find that the outjected object that was to be populated with the data i specified is null.
Do you think declaring a separate seam managed persistenc context to be used by select items will solve the problem and if so how do i do that?
Hope that this level of detail is enough to help you determine what is wrong. Thanx for the effort.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005858#4005858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005858
19 years, 3 months