I think I understand your design and I really think you need to stick to a synchronous call, instead of the asynchronous JMS call. By its very nature, the client publishing the message will not get an immediate response, other than an acknowledgement for the message itself.
I think you're better off putting the session bean back into the picture. You don't have to use entity beans, but a session bean method like authenticate() that returns some type of ValueObject. I wouldn't just return a boolean. You would be wise to use an object, where you can plan for growth. Later, if you needed to return more data, you would need to change the method signature. If you go ahead and return a lightweight JavaBean-like object now, more data would only mean additional properties in the view object. This is a very common approach to this type of problem. There are plenty of design patterns for this scenario. Check out the Session Facade and ValueObject patterns here: http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html My two cents. Chuck At 04:57 PM 4/25/2002 -0500, you wrote: >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 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

