File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Deploy MDB on Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Deploy MDB on Glassfish" Watch "Deploy MDB on Glassfish" New topic

Deploy MDB on Glassfish

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918


I try to deploy an MDB together with my other beans and I get a :

as far as I read on this forum I need to add a ConnectionFactory and a Destination on my application server using the admin console.

I done that and I still get an exception and I don't understand why.
Any suggestions ?


Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

In Glassfish's Admin Console, under Resources/JMS Resources, what do you see in Connection Factories and in Destination Resources ?

[My Blog]
All roads lead to JavaRanch
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Hi Christophe

Thanks for your answer, yesterday night (after I post my questions on the ranch) I do some reverse engineering and I discover this - I need to add (or to have) a connection factory and a destination resource.
I discover this by using netBeans and MDB - here this two resoures are automatic generated.
Now my MDB can be deploy and it works also.

But I still have one more question, when you develop a MDB you don't know (like developer) that one or more resources are or not available on the application server, you must presume that something like this exist or you must play at lest two roles - the developer and the application assembler
How is in real live when more than one developer is involved ?

Christian Nicoll
Ranch Hand

Joined: Mar 09, 2008
Posts: 106

i make my first steps with EJB 3.0 and the glassfish server. I've the same problem what Mihai had, but I don't find the right steps to solve it. The example comes from the book "EJB 3 - In Action".

First of all I tried to inject a factory and a destinantion in a statefull bean

This didn't work, because I had not created the required factory and destination in the glassfish application server. So I created both in the glassfish server.

After this, the DI worked without any exception.

The next step was to create the Message-Driven-Bean. Like the example in the book I used also DI.

After I published my source-code again, I received the ConnectorRuntimeException

Is there a wrong entry in the ActivationConfigProperty-annotation or did I've forget any important part ?

Best regards,

[Thumbnail for glassfish.png]

My SCBCD-Notes - My Hello World Webservice
Christian Nicoll
Ranch Hand

Joined: Mar 09, 2008
Posts: 106
Hi Ranchers,

I 've found a solution for this problem:

It seems that the important part is here for the glassfish server the mappedName entry.

Further information about this are available under those both threads:
I agree. Here's the link:
subject: Deploy MDB on Glassfish
It's not a secret anymore!