The Delegate is a commonly used design pattern, see http://www.c2.com/cgi/wiki?BusinessDelegate
Basically the delegate protects its clients from needing to know the semantics of how the functionality is provided (ejb, web-service, database, etc.). The reason I recommend using a delegate is to provide a class that knows how to perform the business logic (or how to get the class that does) but is separate from the impl class that Axis generates (I use this because I overwrite my impl everytime I make changes to my service). I haven't really touched on maintaining state between calls to a webservice. I know that Axis supports sessions, but I don't know how that would be handled on the client end. One thing I'd recommend is having a Singleton that stores a map of your service delegates. With the key being an identifier that you provide the client after he/she logs in the first time. (One of your web service operations would need to be login of course). Everytime the client makes a call, he has to provide that key (either in the header or as a parameter). Your impl would call the Singleton to get the delegate associated with that key and call the appropriate function on the delegate. Like I said, I'm not certain if there is a standard way to maintain state between calls to a webservice, but if there isn't, that is definitely one route to consider. Hope that helps, Michael -----Original Message----- From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] Sent: Thursday, February 10, 2005 10:13 PM To: [EMAIL PROTECTED] Subject: RE: Axis & workflow based services Thanks Mike, Are there any recommended approaches for this 'delegate' you mention... it seems to be basically a request processor right? I want it to be able to have some sort of state, such as whether the user is logged in for example. Thanks, Abdullah --- "Brown, Mike" <[EMAIL PROTECTED]> wrote: > Abdullah, > What precisely is your business layer? You have a few options...One > you can use a delegate between your impl class and the business layer > that knows how to access the business layer and make the appropriate > calls. Two, you can have the impl access the business layer directly > (I prefer to separate the code myself, but the choice is yours). > > So basically, web layer makes call to Axis, Axis uses delegate to > access the business layer, business layer performs its magic and > returns to delegate who returns to axis who returns to web layer. > > Hope that helps, > > Michael > > -----Original Message----- > From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 10, 2005 1:49 PM > To: [EMAIL PROTECTED] > Subject: Re: Axis & workflow based services > > Bill, > > Thanks for the input. However, my presentation layer is going to be > Laszlo, and I want to communicate with the business layer using axis. > That's why I can't get to struts, axis will be processing the request > first. > > Thanks, > Abdullah > > --- Bill Keese <[EMAIL PROTECTED]> wrote: > > > Abdullah Jibaly wrote: > > > > >I want my view layer to communicate with the > business layer using web > > >services ... I can't use a standard MVC framework > like struts > > since > > >the request is sent to AxisServlet, right? > > > > > > > > As far as I understand, people usually talk about > separating the > > "presentation layer" and the "business layer", > rather than separating > > the "view layer" from the "business layer". So, it > sounds like you > > should write the presentation layer (model, view, > and controller) in > > struts, but the struts Actions should call the > "business layer" via > > web services. IE, the parts relating to > displaying web pages and to > > web page flow should be in struts, and the > Business layer contains > > "support" > > functions like "addEmployee()". > > > > What do you think? > > > > Bill > > > >