Sanjeev Verma <mailto:[EMAIL PROTECTED]> once said:
> 1. Create a new xdoclet template to generate a business
> delegate class from the SL session bean. The business
> delegate is a class that has the exact same interface as the
> remote interface of the ejb, and inside the body of each
> method, it delegates calls to the remote interface method.
> This business delegate will have a constructor, inside which
> the handle to the remote interface will be obtained by doing
> the jndi lookup...yada-yada... 2. Call "wscompile" of JWSDP
> on this business delegate to generate the server side
> artifacts of a web service with the business delegate class
> as the service end point. 3. Creat a war file, a ejb-jar file
> (of the SLSB), and package them inside a ear file. 4. On the
> way, also create another xdoclet template that creates a
> application.xml for this app. 

Sounds like a good plan. I had been planning to do this soon but haven't
made the time. The only suggestion I'd make comes from how I implemented
it by hand.

I create a business delegate interface modeled after the *local*
interface (no RemoteExceptions). Then I create two implementations: one
delegating to a remote bean, the other to a local bean. The remote
version simply catches any REs and throws our own (unchecked)
ServiceException.

The main reason I have delayed doing it is that I haven't had time to
think out all the configuration. When you get a RemoteException, you may
want to

1. Let it propagate
2. Throw some other exception
3. Wrap it with some other exception
4. Swallow it

Plus there's the matter of how to give it or have it connect to the
bean, and other issues. Kudos to you for jumping on it! :)

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to