[JBoss jBPM] - Re: ProcessDefinition in 2nd level cache
by a.grin
Ed, Tom,
Yes, I do think it is a problem.
In nearly any real-life application the process definition has to be accessed from many threads, each working with own process instance. For simplicity lets assume that they are all based on the same process definition. All process instances are on the different stages of the process. As soon as you send signal to the process instance JBPM will try to access the corresponding process definition internally. Process definition will have to read some additional data from the database using Hibernate session it was attached to. With multiple process instances processed in different threads there will be sooner or later the situation when the same hibernate session will be used to read different parts (or even the same part) of the process definition in the 2 or more threads .
I think it is clear that it is not feasible to sync. all the accesses to the process instances.
In my case I wrote some generic code that initializes recursively all the associations of the process definition whenever new process definition is loaded for the first time. I just didn't want to modify JBPM hbm files. But I do not see the reason to have lazy loading for the process definition, considering the problems it causes. At least for the cases that I would consider as a mainstream: few process definitions and many process instances (each instance requiring some part of the process definition for further processing).
Andrey.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042429#4042429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042429
17 years, 2 months
[Messaging, JMS & JBossMQ] - Re: NamingException Dusring Lookup: Connection Reset
by tobake
I have a similar problem that needs to be solved..
I have a test client with wich I try to send messages to a remote que. Sending to my local server works well, but when sending to the remote server, I get the following trace :
Exception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.ConnectEx
ception: Connection refused to host: 213.187.xxx.xxx; nested exception is:
java.net.ConnectException: Connection timed out: connect]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at JmsClientTest.main(JmsClientTest.java:25)
Caused by: java.rmi.ConnectException: Connection refused to host: 213.187.196.148; nested exception
is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
... 3 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 9 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042427#4042427
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042427
17 years, 2 months
[JBossWS] - JBoss JAXRPC SOAP client type mapping problem
by bypaik
hi, i've been stuck on this issue for a few days and have no idea what's causing the following stack track:
org.jboss.ws.WSException: Cannot obtain java type mapping for: {urn:grainger-com:xi:addrval_webservice:types}>AddrRequest
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processDocElement(JAXRPCMetaDataBuilder.java:627)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:111)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
i'm using JBoss 4.0.5 on jdk 1.4 (i have no choice but to use jdk 1.4 and thus can't use the newer ws api). my wsdl looks like the following:
<?xml version="1.0"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:p1="urn:me-com:xi:addrval_webservice"
xmlns:p2="urn:me-com:xi:addrval_webservice:types"
targetNamespace="urn:me-com:xi:addrval_webservice"
name="MI_Request_To_Grp1">
<wsdl:types>
<xsd:schema targetNamespace="urn:me-com:xi:addrval_webservice:types">
<xsd:element name="AddrRequest">
<xsd:complexType name="Request">
<xsd:all>
<xsd:element name="InputKeyValue" type="xsd:string" />
<xsd:element name="FirmName" type="xsd:string" />
<xsd:element name="AddressLine1" type="xsd:string" />
<xsd:element name="City" type="xsd:string" />
...
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="AddrResponse">
<xsd:complexType name="Response">
<xsd:all>
<xsd:element name="Status" type="xsd:string" />
<xsd:element name="StatusCode" type="xsd:string" />
<xsd:element name="StatusDescription" type="xsd:string" />
<xsd:element name="InputKeyValue" type="xsd:string" />
<xsd:element name="FirmName" type="xsd:string" />
<xsd:element name="AddressLine1" type="xsd:string" />
<xsd:element name="AddressLine2" type="xsd:string" />
<xsd:element name="AddressLine3" type="xsd:string" />
<xsd:element name="AddressLine4" type="xsd:string" />
<xsd:element name="City" type="xsd:string" />
<xsd:element name="StateProvince" type="xsd:string" />
<xsd:element name="PostalCode" type="xsd:string" />
...
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getRequest">
<wsdl:part name="body" element="p2:AddrRequest"/>
</wsdl:message>
<wsdl:message name="returnResponse">
<wsdl:part name="body" element="p2:AddrResponse"/>
</wsdl:message>
<wsdl:portType name="MI_Request_To_Grp1PortType">
<wsdl:operation name="MI_Request_To_Grp1">
<wsdl:input message="p1:getRequest"/>
<wsdl:output message="p1:returnResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MI_Request_To_Grp1Binding" type="p1:MI_Request_To_Grp1PortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="MI_Request_To_Grp1">
<soap:operation style="document" soapAction="http://someservicehere.com/soap1.1"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BusService_Grp1AddrVal_WebService">
<wsdl:port name="MI_Request_To_Grp1Port" binding="p1:MI_Request_To_Grp1Binding">
<soap:address location="http://me.com"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
wstools successfully generates the java files for the 2 objects, the service and remote interfaces. however, the debug logging shows the following similar errors:
org.jboss.ws.tools.helpers.MappingFileGeneratorHelper:getJavaTypeAsString:758 - Typemapping lookup failed for {urn:grainger-com:xi:addrval_webservice:types}AddrRequest
org.jboss.ws.tools.helpers.MappingFileGeneratorHelper:getJavaTypeAsString:759 - Falling back to identifier generation
org.jboss.ws.tools.helpers.MappingFileGeneratorHelper:getJavaTypeAsString:758 - Typemapping lookup failed for {urn:grainger-com:xi:addrval_webservice:types}AddrResponse
org.jboss.ws.tools.helpers.MappingFileGeneratorHelper:getJavaTypeAsString:759 - Falling back to identifier generation
although i have used wstools to generate the java classes, i am not using the JBoss generated jaxrpc-mapping.xml to create the service instance. the following is my java code:
ServiceFactoryImpl factory = new ServiceFactoryImpl();
QName namespace = new QName("urn:me-com:xi:addrval_webservice", "BusService_Grp1AddrVal_WebService");
ServiceImpl service = null;
try {
service = (ServiceImpl) factory.createService(this.getURL(wsdlLocation), namespace);
} catch (ServiceException sex) {
// whoops
}
return service;
it appears that the JBoss api cannot successfully find the elements from the messages. why would that be?
i have validated my wsdl vs. the w3c specifications (or at least i think i have) and the wsdl can successfully hit the service via XmlSpy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042426#4042426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042426
17 years, 2 months
[JBossCache] - Object is not replicated after field update
by AdrianAisemberg
Hi,
I'm testing PojoCache with a cluster, on a windows system.
After configuring everything, my cluster members receive replications.
When i update an object's field, the changes are not replicated.
For example:
| SimpleObject obj = new SimpleObject();
| obj.setNumber(1);
| cache.putObject("/simpleObject", obj);
| obj.setNumber(2); //Should replicate here???
|
| SimpleObject cachedObj = (SimpleObject)get("/simpleObject");
| cachedObj.getNumber(); //returns 2 on my machine, but 1 on other machines.
|
When accessing the object from cluster members, i get the value of 1 on the number field, when accessing the same object from the machine that made the change, i get the value of 2.
So, replication does work, otherwise, i would get null when accessing the node from other cluster members.
But why doesn't it replicate the changes?
Thanks.
Adrian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042420#4042420
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042420
17 years, 2 months