hi,
i have an existing EJB jar that performs about 90% of the tasks that
i need, and the other 10% is to perform related tasks but was not
present in the original EJB jar.
i wanted to reuse the original EJB and possibly extend some of its
classes to accomplish the 10%. but how do i structure my new EJB jar
such that I don't need to copy the codes from the original EJB jar to
my new EJB jar?
my idea is to just include the original EJB jar to a library folder
or something. i have no problem with copying the ejb-jar.xml from the
original to the new EJB jar, just not the codes.
can this be done?
thanks.
James McGill - 24 Mar 2006 20:30 GMT
> can this be done?
Probably; it's really just a java class, and there's nothign much that's
magical about it being an EJB. You might have difficulty constructing
it; for example you might have to call the lifecycle methods or
something. And if an EJB depends on container resources that's runtime
stuff in an appserver, you won't have any of that in isolation.
The answer to your question depends on what your EJB does, how it does
it, and how you intend to use it now.