Hey all,

I have a design question and I'm looking for the best practice in
handling it.

 

I am using a customer login for a proof of concept with regards to the
architecture, here is the current architecture.

 

I have a logon jsp that invokes a logonAction. This action takes the
login information and publishes a message (JMS) to a MDB (message Driven
Bean).

The MDB calles a Session Bean the authenticates the user.

 

Here is the problem - the action pubs the message and once sent - it
does not know when the process is complete. 

 

I initially didn't have the JMS layer - So the LogonAction was calling a
SessionBean Method - ValidateUser and that method returned a Boolean.
The LogonAction would use the returned Boolean to figure out what view
to display. 

 

 

I want an elegant way to know when the validation is complete. I was
thinking about creating a generic action class that's a session bean.
But I'm wondering since the action classes are singletons, am I creating
threading problems by doing this. If I was able to make the action a
SessionBean - The actionSessionBean could become the manager of the
process and determine what view to display. 

 

I also thought about sticking something in the session itself - the
problem with that is the action will not know when to inspect the
session since the action is only able to publish the message - but not
listen to it.

 

I hope this is a good enough explanation about what I am trying to
accomplish. Any suggestions would be greatly appreciated.

 

DD

Reply via email to