aspose file tools*
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
Author

Deploy MDB on Glassfish

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi

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 ?

Regards,
M


SCJP, SCJD, SCWCD, OCPJBCD
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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: 916

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 ?

Regards,
M
Christian Nicoll
Ranch Hand

Joined: Mar 09, 2008
Posts: 106
Hello,

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,
Christian



[Thumbnail for glassfish.png]


SCJP 5, SCJD 5, SCWCD 5, SCBCD 5, SCJDWS 5
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:
http://www.coderanch.com/t/418882/EJB-Certification-SCBCD/certification/MDB-glassfish-without-mappedBy
http://www.coderanch.com/t/164042/EJB-Certification-SCBCD/certification/MessageDriven-mappedName-mandatory
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploy MDB on Glassfish