You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Dr John Hunt <jo...@www.midmarsh.co.uk> on 2007/08/06 12:36:16 UTC

EJB Binding

Hi All,

I am trying to determine what the concrete steps are likely to be when using
the EJB binding to publish an SCA services as an SLSB.

>From looking at the documentation available it looks like it is necessary to
define a service declaration

<service name="JobBank">
   <interface.java interface="com.app.jobbank.JobBankService"/>
   <binding.ejb location="corbaname:rir:host:port#ejb/JobBankServiceHome"
      homeInterface="com.app.jobbank.JobBankServiceHome"
      ejb-link-name="jobbankEJB.jar#JobBankComponent"/>
</service>

And that the SCA interface can be treated as the business interface.

But is it necessary to define:

1.	The home interface manually or is this done by the binding implementation
and if so when – at deployment time – via a tool etc.
2.	the business interface – ditto 1.
3.	The implementation bean – is this a wrapping for the SCA component?

Regards,

John


Dr. John Hunt


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: EJB Binding

Posted by Raymond Feng <en...@gmail.com>.
Hi, John.

Please see my comments inline.

Thanks,
Raymond

----- Original Message ----- 
From: "Dr John Hunt" <jo...@www.midmarsh.co.uk>
To: <tu...@ws.apache.org>
Sent: Monday, August 06, 2007 3:36 AM
Subject: EJB Binding


> Hi All,
>
> I am trying to determine what the concrete steps are likely to be when 
> using
> the EJB binding to publish an SCA services as an SLSB.
>

Unfortunately, we only have the reference binding support for SLSB (call 
SLSB from SCA) in Tuscany at this moment. Any contribution to support SLSB 
service binding is welcome. :-)

> From looking at the documentation available it looks like it is necessary 
> to
> define a service declaration
>
> <service name="JobBank">
>   <interface.java interface="com.app.jobbank.JobBankService"/>
>   <binding.ejb location="corbaname:rir:host:port#ejb/JobBankServiceHome"
>      homeInterface="com.app.jobbank.JobBankServiceHome"
>      ejb-link-name="jobbankEJB.jar#JobBankComponent"/>
> </service>
>
> And that the SCA interface can be treated as the business interface.
>
> But is it necessary to define:
>
> 1. The home interface manually or is this done by the binding 
> implementation
> and if so when - at deployment time - via a tool etc.

The spec says the homeInterface is optional. My take is that it can be 
provided by the application, by the tool or by the runtime (dynamically 
generated from the service interface).

> 2. the business interface - ditto 1.

The business interface is used for wiring purpose. All the operations in the 
business interface have to be implemented by the SLSB, i.e., there will be a 
corresponding compatible method in the SLSB (the interface and 
implementation) for each operation in the business interface.

> 3. The implementation bean - is this a wrapping for the SCA component?

I assume so. To expose a SCA component to SLSB binding, we might have 
different ways depending on the hosting EJB container. One quick-and-dirty 
way is that the deployment tool will generate the JEE artifacts 
(home/remote/local interface, deployment descriptor, bean impl). It's also 
possible that the runtime dynamically generates the JEE code using ASM and 
make it available to the EJB container (for example, OpenEJB).

>
> Regards,
>
> John
>
>
> Dr. John Hunt
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org