• 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!
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!