You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Ignacio Silva-Lepe <is...@verizon.net> on 2006/07/15 20:45:48 UTC
WorkManager in JavaComponentBuilder
To allow JavaAtomicComponent to create a new AsyncJavaTargetInvoker, it needs to supply the new target invoker with a work manager. My first try (which may not be the appropriate thing to do) was to get a work manager autowired into JavaComponentBuilder, which then passes it to JavaAtomicComponent. However when I do this I get a NoClassDefFoundError when the build tries to run the samples (local.wire, local.wire.cdi, calculator). I could add the
dependency to each sample's pom.xml, which seems to eliminate the error sample by sample. Or I could add the dependency to the entire samples directory's pom.xml, which at the moment has no dependencies. Or I could just be doing the wrong thing and I should supply the work manager in some other way. Thoughts?
Re: WorkManager in JavaComponentBuilder
Posted by Jim Marino <jm...@myromatours.com>.
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
>
>
>
> On Jul 15, 2006, at 12:43 PM, Ignacio Silva-Lepe wrote:
>
>> All I do is to run mvn from chianti/sca, after adding the autowire
>> to JavaComponentBuilder
>> ----- Original Message ----- From: "Jim Marino"
>> <jm...@myromatours.com>
>> To: <tu...@ws.apache.org>
>> Sent: Saturday, July 15, 2006 2:59 PM
>> Subject: Re: WorkManager in JavaComponentBuilder
>>
>>
>>>
>>> On Jul 15, 2006, at 11:45 AM, Ignacio Silva-Lepe wrote:
>>>
>>>> To allow JavaAtomicComponent to create a new
>>>> AsyncJavaTargetInvoker, it needs to supply the new target
>>>> invoker with a work manager. My first try (which may not be the
>>>> appropriate thing to do) was to get a work manager autowired
>>>> into JavaComponentBuilder, which then passes it to
>>>> JavaAtomicComponent.
>>> That is how I would do it.
>>>
>>>> However when I do this I get a NoClassDefFoundError when the
>>>> build tries to run the samples (local.wire, local.wire.cdi,
>>>> calculator). I could add the
>>>> dependency to each sample's pom.xml, which seems to eliminate
>>>> the error sample by sample. Or I could add the dependency to
>>>> the entire samples directory's pom.xml, which at the moment has
>>>> no dependencies. Or I could just be doing the wrong thing and I
>>>> should supply the work manager in some other way. Thoughts?
>>>
>>> The work manager dependency shouldn't be surfaced to the samples
>>> since it is an implementation detail of the runtime. How are
>>> you executing the samples? I'm wondering if the appropriate jars
>>> are not being put on the classpath?
>>>
>>> Jim
>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: WorkManager in JavaComponentBuilder
Posted by Jim Marino <jm...@myromatours.com>.
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
On Jul 15, 2006, at 12:43 PM, Ignacio Silva-Lepe wrote:
> All I do is to run mvn from chianti/sca, after adding the autowire
> to JavaComponentBuilder
> ----- Original Message ----- From: "Jim Marino"
> <jm...@myromatours.com>
> To: <tu...@ws.apache.org>
> Sent: Saturday, July 15, 2006 2:59 PM
> Subject: Re: WorkManager in JavaComponentBuilder
>
>
>>
>> On Jul 15, 2006, at 11:45 AM, Ignacio Silva-Lepe wrote:
>>
>>> To allow JavaAtomicComponent to create a new
>>> AsyncJavaTargetInvoker, it needs to supply the new target
>>> invoker with a work manager. My first try (which may not be the
>>> appropriate thing to do) was to get a work manager autowired
>>> into JavaComponentBuilder, which then passes it to
>>> JavaAtomicComponent.
>> That is how I would do it.
>>
>>> However when I do this I get a NoClassDefFoundError when the
>>> build tries to run the samples (local.wire, local.wire.cdi,
>>> calculator). I could add the
>>> dependency to each sample's pom.xml, which seems to eliminate
>>> the error sample by sample. Or I could add the dependency to the
>>> entire samples directory's pom.xml, which at the moment has no
>>> dependencies. Or I could just be doing the wrong thing and I
>>> should supply the work manager in some other way. Thoughts?
>>
>> The work manager dependency shouldn't be surfaced to the samples
>> since it is an implementation detail of the runtime. How are you
>> executing the samples? I'm wondering if the appropriate jars are
>> not being put on the classpath?
>>
>> Jim
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: WorkManager in JavaComponentBuilder
Posted by Ignacio Silva-Lepe <is...@verizon.net>.
All I do is to run mvn from chianti/sca, after adding the autowire to
JavaComponentBuilder
----- Original Message -----
From: "Jim Marino" <jm...@myromatours.com>
To: <tu...@ws.apache.org>
Sent: Saturday, July 15, 2006 2:59 PM
Subject: Re: WorkManager in JavaComponentBuilder
>
> On Jul 15, 2006, at 11:45 AM, Ignacio Silva-Lepe wrote:
>
>> To allow JavaAtomicComponent to create a new AsyncJavaTargetInvoker, it
>> needs to supply the new target invoker with a work manager. My first try
>> (which may not be the appropriate thing to do) was to get a work manager
>> autowired into JavaComponentBuilder, which then passes it to
>> JavaAtomicComponent.
> That is how I would do it.
>
>> However when I do this I get a NoClassDefFoundError when the build tries
>> to run the samples (local.wire, local.wire.cdi, calculator). I could add
>> the
>> dependency to each sample's pom.xml, which seems to eliminate the error
>> sample by sample. Or I could add the dependency to the entire samples
>> directory's pom.xml, which at the moment has no dependencies. Or I could
>> just be doing the wrong thing and I should supply the work manager in
>> some other way. Thoughts?
>
> The work manager dependency shouldn't be surfaced to the samples since it
> is an implementation detail of the runtime. How are you executing the
> samples? I'm wondering if the appropriate jars are not being put on the
> classpath?
>
> Jim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: WorkManager in JavaComponentBuilder
Posted by Jim Marino <jm...@myromatours.com>.
On Jul 15, 2006, at 11:45 AM, Ignacio Silva-Lepe wrote:
> To allow JavaAtomicComponent to create a new
> AsyncJavaTargetInvoker, it needs to supply the new target invoker
> with a work manager. My first try (which may not be the appropriate
> thing to do) was to get a work manager autowired into
> JavaComponentBuilder, which then passes it to JavaAtomicComponent.
That is how I would do it.
> However when I do this I get a NoClassDefFoundError when the build
> tries to run the samples (local.wire, local.wire.cdi, calculator).
> I could add the
> dependency to each sample's pom.xml, which seems to eliminate the
> error sample by sample. Or I could add the dependency to the entire
> samples directory's pom.xml, which at the moment has no
> dependencies. Or I could just be doing the wrong thing and I should
> supply the work manager in some other way. Thoughts?
The work manager dependency shouldn't be surfaced to the samples
since it is an implementation detail of the runtime. How are you
executing the samples? I'm wondering if the appropriate jars are not
being put on the classpath?
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org