[EJB3] - Re: Upgrading from 4.2.3 to 5.1 fails with "Unable to inject jndi dependency"
by Alexander Hartner
Alexander Hartner [http://community.jboss.org/people/ejb3workshop] created the discussion
"Re: Upgrading from 4.2.3 to 5.1 fails with "Unable to inject jndi dependency""
To view the discussion, visit: http://community.jboss.org/message/610051#610051
--------------------------------------------------------------
The problem was that I also included a JMS Connection factory within my ear file. I was using the xml descriptor to declare the JMS connection factory used by some of my EJBs. By adding a dependency for each bean which uses the connection factory to the jboss.xml deployment descriptor I managed to work around this issue.
There are some things which made this more confusing that it has to be.
1.) The error mentions jms/ConnectionFactory rather than my custom connection factory. This is rather misleading. It could have been much simpler to determine the cause of the problem if it told me that my custom connection factory was not found
2.) The startup sequence / order has been changed from 4.2.3 to 5.1.
> <!-- Job Request Listener MDB -->
> <message-driven>
> <ejb-name>JobRequestListener</ejb-name>
> <destination-jndi-name>queue/abc/JobRequests</destination-jndi-name>
> <!--Inherited From AbstractManagedBean -->
> <resource-ref>
> <res-ref-name>jms/ConnectionFactory</res-ref-name>
> <res-type>javax.jms.ConnectionFactory</res-type>
> <jndi-name>ConnectionFactory</jndi-name>
> </resource-ref>
> ...
> <depends>jboss.jca:service=ConnectionFactoryBinding,name=jms/ABCJMSConnectionFactory</depends>
> <message-driven>
>
>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/610051#610051]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 10 months
[jBPM] - No Task with ID 5 was found!
by Xiaojun Hou
Xiaojun Hou [http://community.jboss.org/people/houxiaojun] created the discussion
"No Task with ID 5 was found!"
To view the discussion, visit: http://community.jboss.org/message/610044#610044
--------------------------------------------------------------
sometimes when i start a process,the database has the saved the related task successfully.But when i complete the task through the human task view,in the console,information will be printed just like this:
[2011:06:158 15:06:580:debug] Message receieved on client : AddTaskResponse
[2011:06:158 15:06:581:debug] Arguments : [5]
[2011:06:158 15:06:743:debug] Message receieved on client : EventTriggerResponse
[2011:06:158 15:06:743:debug] Arguments : [org.jbpm.task.event.EventPayload@98bbf6]
Task completed 5
[2011:06:158 15:06:745:debug] Message receieved on client : EventTriggerResponse
[2011:06:158 15:06:745:debug] Arguments : [org.jbpm.task.event.EventPayload@147e668]
[2011:06:158 15:06:745:debug] Message receieved on client : EventTriggerResponse
[2011:06:158 15:06:746:debug] Arguments : [org.jbpm.task.event.EventPayload@167c5e3]
[2011:06:158 15:06:747:debug] Message receieved on client : EventTriggerResponse
[2011:06:158 15:06:750:debug] Arguments : [org.jbpm.task.event.EventPayload@1f0cf51]
Task completed 5
[2011:06:158 15:06:751:debug] Message receieved on client : EventTriggerResponse
[2011:06:158 15:06:751:debug] Arguments : [org.jbpm.task.event.EventPayload@c9b196]
Task completed 5
[2011:06:158 15:06:805:debug] Message receieved on client : GetTaskResponse
[2011:06:158 15:06:805:debug] Arguments : [javax.persistence.EntityNotFoundException: No Task with ID 5 was found!]
[2011:06:158 15:06:806:debug] Message receieved on client : GetTaskResponse
[2011:06:158 15:06:806:debug] Arguments : [javax.persistence.EntityNotFoundException: No Task with ID 5 was found!]
[2011:06:158 15:06:807:debug] Message receieved on client : GetTaskResponse
[2011:06:158 15:06:807:debug] Arguments : [javax.persistence.EntityNotFoundException: No Task with ID 5 was found!]
By the way,the task with id 5 shows completed in the database.Can you help me with this?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/610044#610044]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 10 months
[JBoss Messaging] - Jboss 5.1.0.GA JMS topic acts like a queue
by Dan Rush
Dan Rush [http://community.jboss.org/people/mrfixit440] created the discussion
"Jboss 5.1.0.GA JMS topic acts like a queue"
To view the discussion, visit: http://community.jboss.org/message/609528#609528
--------------------------------------------------------------
I've been porting my apps from JBoss 4.2.3.GA to JBoss 5.1.0.GA and I'm down to my last error (hopefully). I have a JMS topic configured that works just fine in 4.2.3.GA. I have multiple subscribers and only one of my subscribers will receive the published message. So it acts like a queue. Here is my configuration:
<mbean code="org.jboss.jms.server.destination.TopicService"
name="jboss.messaging.destination:service=Topic,name=MyTopic"
xmbean-dd="xmdesc/Topic-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="JNDIName">jms/MyTopic</attribute>
</mbean>
Here's jboss log on startup:
15:10:30,217 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1b4e5b0 started
15:10:30,217 INFO [TopicService] Topic[jms/MyTopic] started, fullSize=200000, pageSize=2000, downCacheSize=2000
Here's my client code that works great as a standalone java program connecting to jboss, but I have it in a war file now:
InitialContext iniCtx = null;
if(m_isStandAlone) {
iniCtx = new InitialContext();
} else {
iniCtx = JMSUtil.getInitialContext(APPSERVER_INITIAL_CONTEXT_FACTORY, m_providerUrl, m_username, m_password, null);
}
TopicConnectionFactory topicFactory = (TopicConnectionFactory)iniCtx.lookup(m_connectionFactory);
Topic topic = (Topic)iniCtx.lookup(m_destinationName);
topicConnection = topicFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
logger.info("Subscribing to topic: " + topic.getTopicName());
if(durable){
subscriber = topicSession.createDurableSubscriber(topic, "testsub", null, false);
}
else{
subscriber = topicSession.createSubscriber(topic);
}
subscriber.setMessageListener(this);
topicConnection.start();
logger.info("JMSSubscriber initialized.");
Here's my client log showing that clients are connecting and ready to receive:
Jun 9, 2011 3:15:09 PM JMSSubscriber init
INFO: Subscribing to topic: MyTopic
INFO: JMSSubscriber initialized.
Not sure what else to try. Only one of my subscribers will receive the published message. All the rest never receive anything. Help would be greatly appreciated. Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/609528#609528]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 10 months
[jBPM] - Does the ksession.dispose() work safely?
by byungwoojun
byungwoojun [http://community.jboss.org/people/byungwoojun] created the discussion
"Does the ksession.dispose() work safely?"
To view the discussion, visit: http://community.jboss.org/message/604592#604592
--------------------------------------------------------------
I am creating a ksession per startProcess, and after use of the ksession, I dispose it (using the processEventListener afterProcessCompleted event). If I test my process one by one, there was no problem with the ksession.dispose(). However, I noticed that if I started multiple processes at a similar time, the ksession.dispose() causes the NullPointerException. When multiple processes are invoked, there are multiple active independent ksession objects, in my case. Then, each process starts calling the ksesion.dispose() when it finishes its job. The first ksession.dispose() function code sets NULL to the applicationScopeEntityManger object after use. As the name indicates, the applicationScopeEntityManager seems to be application-level. Once it is set to NULL, the subsequent ksession.dispose() has a problem using the applicationScopeEntityManager (which is already set to NULL).
In enterprise application, it is normal there always many processes are invoked concurrently.
So, I started wondering how the ksession.dispose() works???
Any suggestion will be appreciated.
bwj
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/604592#604592]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 10 months