Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploy MDB on Glassfish

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Glassfish's Admin Console, under Resources/JMS Resources, what do you see in Connection Factories and in Destination Resources ?
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

glassfish.png
[Thumbnail for glassfish.png]
 
Christian Nicoll
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic