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

ejbFindByPrimarykey and security questions

 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, first question I posted on notes posted by Anurag, but there wasn't any reply...so I post a new one.

1)I need a quick correction if I'm not correct.........??? ejbFindByPrimaryKey doesnt need to have EJBQL......!!! I mean ...all finders except ejbFindByPrimaryKey need ejbql.
Please tell me the correct option....it will make me feel better

2) The App Assembler can differentiate between remote and local interfaces and home and local-home while specifing the security for methods...
<method-permission>
<role-name>Admin</role-name>
<method>
<ejb-name>UserEJB</ejb-name>
<method-name>setData</method-name>
<method-intf>local</method-intf>
</method>

</method-permission>

Can he do the same while specifing transaction attributes to methods in <method> element of <container-transaction> element? Since its same method element out there it may be ok...but XML parser may disallow it here....
What the spec say about this???
Amol.



Amol.
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)ejbFindByPrimaryKey doesnt need to have EJBQL......!!! I mean ...all finders except ejbFindByPrimaryKey need ejbql.
Please tell me the correct option....it will make me feel better

There is no need to specify the ejb-ql for this method. The container has enough information in the deployment descriptor, the primary key class/field, to generate the query.


2) The App Assembler can differentiate between remote and local interfaces and home and local-home while specifing the security for methods...
<method-permission>
<role-name>Admin</role-name>
<method>
<ejb-name>UserEJB</ejb-name>
<method-name>setData</method-name>
<method-intf>local</method-intf>
</method>

</method-permission>

Can he do the same while specifing transaction attributes to methods in <method> element of <container-transaction> element? Since its same method element out there it may be ok...but XML parser may disallow it here....

Yes, of course. As an application assembler, I would like to have different transaction attributes for the methods of remote than that of local interface. Also, as long as the DTD of <method> element allows <method-intf> element, why would you think that the parse may complain? It won't.
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Thankx Keerti , yeah in fact I also thought it would allow, but since HF and Spec are mum about it, I raised the concern.

You have been very co-operative and responsive, I thank you for that.
Amol.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic