Hi, Michael, @ejb:bean remote-business-interface and local-business-interface, they are both deprecated and will be removed for 1.2 release. Ejb:bean is the wrong place for 'interface' settings, ejb:interface is better, so use @ejb:interface extends="blabla" local-extends="blabla" instead.
Regarding a new template/subtask for autogenerating business interfaces: it's a good idea, basically it's the same as remote/local.xdt but without the "throws RemoteException" on each method. Right? Imho it's silly to create a new template file (say biz-intf-xdt) for this new subtask. A better solution is wrapping the throws statement of remote.xdt in a if/else check (in-biz-intf-mode=true|false). Sure you still have to create a BizIntfSubTask class but it will point to the modified remote.xdt template file. That'll be great if you could implement it and send the patch for us, we'll happily commit it. Ara. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:xdoclet-devel- > [EMAIL PROTECTED]] On Behalf Of Michael Stanley > Sent: Tuesday, July 02, 2002 11:16 PM > To: [EMAIL PROTECTED] > Subject: [Xdoclet-devel] business-interface design pattern > > Hi, > > I'm fairly new to XDoclet. Its a great project, and is extremely useful. > > I ran into some problems with @ejb:bean remote-business-interface and > local-business-interface. > > The business-interface design pattern, is described as (quoted from EJB > Design Patterns by Floyd Marinescu): > > "Create a superinterface called business interface, which defines all > business methods. Let both the remote/local interface and the > enterprise bean class implement this interface, forcing compile-time > consistency checks." > > I've attached an example of a BusinessBean with a remote interface that > follows this pattern. > > The tag in XDoclet @ejb:bean remote-business-interface I assumed was > following this pattern (correct me if I'm wrong). However there was a > bug in the remote.j and local.j templates. This file wasn't including > this as part of the extension. I've submitted patches to fix both these > in your sourceforge patch manager. (sorry about the clumsy patch > submital, I came across this early in the morning). > > The problem I have now in my code is that I have to maintain two classes > the bean and the corresponding interface. In fact, if I use seperate > local and remote business-interfaces than I have to maintain 3 files! I > propose that there be another subtask, class and method tag added. > > The class tag should be: > @ejb:business-interface > (contain the same parameters as @ejb:interface) > > The method tag should be: > @ejb:business-interface-method > (contain the same parameters as @ejb:interface-method) > > The sub task should be: > <businessinterface/> > (contain the same properties as the remoteinterface) > > Since everything is very familiar to XDoclet already, I imagine the only > thing that will be different is the template file, and even this will be > the similar. > > This will allow developers to once again maintain one Bean > implementation and generate business-interfaces that adhere to the > Business Interface Design Pattern. > > If I have consensus, I will develop the above for you. > > In the mean time the patch I submitted (I've attached them in this email > as well) completes the design pattern. > > Thank for listening, and thank you again for this tool, > > -- > <Mike/> ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel