[JBoss Cache Development] - Using JBoss Cache Across Clusters
by Craig Simpson
Craig Simpson [http://community.jboss.org/people/servosimpson] created the discussion
"Using JBoss Cache Across Clusters"
To view the discussion, visit: http://community.jboss.org/message/539280#539280
--------------------------------------------------------------
Using JBoss AS 4.2.3 and JBoss Cache 1.4.1
I have 4 servers. 3 are clustered together to host a web application. The 4th is a dedicated EJB to process batch requests from the three other servers. I need the 4th server to be able to access the cache that is used/modified by the web app on the other servers.
The admin is telling me that if he adds the 4th server to the cluster, then the EJB will be put on the other 3 machines and the web app will be put on the EJB server. I don't want this. I've been trying to find a way for the EJB to access the cache without having to join the cluster. I've creating a second cluster to host the EJB and tweaked the replSync-service.xml on both so that they are the same, but I can't get them to share the cache.
I've tried to find doc on this, but have been unable to do so.
So my two questions are: Can the cache replicate across clusters? If not, can the cluster be configured so that 3 nodes have only the web app and the 4th node has only the EJB.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539280#539280]
Start a new discussion in JBoss Cache Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[jBPM] - Conditional Transitions (jBPM 3.3.1GA)
by Edward Mallia
Edward Mallia [http://community.jboss.org/people/edmallia] created the discussion
"Conditional Transitions (jBPM 3.3.1GA)"
To view the discussion, visit: http://community.jboss.org/message/539271#539271
--------------------------------------------------------------
Hi all,
I have a node with three outgoing conditional transitions. The idea is that by firing one event, jBPM will transition to the appropriate state based on the conditions applied to the transitions.
However this is not happening. jBPM picks up the first transition with the given name, checks the condition on it, and if condition evaluates to false it throws an exception (+Exception in thread "main" org.jbpm.JbpmException: transition condition #{ ... } evaluated to 'false'+) and aborts the transition.
For example,
I have the following states,
** state A transitions to state B on event X if (var == foo)
** state A transitions to state C on event X if (var == bar)
** state A transitions to state D on event X if (var == foobar)
If I fire event X (and var = foobar), jBPM will only pick up the transition going to state B and fail because var != foo
Why is this so and is there a way around it?
Thanks
Ed
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539271#539271]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[jBPM] - one of the ways to integrate JPA/Spring with jBPM
by O S
O S [http://community.jboss.org/people/gelos] created the discussion
"one of the ways to integrate JPA/Spring with jBPM"
To view the discussion, visit: http://community.jboss.org/message/539262#539262
--------------------------------------------------------------
I tried to research this before on this forum and I don't think that there is a consensus on how to make jBPM to work seamlessly with JPA/Spring
We implemented an approach that works for us and I figured I will describe it here and see if there is any feedback from the community
thanks,
gelos
----------------------------------------------------------------------------------
- problem overview
- when JPA/Spring is used the desire is to make jBPM to join JPA transactions seamlessly
- the issue boils down to Hibernate sessions - how to inject sessions managed by Spring to jBPM
- Spring manages EntityManagerFactory and EntityManager objects and a common approach (which we use) is to use @PersistenceContext() annotation in DAO objects and have Spring inject EntityManager instances (which are wrappers around Hibernate sessions) into DAOs
- so we need to get a hold of EntityManager, get the underlying Hibernate session and provide it to jBPM when it asks for it
- solution overview
- implement custom jBPM wire object for HibernateSession
- in the object descriptor make a call to a bridge object that uses @PersistenceContext() and is managed by Spring and get Hibernate session from it every time jBPM needs it
see the attached files for details. code has comments in it
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539262#539262]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[JBoss Microcontainer] - controller.uninstall() fails when overriding the KernelControllerContext name
by Emanuel Muckenhuber
Emanuel Muckenhuber [http://community.jboss.org/people/emuckenhuber] created the discussion
"controller.uninstall() fails when overriding the KernelControllerContext name"
To view the discussion, visit: http://community.jboss.org/message/539255#539255
--------------------------------------------------------------
When i manully set a name for a KernelControllerContext the uninstallation of contexts does not work properly.
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("test", Object.class.getName());
ObjectName name = new ObjectName("org.jboss:service=test");
KernelControllerContext ctx = new AbstractKernelControllerContext(null, builder.getBeanMetaData(), new Object());
ctx.setName(name);
getController().install(ctx);
getController().uninstall(name);
assertNull(getController().getContext(name, null));
In this case the context does not get properly uninstalled and ends up in the ERROR state (without any error message - which IMHO is also a bit weird). The name change happens in the "InstallAction" which uses the original name of the BeanMetaData to register the context in the KernelRegistry:
BeanMetaData metaData = context.getBeanMetaData();
Object name = metaData.getName();
registry.registerEntry(name, context);
Which then changes the controllerContexts back to the name which was defined in the BeanMetaData. Basically you can lookup the correct context, however the context cannot be remove from allContexts in the controller - since the name it got registers now is different from the context name:
controller.uninstall(objectName)
...
ControllerContext context = getRegisteredContextAndInterruptAsynchronousInstall(objectName);
....
unregisterControllerContext(context);
....
Object beanMetaDataName = context.getName();
allContext.remove(beanMetaDataName);
Obviously when i set the original context name before uninstalling this works fine.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539255#539255]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years