Invoking Commands in J2EE

J

Jim Fisher

I am searching for a way to invoke command classes (Command Pattern)
that utilizes Stateless Session Bean (SLSB) technology.

The two approaches I have come up with are:

1) Create a single SLSB and pass in a lookup name that matches to a
command class from which the SLSB can use to create and invoke the
command class reflectively. This assumes the command classes would be
cached and managed in a configured pooled once loaded.

2) Create a SLSB for each command class.

I would prefer not to use Option 1, because I would like to avoid using
*reflection* for such a common invocation. In addition, the management
of command objects creates another problem already solved by the J2EE
container.

Considering Option 2, I would like something more convenient than
creating a SLSB for each command.

Hence, I would like to come up with a wrapper around SLSB that would
enable the programmer to write POJO command classes and focus on the
app code.

I am also aware of code gen and declarative programming options in 3rd
party tools and what is coming in JDK 1.5. Thus, I am searching for a
true SLSB wrapper.

Any ideas?
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top