Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / November 2003

Tip: Looking for answers? Try searching our database.

Home, Local/Remote interface

Thread view: 
Olivier - 03 Nov 2003 16:11 GMT
Hi everybody,

I have been working for years with Perl and
PHP, but I am new to J2EE. I would like to understand
a bit how it works. I've read a few papers/tutorials,
but all seem to assume what the home, local and
remote interfaces are.

Could someone explain it a bit, or point me to an page
explaining it clearly.

Thanks,

Olivier,

--

 Olivier Georg
  __________________________
     -  d e d o   m u l t i m e d i a  -
  http://www.dedomultimedia.com
Johann Burkard - 03 Nov 2003 19:48 GMT
> I have been working for years with Perl and
> PHP, but I am new to J2EE. I would like to understand
> a bit how it works. I've read a few papers/tutorials,
> but all seem to assume what the home, local and
> remote interfaces are.

Home interfaces let you create instances of EJBs on the application
server. EJBs are possibly remote, so "new BlaEJB()" does not work here.
For Entity Beans, you will have methods to find instances in the home
interface, at least by the bean's primary key. More methods recommended.

The remote interface is one that extends javax.ejb.EJBObject (and
java.rmi.Remote), it's methods may therefore be invoked from another
machine. You put the methods that should be accessible for clients here,
throwing RemoteException or a superclass in every method.

When deploying, your application server creates a Skeleton that
delegates calls to the actual bean.

About the local interfaces - you still have this kind of instance hiding
here (Client -> Delegate -- delegates to --> EJB), but it's call by
reference again so there's no performance overhead.

Johann
Signature

Geh' sterben, einfach strukturierter Junge. Du bist nur Aas, das nach
Bestattung ächzt.
("Ray Banana" in <20021116225404.1251.qmail@gacracker.org>)

Marcus Beyer - 06 Nov 2003 15:24 GMT
> About the local interfaces - you still have this kind of instance hiding
> here (Client -> Delegate -- delegates to --> EJB), but it's call by
> reference again so there's no performance overhead.

Local interfaces can be used if the caller is on the same VM.
Local interfaces are necessary for Container-Managed Relationships.

Marcus


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.