[Beginner's Corner] - Re: invoking an EJB over iiop
by Juergen Weber
Juergen Weber [http://community.jboss.org/people/weberj] created the discussion
"Re: invoking an EJB over iiop"
To view the discussion, visit: http://community.jboss.org/message/625502#625502
--------------------------------------------------------------
Got it working with JBoss 5.1, using an environment of
com.sun.jndi.cosnaming.CNCtxFactory
and
corbaloc::localhost:3528/JBoss/Naming/root
but you have to set the RMISecurityManager and the policy given above.
I tried in vain to set a more specific Permission than java.security.AllPermission
Anyway, calling an EJB is useful from within JBoss if you want to call EJBs in another JBoss server with different version.
Strange is, even for the client (in JBoss) you need the all configuration, else there is
java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.proxy.compiler.IIOPStubCompiler
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:534)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:428)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:98)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1229)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.corba.se.impl.util.JDKClassLoader.loadClass(JDKClassLoader.java:81)
at com.sun.corba.se.impl.util.JDKBridge.loadClassM(JDKBridge.java:166)
at com.sun.corba.se.impl.util.JDKBridge.loadClass(JDKBridge.java:70)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.loadClass(Util.java:572)
at javax.rmi.CORBA.Util.loadClass(Util.java:235)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625502#625502]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - jBPM5 - Using as a state machine in clustered spring application with a dashboard
by Narayan Singh
Narayan Singh [http://community.jboss.org/people/narayans] created the discussion
"jBPM5 - Using as a state machine in clustered spring application with a dashboard"
To view the discussion, visit: http://community.jboss.org/message/595120#595120
--------------------------------------------------------------
We're currently investigating to use BPM as a workflow/state machine for process orchestration in a very high volume clustered environment. Orchestration component is Spring application which sends and receives events from other component over MQ/REST and basically events decides process state transition.
Here are some basic requirements for the Orchestration component we have and so far my observations with jBPM5 -
1. Clustering and Server deployment - Multiple instances of orchestration component are deployed to the cluster, hence the process state is maintained across cluster and server instances can drop and join the cluster any time.
Observation: If I use drools-spring to boot-strap my jBPM5 engine then I got 2 options - a) create new session or b) load existing session. But to load existing session I need to specify session id. In other words, I would need to write custom code upfront to decide whether I want to create new session or load existing one based on some thing, and this code needs to be cluster-safe as multiple instances starting up at the same time.
So do you agree we cant use any out-of-the box solution here and one have to write custom boot-strap code?
2. Dashboard support - We have our own platform-wide Dashboard and we want to add process state information to it, ideally using REST interface provided by jBPM. So we're not using any of jBPM console apps provided out-of-the-box.
Observation: currently jBPM console functionality is consists of JBoss BPM modules(ex. org.jboss.bpm:gwt-console-server etc) hooked in with jBPM integration services as provided in jbpm-gwt-xxx modules. we cant use it out-of-the box because -
1/ some of the jbpm-gwt-xxx modules have got persistence.xml with hard-wired H2 database details
2/ they are tightly coupled with Human-task and Guvonor, however in our case we are bundling all our processes as part of the application and not using any WS-HT either. In other words state transition of our process is driven by the events.
So as I understand we would need to build our version of "org.jboss.bpm:gwt-console-server" bundled with custom services to expose REST api to be used by dashboard. Would Knowledge api be used to extract current state from the database or am I missing something here?
3. Persistence - As I understand there are 2 forms of it - runtime state and auditing. Auditing is mainly pluggable using various listeners, and there are some out-of the box audit loggers available. For Runtime state, which is core part of jBPM5, I only see 3 entities -
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
Observation: Runtime state is stored in binary form and there is no relationship between tables, so merely looking at tables not able to say which process part of which session. So one has to use knowledgeSession to extract the information.
I see loads of potential in jBPM5 and believe it could be used in our case. I would really appreciate any directions here to understand how it can solve our requirements as pointed out above?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/595120#595120]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - jBPM5 on AS7 - human task exception
by Jim Dwyer
Jim Dwyer [http://community.jboss.org/people/JimDwyer] created the discussion
"jBPM5 on AS7 - human task exception"
To view the discussion, visit: http://community.jboss.org/message/625624#625624
--------------------------------------------------------------
Got these exceptions after following these instructions: http://kverlaen.blogspot.com/2011/07/jbpm5-on-as7-lightning.html http://kverlaen.blogspot.com/2011/07/jbpm5-on-as7-lightning.html
Anybody know the answer to this? I have seen references on the web about this problem but don't see the solution.
| http://localhost:8080/jbpm-console/app/clear.cache.gif (http://localhost:8080/jbpm-console/app/clear.cache.gif) |
| * URL: 'http://localhost:8080/gwt-console-server/rs/process/definitions'
* Action: 'org.jboss.bpm.console.client.process.UpdateHistoryDefinitionsAction'
* Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500: h1. HTTP Status 500 -
----
*type* Exception report
*message*
*description* The server encountered an internal error () that prevented it from fulfilling this request.
*exception*
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not connect task client
org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
*root cause*
java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not connect task client
org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:185)
org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
*root cause*
java.lang.IllegalArgumentException: Could not connect task client
org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler.connect(CommandBasedWSHumanTaskHandler.java:88)
org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:181)
org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
|
| |
| |
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625624#625624]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Re: JBPM5 Content data problem
by S Root
S Root [http://community.jboss.org/people/sroot] created the discussion
"Re: JBPM5 Content data problem"
To view the discussion, visit: http://community.jboss.org/message/625611#625611
--------------------------------------------------------------
Thanks for responding.
Process def attached to oringal post above.
My problem is even before I call taskClient.complete.
Its at the point where I retreive the Content and need to display data to the user. At that point content.getContent() I expect to return a byte array of type Map, but it is always String. It does have my Map key/value pairings and the values may themselves be another Map or even a List
This is how I get the Content:
**public** Content getContentForTask(**Task task**) {
long documentContentId = task.getTaskData().getDocumentContentId();BlockingGetContentResponseHandler getContentResponseHandler =
**new** BlockingGetContentResponseHandler();
taskClient.getContent(documentContentId, getContentResponseHandler);
**return** getContentResponseHandler.getContent();}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625611#625611]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - JBPM5 Content data problem
by S Root
S Root [http://community.jboss.org/people/sroot] created the discussion
"JBPM5 Content data problem"
To view the discussion, visit: http://community.jboss.org/message/625599#625599
--------------------------------------------------------------
Hi all!
I was wondering if someone might be able to assist with this.
I have a process with a custom task and User Task,
I have Map and couple of Strings def
ined as process variables.
When the process goes to human task, and I retrieve
the Content for the Task via the TaskClient using Mina, I am unable to restore the Map. I found the following in the HumanTaskExample and it is exactly what I was doing
Content content = getContentResponseHandler.getContent();
ByteArrayInputStream bis = new ByteArrayInputStream(content.getContent());
ObjectInputStream in;
in = newObjectInputStream(bis);
Object result = in.readObject();
in.close();
Map<?, ?> map = (Map<?, ?>) result;
The problem is that "result" at this point is seen as a java.lang.String. All of my data is there when I print it out but I am unable to cast it back to a map. My process variable Map is being set when I complete the previous workitem
Am I missing something here? Looking at the JBPM source and examples it seems like this should work.
I'd appreciate all input, thanks.
-Scott.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625599#625599]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months