Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

EJB MDB project on jboss server issues

 
Ranch Hand
Posts: 865
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to create simple EJB MDB project.

I created EJB project and then one more separate dynamic web project. I am using JBoss 5 server.

I was looking for JMS folder under

C:\softwares\jboss-5.0.0.CR2\jboss-5.0.0.CR2\server\default\deploy

I could not see jms folder there.

I want to open
jbossmq-destinations-services.xml
under the jms folder to edit it.

I could not see that file as well .

In jboss4.2 there used to be jms folder and under that there used to be
jbossmq-destinations-services.xml

Not sure where can I find
jbossmq-destinations-services.xml


Alternately i found destinations-services.xml under below folder

C:\softwares\jboss-5.0.0.CR2\jboss-5.0.0.CR2\server\default\deploy\messaging

I modified that as below by adding mbean at the end



MDBs looks as below




I deployed both ejb project and web project.

My servlet sending text messages to topic on which 3 message driven beans(mdb) are listening.
When i go to servlet url
http://localhost:8080/GpWebProj/GPServlet

My console is not roling with the text messages instead i see some errors there as below

16:49:09,679 INFO [STDOUT] entering GpServlet do get method--------
16:49:09,745 INFO [ServerSessionEndpoint] Received send for ID:JBM-5099599c-6b94-408b-a5a5-b9c669f4cbb7 reliable: true
16:49:09,745 INFO [ServerSessionEndpoint] Done send
16:49:09,745 INFO [STDOUT] exiting GpServlet do get method--------



Instead I would like to see something like below


16:49:09,679 INFO [STDOUT] entering GpServlet do get method--------
GpMDB01 onMessage method received msg msg from GpServlet
GpMDB02 onMessage method received msg msg from GpServlet
GpMDB03 onMessage method received msg msg from GpServlet
16:49:09,745 INFO [STDOUT] exiting GpServlet do get method--------

I am not sure where is the issue. How can i fix this issue

Please advise. Any links, sample code, resources, ideas highly appreciated. thanks in advance
MDBProjStr.jpg
[Thumbnail for MDBProjStr.jpg]
EJB MDB project structure and console
 
Marshal
Posts: 77531
372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving as too difficult for “beginning”. I hope I have put it in the right place.
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not looked at your code in detail, but I can say one thing:
You cannot expect output in a certain order with topics/queues. You have to remember that queue/topic are for 'asynchronous' processing - your servlet posts a message and there is no guarantee that the message processor is going to take it up immediately. What if it is busy with other messages?

And using sysout is not the best way - instead you should use logging and periodically check the server log files to see if the processing has happened.
 
sai rama krishna
Ranch Hand
Posts: 865
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Under C:\softwares\jboss-5.0.0.CR2\jboss-5.0.0.CR2\server\default\deploy\jbossmq-destinations-services.xml

I added last mbean element as below for topic at the end of the file







For configuring queue i added below mbean as last but one element













I was looking this link

http://grwebservice.blogspot.in/2009/06/message-driven-bean.html

do I need to configure prop file as below.

EJBJNDI.prop
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost:1099

I am not configuring property file as above. Is that is issue. Can you please advise.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic