Hi,
Thank you for your responses. Well, I have used the lookup methods in a static utility class, but like I mentioned earlier, I am just trying to explore the inheritance concept w.r.t EJBs.
here's what I tried:
I moved my JNDI lookup methods to the BaseBean. However, I did not expose these methods in my remote interfaces. Hence, even though it would have been possible to instantiate the bean (making it abstract would essentially mean it no longer is EJB), no methods would have been able to be accessed. Then, I created another bean (SampleBean), which extended this BaseBean, so all the methods in BaseBean were available to SampleBean.
However, this scenario did not work for me as I needed to use those lookup methods for locating a bean. So, what I managed to achieve was a Catch-22 situation whereby the methods to lookup the beans were in a bean itself; and to use those methods I had to lookup THAT bean and create an object.
That's when Jeanne's response previous response about how the functionality that is truly intended to be in a superclass made more sense.
So now, I am trying to create a scenario which I can use to explore inheritance in EJBs.
Meanwhile, if you have any sample that you have implemented and can share with me, would be immensely helpful to jump start.
Thanks,
Pratul