• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MDB in EJB 3.0 and JBOSS AS 6.1 final

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Any one now how to create an MDB using JBOSS AS 6.1 final and EJB 3.0.

I am using Eclipse IDE 3.5.
Using ant build to create EAR file.

If possible please explain deployment descriptors
ejb-jar.xml, jboss.xml, jboss-web.xml.

Are they still needed in Jboss AS 6.1 final release or we use only Annotations for createing MDB.

I googled a lot but did not find any tutorials that worked for me.



Regards and Thanks
Abhishek
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

sample code :

@MessageDriven(name = "EDMProcessRequestQueueListener", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
// @ActivationConfigProperty(propertyName = "destination", propertyValue = EDMConstants.QueueDestination_MappedName_EDMProcessRequestQueue),
@ActivationConfigProperty(propertyName = "destination", propertyValue = EDMConstants.QueueDestination_MappedName_EDMProcessRequestQueue),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })

public class EDMProcessRequestQueueListener implements MessageListener {

@Override
public void onMessage(Message message) {


 
Abhishek Guru
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have tried an example using tutorial :
http://www.mastertheboss.com/jboss-application-server/327-developing-mdb-with-jboss-as-7.html

But I am stuck on error after deployment. This is not an error, a warning says :

[org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer] Ingoring EJB deployment with null classname: null

Here is the jboss.xml :


test-hornetq-jms.xml :




Regards
Abhishek
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try specifying the <ejb-class> element in your jboss.xml to point to the EJB implementation class. Although, I think that webservice error could perhaps be ignored. Not sure why webservice is coming into picture.

 
Abhishek Guru
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for immediate reply.
I have tried to ad <ejb-class> element in jboss-xml. This is not working as jboss.xml is not parsing this element. error is :

ejb-class not found as a child of message-driven in unordered_sequence: mdb-client-id? configuration-name? security-proxy? resource-adapter-name? local-jndi-name? annotation* timer-persistence? jndi-ref* ior-security-config? mdb-user? ejb-timeout-identity? aop-domain-name? mdb-passwd? depends* destination-jndi-name? mdb-subscription-id? create-destination? method-attributes? activation-config? security-identity? ejb-name? ignore-dependency? jndi-binding-policy? pool-config? security-domain? exception-on-rollback? invoker-bindings? {all descriptionGroup}? {unordered_sequence jndiEnvironmentRefsGroup}?

You are right that webservice error can be ignored.

But after successful deployment, I did not able to send message to my MDB. It just run the code smoothly up to the point where I actually send the message to my MDB. But it never reaches to MDB.

Example tried is here :

http://www.mastertheboss.com/jboss-application-ser...oping-mdb-with-jboss-as-7.html

If you guys having any of the runnning mdb example in jboss6 and ejb 3.0, please mail me at my gmail id
sunnyanku@gmail.com

Regards
Abhishek


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic