[JBoss Seam] - a:support request causes
by gena777
Hi
i'm using an ajax4jsf enabled page, which works proper until i send even a smallest ajax event. Then i get a PersistentObjectException (detached entity...). The conversation seems to be long running, the session has manual flash mode. The entity, which is the cause of an exception is mapped as CascadeType.ALL (so auto merge should occur).
The workflow step is: An complex entity is loaded into the conversation to be changed. Any changes without an ajax (also cascaded deletions) can be persisted.
Page snipplet, caused the error (but all ajax-enabled components produces this exception after first usage)
| <h:inputText styleClass="large #{rwo:hasMessages('model','ERROR') ? 'rscInputFailed' : ''}"
| id="model"
| value="#{inOffer.item.model}"
| required="true"
| requiredMessage="#{uib.ModelRequired}">
| <a:support event="onblur" requestDelay="100" reRender="model">
| <s:conversationId/>
| </a:support>
| </h:inputText>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047074#4047074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047074
18 years, 11 months
[JBoss Seam] - a:support request causes
by gena777
Hi
i'm using an ajax4jsf enabled page, which works proper until i send even a smallest ajax event. Then i get a PersistentObjectException (detached entity...). The conversation seems to be long running, the session has manual flash mode. The entity, which is the cause of an exception is mapped as CascadeType.ALL (so auto merge should occur).
The workflow step is: An complex entity is loaded into the conversation to be changed. Any changes without an ajax (also cascaded deletions) can be persisted.
Page snipplet, caused the error (but all ajax-enabled components produces this exception after first usage)
| <h:inputText styleClass="large #{rwo:hasMessages('model','ERROR') ? 'rscInputFailed' : ''}"
| id="model"
| value="#{inOffer.item.model}"
| required="true"
| requiredMessage="#{uib.ModelRequired}">
| <a:support event="onblur" requestDelay="100" reRender="model">
| <s:conversationId/>
| </a:support>
| </h:inputText>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047071#4047071
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047071
18 years, 11 months
[JBoss jBPM] - BPEL: invoke a oneway webservice
by zauberlehrling
Hi,
I have a simple oneway webservice implemented by a stateless session bean:
| package beispiel;
|
| import javax.ejb.Stateless;
| import javax.jws.Oneway;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
|
| @WebService
| @Stateless
| public class Asynchron {
|
| @WebMethod
| @Oneway
| public void createAccount( String name ) {
| System.out.println("Asynchron: "+name);
| }
| }
|
After deployment I can find the following wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
| <definitions name="AsynchronService"
| targetNamespace="http://beispiel/"
| xmlns:tns="http://beispiel/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns="http://schemas.xmlsoap.org/wsdl/">
| <types>
| <xs:schema targetNamespace="http://beispiel/"
| version="1.0" xmlns:tns="http://beispiel/"
| xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="createAccount" type="tns:createAccount" />
| <xs:complexType name="createAccount">
| <xs:sequence>
| <xs:element minOccurs="0" name="arg0"
| type="xs:string" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| <message name="Asynchron_createAccount">
| <part name="createAccount" element="tns:createAccount" />
| </message>
| <portType name="Asynchron">
| <operation name="createAccount">
| <input message="tns:Asynchron_createAccount" />
| </operation>
| </portType>
| <binding name="AsynchronBinding" type="tns:Asynchron">
| <soap:binding style="document"
| transport="http://schemas.xmlsoap.org/soap/http" />
| <operation name="createAccount">
| <soap:operation soapAction="" />
| <input>
| <soap:body use="literal" />
| </input>
| </operation>
| </binding>
| <service name="AsynchronService">
| <port name="AsynchronPort" binding="tns:AsynchronBinding">
| <soap:address
| location="http://localhost:8080/Beispiel/Asynchron" />
| </port>
| </service>
| </definitions>
And I want to call this webservice from my bpel process:
| <bpws:variables>
| <bpws:variable messageType="ns0:PojoService_sayHello"
| name="PartnerLinkRequest" />
| <bpws:variable messageType="ns0:PojoService_sayHelloResponse"
| name="PartnerLinkResponse" />
| <bpws:variable messageType="ns0:Asynchron_createAccount"
| name="Request" />
| </bpws:variables>
| ........
| <bpws:assign name="Asyn" validate="no">
| <bpws:copy>
| <bpws:from><![CDATA['Hallo Welt!']]></bpws:from>
| <bpws:to part="createAccount" variable="Request" />
| </bpws:copy>
| </bpws:assign>
| <bpws:invoke inputVariable="Request"
| name="Invoke"
| operation="createAccount"
| partnerLink="Asynchron"
| portType="ns0:Asynchron" />
|
with
<plnk:partnerLinkType name="ASYNCHRONPLT">
| <plnk:role name="role4" portType="wsdl:Asynchron" />
| </plnk:partnerLinkType>
|
If I start the bpel process, the oneway webservice Asynchron is contacted, but the webservices receives only null and JBoss reports an error:
anonymous wrote : 22:26:41,893 INFO [STDOUT] Asynchron: null
| 22:26:41,903 ERROR [STDERR] [Fatal Error] :-1:-1: Premature end of file.
|
I recorded the bytes send to the application server with the TCP/IP-Monitor:
POST /Beispiel/Asynchron?datatype=SOAPMessage HTTP/1.1
| SOAPAction: ""
| Content-Type: text/xml; charset=UTF-8
| User-Agent: Java/1.5.0_10
| Host: localhost:8000
| Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
| Connection: keep-alive
| Content-Length: 239
|
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
| <env:Header>
| </env:Header>
| <env:Body>
| <defaultNS:createAccount
| xmlns:defaultNS='http://beispiel/'>
| Hallo Welt!
| </defaultNS:createAccount>
| </env:Body>
| </env:Envelope>
|
Is there an error in this?
Furthermore I recorded the text send to the application server, when I call the webservice with the webservice explorer:
POST /Beispiel/Asynchron HTTP/1.1
| Host: localhost:8000
| Content-Type: text/xml; charset=utf-8
| Content-Length: 325
| Accept: application/soap+xml, application/dime, multipart/related, text/*
| User-Agent: IBM Web Services Explorer
| Cache-Control: no-cache
| Pragma: no-cache
| SOAPAction: ""
| Connection: close
| <soapenv:Envelope
| xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
| xmlns:q0="http://beispiel/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soapenv:Body>
| <q0:createAccount>
| <arg0>Hallo Welt!</arg0>
| </q0:createAccount>
| </soapenv:Body>
| </soapenv:Envelope>
I get the correct parameter in the jboss log: Hallo Welt!
anonymous wrote : 22:34:55,136 INFO [STDOUT] Asynchron.: Hallo Welt!
My question: Is it not possible to transfer parameters to a oneway webservice?
Best regards,
Frank
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047070#4047070
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047070
18 years, 11 months
[JBoss Seam] - bijection fundamentals
by nicolasb
i have a stateless bean scoped Event
| @Name("mybean")
| @Scope(ScopeType.EVENT)
|
i want to use the pages.xml file to include a parameter and execute a method
| <param name="option" value="#{mybean.option}"/>
| <action execute="#{mybean.dowork}"/>
|
the do work uses the option field in the bean to fill the values of a field which is to be outjected for use in a facelet
everytime i try to do this i get following exception:
| 21:08:56,531 ERROR [DebugPageHandler] redirecting to debug page
| org.jboss.seam.RequiredException: @Out attribute requires non-null value: mybean.outVariable
|
if i set the scope to session or i fill the outVariable in the setter method of the option field it works. i wonder why in the event scope the bean tries to outject the value.
is it maybe the case that in/outjection happens after every single method call, regardless of the used scope ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047068#4047068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047068
18 years, 11 months
[JBossCache] - Flushfest
by supi
Our application uses multiple caches, each of which having an "owner" node, which is the authority on cache data and also the only node that can provide state for a particular cache.
We used to do this (years ago) by ensuring that owner == JGroups coordinator, but are now looking for a solution that works on a higher level.
Cache participants know if they are owner or not, but they don't know who is if they are not. A first solution was to fetch state from everyone joining the cluster until state could be retrieved successfully. However, this resulted in a total mess of flush messages, retries and timeouts. To improve the situation, we've added ownership to IpAddress' additional data field. Caches now fetch state only if the owner joins the cluster.
However, the problem remains: When the owner joins the cluster, multiple cache instances try to flush at the same time, and they all fail. State transfer continues without throwing an error, and without flush. Doesn't this mean that flush in state transfer is essentially useless because it isn't guaranteed to work (or fail hard) anyway? If flush isn't used, does state transfer block the state provider's sending queues, or the receiver's queues/cache? Are there other means to ensure data consistency?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047065#4047065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047065
18 years, 11 months