[JBoss Seam] - Session problems
by thierry.rietsch
Hi
I have a problem with sessions and JBoss Seam. I have a facelet which displays a collection of objects. In the EJB3 bean related to the facelet, I have a the @Factory() annotation which initalizes the collection with the apropriate objects. So far so good.
The objects from the collection get listed in a h:dataTable and I have some s:links after the collection entries, which call a method in another bean and pass the selection.
If I set the Scope of the EJB3 bean which handles the collection to SESSION I can call the foreign method and pass the object. It works. But, if i click on another facelet, and then click back on the origin facelet, the collection doesn't get reloaded. If I change now the Scope to CONVERSATION, the reload of the collection works, but the parameter which is passed to the method (in the s:link) is always null.
How can I handle this problem?
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("partsListFinder")
| public class PartsListFinderBean implements PartsListFinder {
| @In(required=false)
| private String plName;
|
| @DataModel
| private List<PartsList> partsLists;
|
| @PersistenceContext(type=PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| public void findPartsList() {
| partsLists = em.createQuery("from PartsList pl where pl.name like :name")
| .setParameter("name", plName + '%')
| .getResultList();
| }
|
| @Factory("partsLists")
| public void findPartsLists() {
| partsLists = em.createQuery("from PartsList").getResultList();
| }
|
| @Destroy @Remove
| public void destroy() { }
| }
|
| <h:dataTable value="#{partsLists}" var="pl">
| <h:column><f:facet name="header">Search Job Name</f:facet> #{pl.name}</h:column>
| <h:column>
| <f:facet name="header">Action</f:facet>
| <s:link value="Edit" action="#{partsListEditor.edit(pl)}"/><br />
| <s:link value="View" action="#{partsListViewer.view(pl)}"/>
| </h:column>
| </h:dataTable>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053577#4053577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053577
18Â years, 11Â months
[JBossWS] - 'uniqueness constraint violation' when running wsconsume on
by Maffewl
Hi all, I've been able to deploy a webservice in JBossWS based on a WSDL that I had made running under jboss-net/axis. I used WSConsume and the Top-Down approach to arrive at this point. When i attepmt to use wsconsume on the deployed wsdl, I get errors talking about a uniqueness constraint violation
anonymous wrote :
| uniqueness constraint violation
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:213)
| at org.jboss.com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
| at org.jboss.com.sun.tools.ws.processor.Processor.runModeler(Processor.java:82)
| at org.jboss.com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:543)
| at org.jboss.com.sun.tools.ws.util.ToolBase.run(ToolBase.java:57)
| at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl$1.run(WSContractConsumerImpl.java:163)
| at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl.consume(WSContractConsumerImpl.java:166)
| at org.jboss.ws.tools.jaxws.command.wsconsume.importServices(wsconsume.java:193)
| at org.jboss.ws.tools.jaxws.command.wsconsume.main(wsconsume.java:76)
| Caused by: uniqueness constraint violation
| at org.jboss.com.sun.tools.ws.processor.model.java.JavaMethod.addParameter(JavaMethod.java:76)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.createJavaMethodForOperation(WSDLModeler.java:2411)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.createJavaInterfaceForPort(WSDLModeler.java:2244)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:536)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:289)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:258)
| at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:181)
|
|
then i get a big list of errors that look like this
anonymous wrote : 17:03:27,104 ERROR [JBossXSErrorHandler] JBossWS_cls.chase.com_type17794.xsd[domain:http://www.w3.org/TR/xml-schem...: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://cls.chase.com/type,rewardsProgramAttributes'.
|
it seems to be for most of my properties, can anyone tell me why this happens?
ive invluded a portion of the deployed wsdl that contains all the nodes that have the element in the example error message
| <definitions name='AccountService' targetNamespace='http://XXX.XXXXX.com/account' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://XXX.XXXXX.com/type' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://XXX.XXXXX.com/account' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <xs:schema elementFormDefault='qualified' targetNamespace='http://XXX.XXXXX.com/type' version='1.0' xmlns:tns='http://XXX.XXXXX.com/type' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
|
| ...
|
| <xs:complexType name='rewardsProgramAttributes'>
| <xs:sequence>
| <xs:element name='programName' type='xs:string'/>
|
| <xs:element name='programDescription' type='xs:string'/>
| <xs:element name='rewardsCurrency' type='xs:string'/>
| <xs:element name='rewardsCurrencyDescription' type='xs:string'/>
| <xs:element name='rewardsProductCode' type='xs:string'/>
| <xs:element name='rewardsDisplayFormat' type='xs:string'/>
| </xs:sequence>
| </xs:complexType>
|
| ...
|
|
| <xs:complexType name='promotion'>
| <xs:sequence>
| <xs:element name='internalIdentifier' type='xs:long'/>
| <xs:element name='name' type='xs:string'/>
| <xs:element name='description' type='xs:string'/>
|
| <xs:element name='merchantInternalIdentifier' type='xs:long'/>
| <xs:element name='merchantName' type='xs:string'/>
| <xs:element name='merchantId' type='xs:string'/>
| <xs:element name='activationDate' type='xs:string'/>
| <xs:element name='expirationDate' type='xs:string'/>
| <xs:element name='terms' type='xs:string'/>
| <xs:element name='enrollmentOptions' type='tns:enrollmentOption_Array'/>
| <xs:element name='rewardsProgramAttributes' type='tns:rewardsProgramAttributes_Array'/>
| <xs:element name='excludeRewardsProgramAttributesInd' type='xs:boolean'/>
|
| <xs:element name='promotionStatusCode' type='xs:int'/>
| </xs:sequence>
| </xs:complexType>
|
| ...
|
| <xs:complexType name='rewardsProgramAttributes_Array'>
| <xs:sequence>
| <xs:element maxOccurs='unbounded' minOccurs='0' name='rewardsProgramAttributes' nillable='true' type='tns:rewardsProgramAttributes'/>
| </xs:sequence>
| </xs:complexType>
|
| ...
|
| </xs:schema>
| </types>
|
| ...
|
| </definitions>
|
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053576#4053576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053576
18Â years, 11Â months