Ignacio,

I think, the JavaComponentBuilder should be using an implementation of
the org.apache.tuscany.spi.services.work.WorkScheduler interface, rather
than the commonj WorkManager directly. This will allow us to switch to a
JCA, commonj or any other implementation that is available based on the
host in which tuscany runs.

For example a possible dependency hierarchy would be
JavaComponentBuilder -> Jsr237WorkScheduler -> ThreadPoolWorkManager
(This is using a commonj work scheduler using our own thread pool based
commonj work manager implementation. If the host system uses Geronimo
JCA work manager, this could be JavaComponentBuilder -> JcaWorkScheduler
-> GeronimoWorkManager. The gist is for the work scheduler to abstract
the work management implementation mechanism.

hth
Meeraj

-----Original Message-----
From: Ignacio Silva-Lepe [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2006 16:37
To: Tuscany Dev
Subject: Re: WorkManager in JavaComponentBuilder

I'm a bit confused by this. I added:
<!-- WorkManager service -->

<component name="workManager">

<system:implementation.system
class="org.apache.tuscany.core.services.work.jsr237.workmanager.ThreadPo
olWorkManager"/>

</component>

to system.scdl as per Jim's directions, did a mvn clean and mvn of sca
and nothing seems to be happening (I even do a mvn clean and mvn of the
top to no avail). Not sure whether or where I should be adding the code
below by Meeraj. Here's where I autowire into JavaComponentBuilder:

    @Autowire
    public void setWorkManager(WorkManager workManager) {
        this.workManager = workManager;
    }

Any ideas?
Thanks
----- Original Message -----
From: "Meeraj Kunnumpurath" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Saturday, July 15, 2006 4:45 PM
Subject: RE: WorkManager in JavaComponentBuilder


The injection sequence should be something like,

WorkManager workManager = new ThreadPoolWorkManager(10);
WorkScheduler workScheuler = new Jsr237WorkScheduler(workManager);
AsyncTargetInvoker invoker = new  AsyncTargetInvoker(workScheuler); //
Sorry I don't know the signature for the constructor

As Jim rightly mentioned you need the commonj classes.

Ta
Meeraj

-----Original Message-----
From: Meeraj Kunnumpurath [mailto:[EMAIL PROTECTED]
Sent: 15 July 2006 21:42
To: tuscany-dev@ws.apache.org
Subject: RE: WorkManager in JavaComponentBuilder

Jim/Ignacio,

There is abstract called WorkScheduler in the SPI, that hides whether
you are using a JCA or commonj work manager. The two implementations are
JcaWorkScheduler and Jsr237WorkScheduler. The Jsr237WorkScheduler can be
injected with a ThreadPoolWorkManager. This way, depending on the host
environment we can inject a work manager provided by the environment.

Ta
Meeraj

-----Original Message-----
From: Jim Marino [mailto:[EMAIL PROTECTED]
Sent: 15 July 2006 21:38
To: tuscany-dev@ws.apache.org
Subject: Re: WorkManager in JavaComponentBuilder

Forgot to mention (you may already know this):

You can use Meeraj's work manager, ThreadPoolWorkManager, as the system
service.

Jim


On Jul 15, 2006, at 1:34 PM, Jim Marino wrote:

> Ignacio,
>
> Can you check the package name of WorkManager? It should be
> commonj.work.WorkManager as opposed to
> javax.resource.spi.work.WorkManager? Using comonj on my machine
> compiles and runs.
>
> Once you get past that, you'll need to have the work manager system
> service deployed as part of the runtime.  Could you add this to the
> system.scdl in the launcher project under ../main/resource/META-INF/
> tuscany? Once you have changed JavaComponentBuilder to add the
> autowire, the WorkManager should be picked up.
>
> If you could submit the changes as a patch, I'll add them to the repo.
>
> Thanks,
> Jim



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message has been checked for all email viruses by MessageLabs.




*****************************************************

    You can find us at www.voca.com

*****************************************************
This communication is confidential and intended for 
the exclusive use of the addressee only. You should 
not disclose its contents to any other person.
If you are not the intended recipient please notify 
the sender named above immediately.

Registered in England, No 1023742,
Registered Office: Voca Limited
Drake House, Three Rivers Court,
Homestead Road, Rickmansworth,
Hertfordshire, WD3 1FX


This message has been checked for all email viruses by MessageLabs.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to