This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confused with EJB roles

 
Soni Prasad
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,
I am always quite confused in the question related to different EJB role reponsibilities, because at so many places in the specs it is written that if this work is not done by application assembler then it will be done by deployer. I always get confused that is there any clear cut demarcation that this work is to be done by application assembler and this to be done by deployer or system adminstrator. What should I do? Please suggest...

thanx,
soni
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a nutshell:

Bean Provider:
The Provider codes the Bean. He knows the business logic of the application
and is considered as domain expert. If he uses string literals for
security roles or objects of the bean environment (String,Boolean,Integer etc), he will add the appr. xml elements in the ejb-jar.xml file.
The Bean class, home interfaces, primary key class etc will be added by the provider as well.

Bean Assembler:
He puts Beans together in a greater environment. He declares ejb-refs and security roles etc.

Bean Deployer:
He deploys the Bean into the appserver and maps references to external resources, such as Databases, MessageProvider. He also maps existing users to the securityroles.


EXAMPLE:

Provider:
<security-role-ref>
<role-name>RolenameInsourcecode</rolename>
<role-link>Will Be Added by Assembler</role-link>
</security-role-ref>

This is also done by Assembler
<security-identity>
<use-caller-identity/>
</security-identity>
...
<security-role>
adminrole
</security-role>


This is done by Deployer
jboss.xml or weblogic.xml for example
<session>
<ejb-name>MyBean</ejb-name>
<jndi-name>TheNameOnTHISAppServer</jndi-name>
</session>

Good luck.
[ August 04, 2005: Message edited by: Marco Barenkamp ]
 
Soni Prasad
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic