posted 17 years ago
Hi,
i recently sent a post about JNDI issues, this post is not the same as the other one altough it's about the same topic. I found out the problem on the other post!!
My question is pretty simple. After i spent some hours trying to figure out the problem in my application, i need some more answers.
In a situation the i have a Fa�ade -> POJO -> CMP, in other words, a situation where the fa�ade delegates the business implementation to a POJO, what are the diferent manners this POJO can access the CMPs???
So far, i found out 2 diferent ways, but in some of this methods i need some explanation
First option - If i set a reference (in ejb-jar.xml and jboss.xml) for SessionOneBean to CMPOneBean, i can access CMPOneBean from the POJO with a lookup such that.
Well, this is clear to me, i understand fine.
Second option - If i DON'T set a reference (in ejb-jar.xml and jboss.xml) for SessionOneBean to CMPOneBean, i can access CMPOneBean from the POJO with a lookup such that.
Why exactly does it work??? I don't get it!!!
If i try the lookup wit the "java:comp/env/...." stuff it doesn't work in this case.
Third option - If i just i don't set references and also lookup for the remote interface withoud the "java:comp/env/ejb/..." sutff it also works.
Finally, why when i use the "java:comp/env/ejb/..." stuff, i cannot locate ejbs from POJOs??? Is it because the COMP enviroment is not accesible to POJOs???
Leandro Melo
SCJP 1.4, SCWCD 1.4