[jboss-user] [jBPM] - Invoking web service from an ExternalActivityBehaviour

HuiSheng Xu do-not-reply at jboss.com
Thu Jun 17 21:06:58 EDT 2010


HuiSheng Xu [http://community.jboss.org/people/rebody] replied to the discussion

"Invoking web service from an ExternalActivityBehaviour"

To view the discussion, visit: http://community.jboss.org/message/548613#548613

--------------------------------------------------------------
Hi Stephane,

Do you mean that when you run a process and in a acitivity, it will use a webservice to do some request. But jaxws cannot find the webservice interface class?

Because you packed externalActivityBehaviour and ws classes into .bar,  when the process ran,  jbpm4 will load these classes from database.  At this time, jbpm4 will use a specified classloader to find these classes.  And seems jaxws cannot find these classes,  so I guess jaxws cannot get the jbpm4's classloader.

I don't know much about jaxws,  If it could re-use threadContextClassLoader to find the class,  we could re-configure current thread contextClassLoader in the externalActivityBehaviour.  like this:

ClassLoader original = Thread.currentThread().getContextClassLoader();
try {
  Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
  // do ws
} finally {
  Thread.currentThread().setContextClassLoader(original);
}


But if jaxws couldnot re-use contextClassLoader, I am afraid you should find a way to let jaxws access the jbpm4 deployclassloader to achieve that.

And Good Luck.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/548613#548613]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100617/6bf90ed1/attachment.html 


More information about the jboss-user mailing list