Hi,
What I mean by loose coupling is to have a client that is not forced to specify
what ejbs will use in its application-client.xml file. You can then connect to a
specific EJB dinamicallyand its stubs are obtained.
This is also very useful for test scripts that can connect to any remote objects
dinamically.
This has more to do with extensibility. In my distributed architecture I want to
create an extensible system.
I mean, if I introduce another component I should not have to change every client
application-client.xml file.
Now, you must specify all components you are connnecting to.
Of course you can create a Facade or mediator component in the server that access
the new components and thus you are not forced to change any client, but you
still have to change the ejb-jar for this component.
Regards,
Pedro
Scott Durrant wrote:
> I'm not sure exactly what you are looking for. I think the EJBMetaData
> interface is to be used at deployment time. In essence you can
> parameterize an application at run time, which is IMO very loose coupling.
>
> Can you be more specific with what you are trying to do?
>
> Scott Durrant
> Human Genetics
> University of Utah
> [EMAIL PROTECTED]
>
> On Fri, 16 Jun 2000, Pedro Garcia Lopez wrote:
>
> > Hi all,
> >
> > How can I achieve loose coupling ?
> >
> > In the EJB spec they say:
> > "The javax.ejb.EJBMetaData interface is intended to allow applications
> > assembly tools to discover informationabout the session bean, and to
> > allow loose client/server binding and client-side scripting."
> >
> > I want to use a EJB from an application client *without* having to
> > reference it in the application-client.xml file.
> > But how can I do that ?
> >
> > This is the EJBMetadata API:
> > EJBHome getEJBHome()
> > java.lang.Class getHomeInterfaceClass()
> > java.lang.Class getPrimaryKeyClass()
> > java.lang.Class getRemoteInterfaceClass()
> > boolean isSession()
> > boolean isStatelessSession()
> >
> > The only thing I can only do with this is getting methods information
> > from my EJB using the RemoteInterfaceClass.
> >
> > And, in order to obtain this EJBMetaData I need the home interface of
> > the EJB (getEJBMEtadata).
> >
> > PlaceHome home = (PlaceHome)PortableRemoteObject.narrow(homeObject,
> > PlaceHome.class);
> > Place thePlace =
> > (Place)PortableRemoteObject.narrow(home.create("pedro"), Place.class);
> >
> > Where should I use this class ?
> >
> > Has anybody achieved this loose coupling ?
> >
> > Regards,
> >
> > Pedro
> >
> > ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff EJB-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".