[JBoss Web Services] - Performance Issues with ?wsdl
by spyhunter99
spyhunter99 [https://community.jboss.org/people/spyhunter99] created the discussion
"Performance Issues with ?wsdl"
To view the discussion, visit: https://community.jboss.org/message/758131#758131
--------------------------------------------------------------
Jboss 5.1.0GA, JbossWS native 3.4.0
also present in Jboss 5.1.2 eap with JbossWS native 3.1.2sp13
I've been noticing that each time something requests the wsdl from my web service endpoint, there is a huge spike in CPU usage on the server. Upon further investigation, I checked out the class definition for the service
@WebService(serviceName="service1", name="service1", targetNamespace="urn:service1")
public class Service1Impl
{
//stuff
}
and then compared the wsdl presented by Jbossws with the one I had started with (top down) and they were different so I'm assuming that in this case, JbossWS generates a wsdl on the fly using reflection. The problem is that this is on every request. This probably should be cached somehow.
Continuing the investigation, I tried adding the wsdlLocation parameter to the class and deployed.
@WebService(serviceName="service1", name="service1", targetNamespace="urn:service1", wsdlLocation="WEB-INF/wsdl/my.wsdl")
public class Service1Impl
{
//stuff
}
The ?wsdl url now returns the same wsdl that I had created from the top down approach, which is good, however I'm still getting a significant delay when loading the ?wsdl endpoint and high CPU usage when pressing refresh a bunch of times. I'm not sure what's happening, but there should be no to little delay for this after the first time the wsdl is presented. It seems clear that there is no caching mechanism.
Question 1: how can I reduce the CPU usage and delay for returning the service?wsdl endpoint?
Question 2: is there a way to disable the auto generation of ?wsdl url and replace it with something else?
Question 3: is there any kind of cache mechanism that exists to resolve this?
Question 4: does the cxf stack provide any way to resolve this?
A few notes: all supporting files (i.e. imports) MUST be in WEB-INF/wsdl), if placed anywhere else, deployment tends to fail. My web service is actually a seperate jar bundled within a WAR file and thus the wsdl/xsd files must bein the WAR's WEB-INF/wsdl folder.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758131#758131]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 1 month
[jBPM] - which JMS based human task work item handler need to use ?
by vinayak Bhadage
vinayak Bhadage [https://community.jboss.org/people/vinayakpict] created the discussion
"which JMS based human task work item handler need to use ?"
To view the discussion, visit: https://community.jboss.org/message/810199#810199
--------------------------------------------------------------
hi,
I want to user JMSTaskServer as transporter between JBPM 5.4 process engine and TaskClient.
Serever is initilized as:
Properties serverProperties = new Properties();
serverProperties.setProperty("JMSTaskServer.connectionFactory", "ConnectionFactory");
serverProperties.setProperty("JMSTaskServer.transacted", "true");
serverProperties.setProperty("JMSTaskServer.acknowledgeMode", "AUTO_ACKNOWLEDGE");
serverProperties.setProperty("JMSTaskServer.queueName", "tasksQueue");
serverProperties.setProperty("JMSTaskServer.responseQueueName", "tasksResponseQueue");
try {
this.server = new JMSTaskServer(taskService, serverProperties, new InitialContext());
} catch (NamingException e1) {
e1.printStackTrace();
}
thread = new Thread(server);
thread.start();
The Task client for JMS is as :
public static TaskService getTaskClient() {
Properties clientProperties = new Properties();
clientProperties.setProperty("JMSTaskClient.connectionFactory", "ConnectionFactory");
clientProperties.setProperty("JMSTaskClient.transactedQueue", "true");
clientProperties.setProperty("JMSTaskClient.acknowledgeMode", "AUTO_ACKNOWLEDGE");
clientProperties.setProperty("JMSTaskClient.queueName", "tasksQueue");
clientProperties.setProperty("JMSTaskClient.responseQueueName", "tasksResponseQueue");
TaskService client = null;
try {
client = new SyncTaskServiceWrapper(new TaskClient(new JMSTaskClientConnector( UUID.randomUUID().toString() + "WSThroughJMSHumanTaskHandler" , new JMSTaskClientHandler(
SystemEventListenerFactory.getSystemEventListener()), clientProperties, new InitialContext())));
} catch (NamingException e) {
e.printStackTrace();
}
return client;
}
When I do the TaskSummary look up it works fine.
But when i start the new process instance which having human task it fails.
so which human task work item handler need to use.
I have tried below but does not work
CommandBasedHornetQWSHumanTaskHandler wsHumanTaskHandler = new CommandBasedHornetQWSHumanTaskHandler(knowledgeSession);
wsHumanTaskHandler.setClient(getTaskClientInstance());
wsHumanTaskHandler.setConnection("127.0.0.1", 5445);
knowledgeSession.getWorkItemManager().registerWorkItemHandler("Human Task", wsHumanTaskHandler);
This is CommandBasedHornetQWSHumanTaskHandler deprecated class but I have no clue which one need use.
It is giving following error :
Caused by: java.lang.RuntimeException: Error creating message
at org.jbpm.task.service.jms.JMSTaskClientConnector.write(JMSTaskClientConnector.java:152) [jbpm-human-task-jms-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskClient.registerForEvent(TaskClient.java:623) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler.connect(CommandBasedHornetQWSHumanTaskHandler.java:103) [jbpm-human-tas
k-hornetq-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler.executeWorkItem(CommandBasedHornetQWSHumanTaskHandler.java:111) [jbpm-h
uman-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5
.5.0.Final.jar:5.5.0.Final]
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
... 42 more
Caused by: java.lang.NullPointerException
at org.jbpm.task.service.jms.JMSTaskClientConnector.write(JMSTaskClientConnector.java:126) [jbpm-human-task-jms-5.4.0.Final.jar:5.4.0.Final]
... 48 more
Please help me ....
Thanks & regards,
-vinayak
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810199#810199]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 1 month
[EJB3] - Size limit on Remote EJB Calls
by Justin Hayes
Justin Hayes [https://community.jboss.org/people/justinhayes] created the discussion
"Size limit on Remote EJB Calls"
To view the discussion, visit: https://community.jboss.org/message/787159#787159
--------------------------------------------------------------
I have a SLSB that I invoke remotely and there appears to be a limit on how large the argument I can pass in a method call is. I'm using EAP 6.0.1 (jboss as 7.1.2 Final) and deploying my ejb as part of an ear. My client runs in a separete JVM and uses jboss-ejb-client 1.0.5.Final.
EJB3 interface:
public String ingest(NATLog[] values);
EJB3 impl:
@Override
public String ingest(NATLog[] values) {
//do something
}
NATLog is a simple POJO with 11 String member variables. The total size of one of these fully populated is about 300 bytes.
When I use an array up to about 150 NATLog objects, the EJB call works fine. When I pass in an array of 200 NATLog objects, the EJB call just hangs. And when I finally kill the client via ctrl-c, I get the following error message in the server's console.
15:49:56,740 ERROR [org.jboss.as.ejb3] (Remoting "cirries-3001" task-1) JBAS014248: Exception on channel Channel ID 699cd0be (inbound) of Remoting connection 58f368dc to null from message org.jboss.remoting3.remote.InboundMessage$3@41c61c91: org.jboss.remoting3.MessageCancelledException
at org.xnio.streams.BufferPipeInputStream.checkFailure(BufferPipeInputStream.java:280) [xnio-api-3.0.7.GA-redhat-1.jar:3.0.7.GA-redhat-1]
at org.xnio.streams.BufferPipeInputStream.read(BufferPipeInputStream.java:125) [xnio-api-3.0.7.GA-redhat-1.jar:3.0.7.GA-redhat-1]
at org.jboss.remoting3.remote.InboundMessage$3.read(InboundMessage.java:122) [jboss-remoting-3.2.14.GA-redhat-1.jar:3.2.14.GA-redhat-1]
at java.io.DataInputStream.readByte(DataInputStream.java:265) [rt.jar:1.6.0_24]
at org.jboss.as.ejb3.remote.protocol.versionone.AbstractMessageHandler$2.read(AbstractMessageHandler.java:249)
at java.io.InputStream.read(InputStream.java:170) [rt.jar:1.6.0_24]
at java.io.FilterInputStream.read(FilterInputStream.java:133) [rt.jar:1.6.0_24]
at org.jboss.marshalling.SimpleDataInput.read(SimpleDataInput.java:92) [jboss-marshalling-1.3.15.GA-redhat-1.jar:1.3.15.GA-redhat-1]
at org.jboss.marshalling.UTFUtils.readUTFBytes(UTFUtils.java:155) [jboss-marshalling-1.3.15.GA-redhat-1.jar:1.3.15.GA-redhat-1]
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:281)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37) [jboss-marshalling-1.3.15.GA-redhat-1.jar:1.3.15.GA-redhat-1]
at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.processMessage(MethodInvocationMessageHandler.java:162)
at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.handleMessage(VersionOneProtocolChannelReceiver.java:180)
at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:435) [jboss-remoting-3.2.14.GA-redhat-1.jar:3.2.14.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: an exception which occurred:
in field origIP
in object of type org.jboss.tusk.juniper.ispn.NATLog
in element at index [107] of size [200]
1. Is there a size limit for the data passed in via remote EJB3 calls?
2. Are there any settings I can do in JBoss to tune the behavior with regard to EJB calls?
Thanks,
Justin
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/787159#787159]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 1 month