reusing EJB

C

crash.test.dummy

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.
 
J

James McGill

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top