Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes MDB on glassfish without mappedBy 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 "MDB on glassfish without mappedBy" Watch "MDB on glassfish without mappedBy" New topic
Author

MDB on glassfish without mappedBy

Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Anyone is there who could able to deploy a MDB on glassfish that mdbs destination defines using only Activation Config, and not mappedBy att of @MessageDriven

like


without mappedBy att im getting



But defining MDB's destination using mappedBy is not portable.
http://java.sun.com/javaee/5/docs/api/javax/ejb/MessageDriven.html#mappedName()

But weirdly sun's javaee tutorial also have used mapped by attribute in their first example.
http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpo.html

Any suggestions

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

mappedBy ? You mean mappedName ?


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

From Glassfish documentation, it looks like the mappedName needs to be set.
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi,

I have the same doubts about this theme, the mappedName reduce portability and is not recommended. Therefor is recommended you to use deployment descriptors for mapping global JNDI names instead.
This post :
http://www.coderanch.com/t/164042/java-EJB-SCBCD/certification/MessageDriven-mappedName-mandatory
argue this affirmation.


Regards,
M


SCJP, SCJD, SCWCD, OCPJBCD
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Thanks to both...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MDB on glassfish without mappedBy
 
Similar Threads
Who creates destination Queueor Topic
MBD DI Query In EJB3.0
Deploy MDB on Glassfish
Queue creation problem with deploying ear
@MessageDriven. Is mappedName mandatory?