--- Stuart Guthrie <[EMAIL PROTECTED]> wrote:
> I've generated the remotefacade code from my bean
> and get lots of
> errors. Most seem to be to do with
> <X>FacadeRemote.java and FacadeEJB
> (already mentioned in a previous email.).
> 
> I've checked the code and corrected the errors
> below, does this mean
> that the remotefacade template is wrong or that I'm
> too stupid to make
> it work correctly? If the first, how do I correct
> the template?
> 
> This generated code had errors:
> 
> public class ItemFacadeRemote
> {
> 
>   /**
>    * return session bean remote interface
>    */
>    protected orderApp.interfaces.ItemFacade
> getSession() {
>       try {
>       if(_session == null) {
>          _session =
>
orderApp.interfaces.ItemFacadeUtil.getHome().create();
>       }
>       return _session;
>       } catch(Exception ex) {
>         // just catch it here and return null.
>         // somebody can provide better solution
>       ex.printStackTrace();
>       return null;
>       }
>    }
> 
>   /**
>    * override this method to provide feedback to
> interested objects
>    * in case collections were changed.
>    */
>   public void invalidate() {
>   }
> }
> 
> 
> I replaced it with this code. Think it's right. It
> compiles but then...
> 
> public class ItemFacadeRemote
> {
>     orderApp.interfaces.ItemFacadeLocal _session =
> null;
>   /**
>    * return session bean remote interface
>    */
>    protected orderApp.interfaces.ItemFacadeLocal
> getSession() {
>       
>       try {
>       if(_session == null) {
>          _session =
>
orderApp.interfaces.ItemFacadeUtil.getLocalHome().create();
>       }
>       return _session;
>       } catch(Exception ex) {
>         // just catch it here and return null.
>         // somebody can provide better solution
>       ex.printStackTrace();
>       return null;
>       }
>    }
> 
>   /**
>    * override this method to provide feedback to
> interested objects
>    * in case collections were changed.
>    */
>   public void invalidate() {
>   }
> }

It's not the idea of remote facade. Remote facade is
designed to work on client side using remote
interfaces
( and you try to use local ones ). This will work only
inside application server.

regards,

=====
Konstantin Priblouda ( ko5tik )    Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to