[JBoss jBPM] - ejb3 & jbpm-enterprise & seam
by jgeraert
Dear all,
I'm trying to integrate the jpm-enterprise.jar into my own project. I have added it as EJB module in my application.ear and all the beans deploy like it should.
I have a ejb3 session bean that starts up the process.
it fails in EjbSchedulerService.java
| try {
| Context initial = new InitialContext();
| LocalTimerServiceHome localTimerServiceHome = (LocalTimerServiceHome) initial.lookup("java:comp/env/ejb/LocalTimerServiceBean");
| localTimerService = localTimerServiceHome.create();
| } catch (Exception e) {
| JbpmException jbpmException = new JbpmException("ejb local timer lookup problem", e);
| log.error(e);
| throw jbpmException;
| }
|
It says 'env not bound'
however, i tried to configure the dependencies in ejb-jar.xml and jboss.xml of my ejb3 session bean:
ejb-jar.xml:
| <session>
| <ejb-name>InklessProcessInitiatorBean</ejb-name>
| <ejb-ref>
| <ejb-ref-name>service/LotService</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| </ejb-ref>
|
| <ejb-local-ref>
| <ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local-home>
| org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome
| </local-home>
| <local>
| org.jbpm.scheduler.ejbtimer.LocalTimerService
| </local>
| <ejb-link>TimerServiceBean</ejb-link>
| </ejb-local-ref>
|
|
| </session>
|
|
and jboss.xml:
| <session>
| <ejb-name>InklessProcessInitiatorBean</ejb-name>
| <ejb-ref>
| <ejb-ref-name>service/LotService</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <jndi-name>xxmlx_shopfloor_intf/LotService/remote</jndi-name>
| </ejb-ref>
|
| <ejb-local-ref>
| <ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local-home>
| org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome
| </local-home>
| <local>
| org.jbpm.scheduler.ejbtimer.LocalTimerService
| </local>
| <ejb-link>TimerServiceBean</ejb-link>
| <local-jndi-name>LocalTimerService</local-jndi-name>
|
| </ejb-local-ref>
|
| </session>
|
|
still it says 'env not bound'
What am i missing here?
Best regards,
Jo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131338#4131338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131338
18 years, 2 months
[JBoss Messaging] - Re: Message Pulling
by timfox
"sams" wrote :
| Evidently when JBoss creates the MDB, it create's the MDB's Message Listener from a Session that was created from a standard ConnectionFactory instead of the ClusteredConnectionFactory. I have not seen a setting in any of the config files so far to change this, so it may be hard coded somewhere, I'm not sure.
|
| Adam
The JMS Provider (by default DefaultJMSProvider) that you use is defined in your config - standardjboss.xml - this is just standard jboss config.
DefaultJMSProvider is by default defined in jms-ds.xml. That's where the connection factory that is used is specified.
All this is nothing to do with JBM, is handled in the AS layer and is exactly the same for every other JMS provider that you might configure AS to use.
It's really not a good idea to change your MDBs to use a connection factory with load balancing and failover enabled. MDBs should always consume from the local node.
JBM message redistribution should ensure that messages are redistributed between nodes at the queue level.
Have you tuned your MDB pool settings?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131336#4131336
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131336
18 years, 2 months
[Messaging, JMS & JBossMQ] - configure MDB instances w/ JBOSS 4.2.2
by smartass33160
Hello,
I am using JBOSS 4.2.2 and EJB 3.0
I have a single queue and I would like to configure the number of MDB instances which will consume messages from that queue.
I have read quite a few post regarding this issue, but I wasn't able to properly configure the number of MDBS appart from the EJB 3.0 annotation. All the time, I get 15 MDBs instances created!
Here is what I did:
1. modify deploy/ejb3-interceptors-aop.xml
==> in , I tried changing @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=100, timeout=10000)
this does not work
2. modify conf/standardjboss.xml
==> invoker-proxy-binding/message-driven-bean
I changed the MinimumSize and MaximumSize
This does not work either
3. modify jboss.xml in my ear
==> I added my own invoker-proxy-binding and linked my MDB to it. the jboss.xml looks like:
<unauthenticated-principal>nobody</unauthenticated-principal>
<invoker-proxy-bindings>
<invoker-proxy-binding>
my-message-driven-bean
<invoker-mbean>default</invoker-mbean> <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config> DefaultJMSProvider StdJMSPool
1
1
</proxy-factory-config>
</invoker-proxy-binding>
</invoker-proxy-bindings>
<enterprise-beans>
<message-driven>
<ejb-name>JMSAdapter</ejb-name>
<configuration-name>Standard Message Driven Bean</configuration-name>
<destination-jndi-name>queue/bulkCommandsQueueFile</destination-jndi-name>
<invoker-bindings>
<invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>
</invoker-bindings>
</message-driven>
</enterprise-beans>
<resource-managers></resource-managers>
This does not work either: I still have 15 MDBs created!
4. add EJB3.0 annotation in MDB:
@MessageDriven(name="JMSAdapter", activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/bulkCommandsQueueFile"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "100"),
@ActivationConfigProperty(propertyName = "minSession", propertyValue = "100")
})
This works fine, but I would like to control the number of mdbs through JBOSS configuration and not via code.
Could you guys tell me what I did wrong here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131330#4131330
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131330
18 years, 2 months
[JBoss jBPM] - Re: Token.signal() ---> 2 tokens?
by pojomonkey
"kukeltje" wrote : In most of the situations the states (not to be confused with the state nodes) are either signalled by a human, or async after the execution of some action.
Please, can you clarify what the difference is between 'the states' and 'the state nodes'? I am taking a token being at a state node to present a given process state, and then the node-enter events can indicate the transition into a state.
"kukeltje" wrote : When using async nodes, the token is 'known' to the code that signals the node again. That way it does not have to have knowledge about the processdefinition but just the one token that needs to be signalled.
Hmm, I think I follow that - will have to let that stew with the rest of my understanding of jBPM so far and see if some epiphany results.
"kukeltje" wrote :
| Btw, Client based assignment only shows up on google for the jbpm 2.0 docs. Is that where you read it?
Yes. I wouldn't have expected that capability to have been 'lost'. If jBPM is no longer capable/suitable, then I need to find that out pretty soon!
Based on the various comments and reading that I've done, I've now tried pushing the tokens through the flow by only signalling a token when it has no active children, and if it has to signal the children (unless they have active children etc.) - that seems to 'work' insofar that the root token ends up in the terminal state.
Like this:
| private boolean signalTokens(Token token)
| {
| if (token.hasEnded())
| return true;
|
| Map children = token.getActiveChildren();
|
| if (children.size() == 0)
| {
| token.signal();
| }
| else
| {
| Collection ct = children.values();
| Iterator it = ct.iterator();
|
| while (it.hasNext())
| {
| Token child = (Token)it.next();
| while (!signalTokens(child))
| ;
| }
| }
|
| return false;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131323#4131323
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131323
18 years, 2 months