[jBPM] - Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'.
by Ted Pan
Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion
"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."
To view the discussion, visit: https://community.jboss.org/message/774673#774673
--------------------------------------------------------------
you need to add the user to takservice by using the following code
|
|
|
| Properties userGroups = new Properties(); |
|
|
|
| userGroups.setProperty("john", "user"); |
|
|
|
| UserGroupCallbackManager manager = UserGroupCallbackManager.getInstance(); |
|
|
|
| manager.setCallback(new DefaultUserGroupCallbackImpl(userGroups)); |
*or* implement a an UserGroupCallback. Then
UserGroupCallbackManager manager = UserGroupCallbackManager
.getInstance();
if (!manager.existsCallback()) {
UserGroupCallback userGroupCallback = new JBPMUserGroupCallback();
manager.setCallback(userGroupCallback);
}
this is the callback implementation:
public class JBPMUserGroupCallback implements UserGroupCallback {
@Override
public boolean existsGroup(String groupId) {
return true;
}
@Override
public boolean existsUser(String userId) {
return true;
}
@Override
public List<String> getGroupsForUser(String userId, List<String> groupIds,
List<String> allExistingGroupIds) {
if(groupIds != null) {
List<String> retList = new ArrayList<String>(groupIds);
// merge all groups
if(allExistingGroupIds != null) {
for(String grp : allExistingGroupIds) {
if(!retList.contains(grp)) {
retList.add(grp);
}
}
}
return retList;
} else {
//
// return empty list by default
//please note: there are different return value for different version of jPBM
//List<String> retList = new ArrayList<String>();
//retList.add("user");
//return retList;
//return new ArrayList<String>(); //for jBPM5.3.0.Final
return null; //for jBPM5.4.0.CR1
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774673#774673]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[IronJacamar] - JCA Spec violation using resource-adapter in JBoss 7?
by jleinawe
jleinawe [https://community.jboss.org/people/jleinawe] created the discussion
"JCA Spec violation using resource-adapter in JBoss 7?"
To view the discussion, visit: https://community.jboss.org/message/799730#799730
--------------------------------------------------------------
JBoss AS 7.1.1.Final-SNAPSHOT
JBoss IronJacamar 1.0.8.Final
Testing a JMS resource-adapter deployed to JBoss which will use WebLogic as the JMS provider. In a transacted MDB test, this error appears in the JBoss log (which is attached) when the MDB tries to send and outbound reply message
11:18:24,023 ERROR [stderr] (default-short-running-threads-threads - 1) javax.transaction.xa.XAException: J2EE GJRA-01501: cause = Attempt to start a transaction while in an active (global or local) transaction.; action = Complete current transaction before starting another
By analysis our RA's own tracing, this looks like a JCA spec violation. xaResourceWrapper2 (the XAResource for managedConnectionImpl0) is being enlisted with xid3. Then without delisting xaResourceWrapper2, jboss is doing a managedConnectionImpl0.cleanup() call (which is a JCA spec violation). Then later when it tries to enlist xaResourceWrapper2 with xid5, that fails because xaResourceWrapper2 is still enlisted with xid3. (That enlistment attempt is not even getting to WebLogic JMS because the RA is detecting the XA protocol violation.)
Excerpts from log:
out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #4 @1361560688075..1361560688295
in:xaResourceWrapper0.setTransactionTimeout(300) -> true #4 @1361560688102..1361560688173
out:XAResource.setTransactionTimeout(300) -> true #4 @1361560688126..1361560688155
in:xaResourceWrapper0.start(xid3,0) #4 @1361560688191..1361560688277 [TMNOFLAGS]
out:XAResource.start(xid3,0) #4 @1361560688223..1361560688260 [TMNOFLAGS]
[...]
out:MessageListener.onMessage(genericStreamMessage0) #1 @1361560697008..1361560702586
in:wlxaQueueConnectionFactory0.createConnection() -> wlConnection0 #1 @1361560698037..1361560700740
out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) -> wlConnection0 #1 @1361560698093..1361560700687
[...]
*in:managedConnectionImpl0.getXAResource() -> xaResourceWrapper2* #1 @1361560699619..1361560699675
[...]
*in:xaResourceWrapper2.start(xid3,2097152)* #6 @1361560700092..1361560700275 [TMJOIN]
out:XAResource.start(xid3,2097152) #6 @1361560700157..1361560700226 [TMJOIN]
[...]
out:MessageEndpoint.afterDelivery() #4 @1361560702595..1361560702930
in:xaResourceWrapper0.end(xid3,67108864) #4 @1361560702612..1361560702709 [TMSUCCESS]
out:XAResource.end(xid3,67108864) #5 @1361560702649..1361560702688 [TMSUCCESS]
in:xaResourceWrapper0.commit(xid3,true) #4 @1361560702729..1361560702851
out:XAResource.commit(xid3,true) #4 @1361560702766..1361560702830
i*n:managedConnectionImpl0.cleanup()* #1 @1361560702871..1361560702904 [JCA spec violation]
out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #6 @1361560702938..1361560703159
[...]
out:MessageConsumer.receive(15000) -> TextMessage[ID:<384827.1361560696991.0>, null] #6 @1361560703168..1361560703201
out:MessageListener.onMessage(genericTextMessage0) #2 @1361560703226..1361560704964
in:wlxaQueueConnectionFactory0.createConnection() threw #2 @1361560703250..1361560704672
out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) threw #2 @1361560703307..1361560704447
[...]
i*n:xaResourceWrapper2.start(xid5,2097152) threw* #8 @1361560703786..1361560703871 [TMJOIN]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799730#799730]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[Beginner's Corner] - Problem with connection factories
by kevin allan
kevin allan [https://community.jboss.org/people/keallan] created the discussion
"Problem with connection factories"
To view the discussion, visit: https://community.jboss.org/message/799991#799991
--------------------------------------------------------------
Hi All-
Newbie here. I've run into a situation while running jBoss 5.1. Not even sure where to start. I can't seem to resolve a connection issue. I get errors for both Tx connection factory component (jms-ds.xml) and errors pertaining to the messaging component (connection-factories-service.xml). I did a search for both and can access them. In going to the jBoss AS Admin Console, it shows under "connection factories" that the "jmsXA" connection factory is "down" and unavailable". Also that JMS destination queues are "down" and "unavailable". I suspect the latter is a result of the former. I've been trying to run this down for weeks and need some help.
Many thanks for contructive input.
Here is an error log from the connection factories:
1. java.lang.reflect.UndeclaredThrowableException: Failed to invoke method 'listStatistics' on component 'jboss.jca:name=JmsXA,service=ManagedConnectionPool' with parameters [].
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:201)
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:69)
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.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aop.generatedproxies.AOPProxy$0.invoke(AOPProxy$0.java)
at org.jboss.profileservice.management.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:64)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:159)
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:482)
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:619)
Caused by: java.lang.IllegalArgumentException: No such context: jboss.jca:name=JmsXA,service=ManagedConnectionPool
at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:51)
at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.invoke(BasicKernelBus.java:92)
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:186)
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:69)
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.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aop.generatedproxies.AOPProxy$0.invoke(AOPProxy$0.java)
at org.jboss.profileservice.management.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:64)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:159)
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:482)
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:619)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
... 18 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799991#799991]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[jBPM] - jBPM5 - Can't Scale, Won't Scale
by M Arnold
M Arnold [https://community.jboss.org/people/m_arnold123] created the discussion
"jBPM5 - Can't Scale, Won't Scale"
To view the discussion, visit: https://community.jboss.org/message/771731#771731
--------------------------------------------------------------
Hi,
I'm having great trouble designing an application which uses jBPM5 in a scalable way. It seems to be impossible on a practical level. I hope that this is just due to my misunderstandings of the way the jBPM5 works.
I have listed each of my assumptions, and the ramifications of each below. I hope that someone from the community will be able to point out where these assumptions are incorrect.
I would particularly appreciate it if anyone has managed to scale jBPM5, and could described how they achieved it.
1. Everytime jBPM5 executes a process the database transaction updates the process instance info AND the session info, therefore:
1a. it's not scalable to use a single session to execute all processes, or you would suffer contention on the session info.
1b, it's not scalable to use a single session to execute all processes in a cluster, or the updated session info would have to be continually synchronised across the cluster.
2. When using BPMN2 events, jBPM5 only allows you to send events to the process instances within a single session at a time. You need to maintain a list of all the sessions which have incompleted process instances(*), and loop through them all to send events. Therefore:
2a. you should execute all processes in as few sessions as possible, to lessen the number of iterations through this loop.
3. jBPM5 persists BPMN2 timer info in the session info, but the session must be active (ie. loaded from persistence) in order for the timers to activate. Therefore:
3a. when your application starts, you must load all sessions that have active process instances that have timers(**).
3b. you must not have the same session active in two different nodes of a cluster, or the same timers will expire around the same time
3c. when a node crashes, your application must detect this and reload the sessions that were active in the crashed node
4. If you start a process instance in a session, that process instance must always be executed in that session.
4a. when a node wishes to resume a process instance that was persisted, it must first (due to 3b) ask all other nodes if they have the session active, and if so instruct them to dispose it. It can then load the session, load and resume the process. All while preventing race conditions.
4b. when a node receives an event it must (due to 2) carry out all the processing in 4a for each session with active process instances.
(*) I don't think it's possible to know if a session has incompleted process instances..?
(**) I don't think it's possible to know if a session and timers..?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/771731#771731]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months