[JBoss Web Services] - Request timeout - JAXWS
by klind
klind [https://community.jboss.org/people/klind] created the discussion
"Request timeout - JAXWS"
To view the discussion, visit: https://community.jboss.org/message/819176#819176
--------------------------------------------------------------
Hi, I am trying to set the connect timeout and request time out on a webservice request..
public static ProfitWebService getProfitService(final String url) throws MalformedURLException {
QName qname = new QName(ProfitWebService.WS_TARGET_NAMESPACE, ProfitWebService.WS_NAME);
QName ProfitWebServicePort = new QName(ProfitWebService.WS_TARGET_NAMESPACE, ProfitWebService.WS_PORT);
URL wsdlURL = new URL(url + WSDL);
// This is not working....
try {
URLConnection openConnection = wsdlURL.openConnection();
openConnection.setConnectTimeout(Configuration.PROFIT_CONNECT_TIMEOUT*1000);
openConnection.setReadTimeout(Configuration.PROFIT_REQUEST_TIMEOUT*1000);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Service service = Service.create(wsdlURL, qname);
ProfitWebService port = service.getPort(ProfitWebServicePort, ProfitWebService.class);
// This is not working....
BindingProvider binding = (javax.xml.ws.BindingProvider)port;
Map<String, Object> requestContext = binding.getRequestContext();
requestContext.put(BindingProviderProperties.CONNECT_TIMEOUT, Configuration.PROFIT_CONNECT_TIMEOUT*1000);
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, Configuration.PROFIT_REQUEST_TIMEOUT*1000);
// This is not working....
requestContext.put("com.sun.xml.internal.ws.request.timeout", Configuration.PROFIT_REQUEST_TIMEOUT*1000);
return port;
}
But I cant get anything to work.
In the webservice I sleep for a longer period that the request timeout... but no timeout is happening..
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/819176#819176]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months
[Beginner's Corner] - java.lang.ClassNotFoundException deploying war on JBoss 5.1
by cattox
cattox [https://community.jboss.org/people/cattox] created the discussion
"java.lang.ClassNotFoundException deploying war on JBoss 5.1"
To view the discussion, visit: https://community.jboss.org/message/819098#819098
--------------------------------------------------------------
Hi all,
I'm getting an exception while deploying a war on JBoss 1.5.
The exception is java.lang.ClassNotFoundException for org.apache.activemq.spring.ActiveMQConnectionFactory from BaseClassLoader.
>From what I know this is related to messaging services, but I'm not using any of these in my war file.
Help please! :(
the complete stack trace follows:
2013-05-23 09:26:57,487 INFO [org.jboss.profileservice.management.upload.remoting.DeployHandler] (ResourceContainer.invoker.nonDaemon-2) Begin start, [vfszip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/]
2013-05-23 09:27:12,779 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (ResourceContainer.invoker.no2) Error installing to PostClassLoader: name=vfszip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/ statoader mode=Manual requiredState=PostClassLoader
org.jboss.deployers.spi.DeploymentException: Cannot process metadata
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:210)
at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:122)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:324)
at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:238
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:2070)
at org.jboss.remoting.Client.invoke(Client.java:879)
at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.ja
at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.jav
at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)
at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:136)
at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.activemq.spring.ActiveMQConnectionFact BaseClassLoader@5b20c8c6{vfszip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/}
at org.jboss.deployers.plugins.annotations.WeakClassLoaderHolder.loadClass(WeakClassLoaderHolder.java:76)
at org.jboss.deployers.plugins.annotations.AbstractElement.getOwner(AbstractElement.java:73)
at org.jboss.deployment.OptAnnotationMetaDataDeployer.getClasses(OptAnnotationMetaDataDeployer.java:198)
at org.jboss.deployment.OptAnnotationMetaDataDeployer.processJBossWebMetaData(OptAnnotationMetaDataDeployer.java:9
at org.jboss.deployment.OptAnnotationMetaDataDeployer.processMetaData(OptAnnotationMetaDataDeployer.java:70)
at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:206)
... 37 more
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.spring.ActiveMQConnectionFactory from BaseClassLoader@5b2szip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:477)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jboss.deployers.plugins.annotations.WeakClassLoaderHolder.loadClass(WeakClassLoaderHolder.java:72)
... 42 more
2013-05-23 09:27:12,804 INFO [org.jboss.profileservice.management.upload.remoting.DeployHandlemon-2) Failed to complete command: [start] for deployment: names=[vfszip:/data/jboss-ewp-5.1/...
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployment
*** DEPLOYMENTS IN ERROR: Name -> Error
vfszip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/ -> org.jboss.deployer ocess metadata
DEPLOYMENTS IN ERROR:
Deployment "vfszip:/data/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/" is in : java.lang.ClassNotFoundException: org.apache.activemq.spring.ActiveMQConnectionFactory from a/jboss-ewp-5.1/jboss-as-web/server/default/deploy/[myproject].war/}
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.jav
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.jav
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.ja
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete
at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(Abs
at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(Ab
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.jav
at org.jboss.remoting.Client.invoke(Client.java:2070)
at org.jboss.remoting.Client.invoke(Client.java:879)
at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(
at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(S
at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(Depl
at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(Deploy
at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:136)
at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(Abstrac )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2
at java.lang.reflect.Method.invoke(Method.java:597)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(Resource
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/819098#819098]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months
[jBPM] - Re: JEE + jBPM + threads
by Maciej Swiderski
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: JEE + jBPM + threads"
To view the discussion, visit: https://community.jboss.org/message/819008#819008
--------------------------------------------------------------
First of all process instances are not kept in memory if they are not actually executed. Meaning when process instance is in wait state (e.g. human task, timer, etc) process instance will be removed from the ksession and stored only in db. Whenever it's needed it will be loaded and executed - for example when timer fires it will load the process instance and execute it.
Although in jbpm 5.x timers are managed on session level so they will be fired as long as session is active. If you dispose session then timer will not fire at the right time but when you load the session all overdue timers will be fired then.
Moreover each session will have a dedicated ThreadPool for timers with single thread in it by default.
Looking at what you have implemented (ejb timers) I don't see a point of having timers in the process if you are not using them. Since you manage timer on your own you could use only signal events instead, so when ejb timer fires you send signal to process instance to continue processing.
With version 6 it will be possible to have more advanced timers and session management where you could externalize timer management for example to quartz (out of the box support).
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/819008#819008]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months