[JBoss jBPM] - task instance in start state
by jywu
hi,
I went through the jbpm user guide about task instance,
it's saying
Task instances are typically created by the process execution entering a task-node
Is that different from the task in start state?
'Cause when I invoke this method
instance.getTaskMgmtInstance().getTaskInstances().iterator().next();
|
right after I create the process instance, it will throw a NullPointerException.
If the task instance won't be created automatically in start state, can I create it somehow manually? or I misunderstand somewhere above?
Here is my start state definition:
| <start-state name="draft">
| <task name="making a draft" swimlane="writer">
| <assignment class='com.test.WriterAssignmentHandler' />
| </task>
| <transition to="review" name="submit"></transition>
| </start-state>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062270#4062270
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062270
18Â years, 10Â months
[JBossWS] - How to return a complex type?
by Ufic
Hi.
I'm a new user of JBoss.
I'm trying to create a WebService with JBoss 4.2.0 and Eclipse 3.1 (using Java 1.5 and Ejb 2.1: I must use these versions).
No problem with business methods returning a String, but I can't create business methods returning an array of Strings, a JavaBean or (it's my really goal) an array of JavaBeans.
I realize that in some way I have to map Java types in xml types and viceversa. But, HOW?
I have to change wsdl file, jaxrpc-mapping.xml, webservices.xml or I have to create some new file?
Googling, I found too many infos: sorry, maybe this is a faq but it's driving me crazy :( .
I can deploy a Service that returns an array of Strings but the client throws the follow exception:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
| Deserializing parameter 'result': could not find deserializer for type
| {http://dipartimento.wsEjb.agaticarnazzo.it/types}String.Array
| at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:308)
| at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1040)
| at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
| at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:856)
| at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:325)
| at org.apache.axis.message.RPCElement.getParams(RPCElement.java:349)
| at org.apache.axis.client.Call.invoke(Call.java:2379)
| at org.apache.axis.client.Call.invoke(Call.java:2278)
| at org.apache.axis.client.Call.invoke(Call.java:1772)
| at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:195)
| at $Proxy0.getDocumenti(Unknown Source)
| at it.agaticarnazzo.dipartimento.wsPojo.TestClient.main(TestClient.java:30)
And if I try to deploy a webservice that returns a JavaBean, Jboss prints the follow error:
Cannot load java type: MyJavaBean.in.its.package
Can someone help me? :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062268#4062268
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062268
18Â years, 10Â months
[Remoting] - Re: Simple Socket Server (TEXT)?
by cazuza
"cazuza" wrote : sorry the config file is here
| <server>
| <!-- ==================================================================== -->
| <!-- Invokers to the JMX node -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.remoting.transport.Connector"
| name="com.xxxx:service=Connector,transport=socket"
| display-name="RacingDB Socket transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="socket">
| <attribute name="timeout">5000</attribute>
| <attribute name="dataType" isParam="true">text</attribute>
| <attribute name="marshaller" isParam="true">com.xxxx.dbi.socket.TextMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">com.xxxx.dbi.socket.TextUnMarshaller</attribute>
| <attribute name="serverSocketClass">com.xxxx.dbi.socket.SimpleInputStreamWrapper</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">6193</attribute>
| <attribute name="enableTcpNoDelay" isParam="true">true</attribute>
| </invoker>
| <handlers>
| <handler subsystem="RDBIS">com.xxxx.dbi.socket.Handler</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
|
| </server>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062266#4062266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062266
18Â years, 10Â months
[Remoting] - Re: Simple Socket Server (TEXT)?
by cazuza
Appologies in advance if the questions are too naive, but I'm just starting with Jboss and have a head full of doubts.
I have try to implement a socket server using this approach and have hit a wall.
the timeout attribute works but doesn't close the socket instead it sends error messages to the console.
16:05:52,492 ERROR [STDERR] java.net.SocketTimeoutException: Read timed out
16:05:52,492 ERROR [STDERR] at java.net.SocketInputStream.socketRead0(Native Method)
16:05:52,492 ERROR [STDERR] at java.net.SocketInputStream.read(SocketInputStream.java:129)
16:05:52,492 ERROR [STDERR] at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
16:05:52,493 ERROR [STDERR] at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
16:05:52,493 ERROR [STDERR] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
16:05:52,493 ERROR [STDERR] at java.io.InputStreamReader.read(InputStreamReader.java:167)
16:05:52,493 ERROR [STDERR] at java.io.BufferedReader.fill(BufferedReader.java:136)
16:05:52,493 ERROR [STDERR] at java.io.BufferedReader.readLine(BufferedReader.java:299)
16:05:52,493 ERROR [STDERR] at java.io.BufferedReader.readLine(BufferedReader.java:362)
16:05:52,493 ERROR [STDERR] at com.thetote.dbi.socket.TextUnMarshaller.read(TextUnMarshaller.java:53)
16:05:52,493 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:652)
16:05:52,493 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:530)
16:05:52,493 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:383)
16:05:52,493 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
16:05:57,492 ERROR [STDERR] java.net.SocketTimeoutException: Read timed out
16:05:57,493 ERROR [STDERR] at java.net.SocketInputStream.socketRead0(Native Method)
16:05:57,493 ERROR [STDERR] at java.net.SocketInputStream.read(SocketInputStream.java:129)
16:05:57,493 ERROR [STDERR] at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
16:05:57,493 ERROR [STDERR] at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
16:05:57,493 ERROR [STDERR] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
16:05:57,493 ERROR [STDERR] at java.io.InputStreamReader.read(InputStreamReader.java:167)
16:05:57,493 ERROR [STDERR] at java.io.BufferedReader.fill(BufferedReader.java:136)
16:05:57,494 ERROR [STDERR] at java.io.BufferedReader.readLine(BufferedReader.java:299)
16:05:57,494 ERROR [STDERR] at java.io.BufferedReader.readLine(BufferedReader.java:362)
16:05:57,494 ERROR [STDERR] at com.thetote.dbi.socket.TextUnMarshaller.read(TextUnMarshaller.java:53)
16:05:57,494 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:652)
16:05:57,494 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:530)
16:05:57,494 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:383)
16:05:57,494 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
unless the client closes the connection itself it seems that the server will timeout and write error messages to STDERR. I don't want to rely on the client to close the connection, is it possible to close the socket connection after sending the response?
the other question is How do I send multiple messages back to the client. At the moment on my invoke method I receive the request, parse it and return a string, what do I have to do to send another string without concatenating on the previous string?
this is my config file
<!-- ==================================================================== -->
<!-- Invokers to the JMX node -->
<!-- ==================================================================== -->
<mbean code="org.jboss.remoting.transport.Connector"
name="com.xxxx:service=Connector,transport=socket"
display-name="RacingDB Socket transport Connector">
5000
text
com.xxxx.dbi.socket.TextMarshaller
com.xxxx.dbi.socket.TextUnMarshaller
com.xxxx.dbi.socket.SimpleInputStreamWrapper
${jboss.bind.address}
6193
true
com.xxxx.dbi.socket.Handler
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062263#4062263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062263
18Â years, 10Â months