[Beginner's Corner] - Configuring Message Driven Beans
by Tuan Nguyen
Tuan Nguyen [http://community.jboss.org/people/tnguyen_75] created the discussion
"Configuring Message Driven Beans"
To view the discussion, visit: http://community.jboss.org/message/548574#548574
--------------------------------------------------------------
To configure the MDB (message driven beans) to accept message, do I use ejb-jar.xml or jboss.xml to connect the MDB class to the jndi queue as such:
jboss.xml:
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>SimpleMessageBean</ejb-name>
<destination-jndi-name>queue/MyQueue</destination-jndi-name>
</message-driven>
</enterprise-beans>
</jboss>
or ejb-jar.xml:
<message-driven>
<ejb-name>ExampleMDB</ejb-name>
<ejb-class>org.jboss.tutorial.mdb_deployment_descriptor.bean.SimpleMessageBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-destination-type>javax.jms.MyQueue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>AUTO_ACKNOWLEDGE</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
Thanks,
Tuan
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/548574#548574]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 10 months
Re: [jboss-user] [EJB 3.0 Development] - Unexpected behaviour when binding to java:comp and @Startup beans
by Marius Bogoevici
Marius Bogoevici [http://community.jboss.org/people/marius.bogoevici] replied to the discussion
"Unexpected behaviour when binding to java:comp and @Startup beans"
To view the discussion, visit: http://community.jboss.org/message/548568#548568
--------------------------------------------------------------
Yes, that's what puzzles me.
I'll try to think of a way to reproduce the issue per se - the problem becomes obvious with the Weld JNDI Binding.
Meanwhile, here is a very simple example which does not quite reproduce the issue, but helps explaining what I mean.
while postconstructing the ejb, we're looking for java:comp - now if you're looking at ComponentObjectFactory, you can see that CurrentComponent.get() returns null, so the application is using the legacy branch. A "java:comp" is found during lookup, but for some reason, it does not seem to be the same as the one accessed via JavaEEComponent.getContext().
So, thanks Jaikiran for looking into this, and please let me know what you think.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/548568#548568]
Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 10 months
Re: [jboss-user] [jBPM] - Variables from ended process ...
by Jaber C. Mourad
Jaber C. Mourad [http://community.jboss.org/people/newbeewan] replied to the discussion
"Variables from ended process ..."
To view the discussion, visit: http://community.jboss.org/message/548548#548548
--------------------------------------------------------------
Hi,
To get history variable i'm using that code using the processInstanceId :
public Map<String, Object> getHistoryProcessInstanceVariable(String processInstanceId) {
Set<String> variableNames = historyService.getVariableNames(historyProcessInstanceId);
return historyService.getVariables(processInstanceId, variableNames);
}
In my test :
HistoryProcessInstance historyProcessInstance = processInstanceService.getHistoryProcessInstanceById(processInstance.getId());
assertEquals(historyProcessInstance.getState(), "ended" );
Map<String, Object> historyVariables = processInstanceService.getHistoryProcessInstanceVariable(historyProcessInstance.getProcessInstanceId());
assertNotNull(historyVariables);
assertFalse(historyVariables.isEmpty());
In my service, to create my variables (I change the code to be sure that I'm using the processInstanceId) :
String processInstanceId = executionService.findProcessInstanceById(taskService.getTask(taskId).getExecutionId()).getId();
executionService.createVariables(processInstanceId, variables, true);
But nothing better :(
Any Idea ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/548548#548548]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 10 months