i'm after what is "legal" according to the ejb 2.0 spec as far as what can a stateless session bean do in its ejbCreate method. the spec (section 7.8.2) says in the ejbCreate and ejbRemove (second s/b irrelevant for slsb) it can access: SessionContext methods: getEJBHome, getEJBLocalHome, getEJBObject, getEJBLocalObjectm and has JNDI access to java:comp/env.
it also says (just above the table there in 7.8.2), "If a session bean instance attempts to access a resource manager or an enterprise bean and the access is not allowed in Table 3, the behavior is undefined by the EJB architecture.".
so, this raises the question. it seems that i can do a jndi lookup to get a reference to the home of another bean, correct? but is calling the home.create() method to get a reference to another bean aloud per the specification? the home isn't an enterprise bean per se. it just gets me to the bean.
then how about calling home "business" methods on a entity bean? ( i don't think slsb's can have home business methods, correct?). maybe i have an entity bean that has a CoolEntityBeanHome.updateAllOrdersAccessDate() method in its home to "touch" the last access date for all orders in the db. can i call this home method from my ejbCreate of a slsb?
the table of section 7.8.2 is a little ambiguous, since it says what is alowd, but doesn't say vary many things that aren't alowd.
thanks for the response. am i aloud to call the create on the home of another slsb from the ejbCreate of a slsb? the spec lists what i can do, but it doesn't say that that's all i _can_ do. it lists that i can't access a resource manageer (get a db connection i assume), and it lists that i can't access an ejb, but it doesn't say that i can't call the home of a bean that i got from jndi, and it doesn't say that i can't call create on that home to get a reference to another slsb.
again, thanks for the response!
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.