aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes [URLyBird]How to realize both local and remote Client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "[URLyBird]How to realize both local and remote Client?" Watch "[URLyBird]How to realize both local and remote Client?" New topic
Author

[URLyBird]How to realize both local and remote Client?

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi rancers,
Assignment requires me to realize both local and remote Client. I plan to create BusinessFactory in Business Layer. Can any one guide me in details?


SCJP 1.4 SCJD
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hello,
I plan to create BusinessFactory in Business Layer

Yes, it's an elegant solution.
Since i expose both business, and data methods to the client through a facade, I have FacadeFactory instead.

Regards


SCJP, OCMJD, OCMJEA
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Oricio,
Could you please talk something about your FacadeFactory? I think it will help me a lot.
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Yes of course,

My FacadeFactory class provides three efundamental issues:
  • Constructs default facade implementations based on default smaller pieces(default lockManager,default DAO,...).
  • Provides a single access point to backend services.
  • Provides instance pooling


  • Has two static methods getLocalFacade (filepath ,islockingEnabled) that returns a facade implementation from the specified parameters and getRemoteFacade(port,alias) that returns a facade implementing proxy to a registry bound facade.
     
     
    subject: [URLyBird]How to realize both local and remote Client?
     
    Similar Threads
    Passing Reference
    EJB 2.1 in 3.0 Container
    JNDI lookup of local and remote home interfaces
    How to do this?
    EJB local client VS EJB remote client