You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Robert McIntosh <ro...@bull-enterprises.com> on 2003/02/13 22:18:31 UTC
Fortress/ECM handlers
I didn't get a response on the user list, so I'm trying here. sorry for
the (late) cross post....
I am, for the moment, using the ExcaliburComponentManagerCreator during
my development with an eye towards going to Fortress for production
(after I learn how to use it wisely, coming from the old ECM). My
question is, how do I mark a service as thread safe or poolable without
using the marker interfaces like old ECM?
I doing something like this might do it:
<role name="com.browsersoft.eq.bc.BusinessObjectService"
shorthand="business-object-service"
default-class="o.a.a.e.component.ThreadSafeComponentHandler">
<hint shorthand="service" class="c.b.e.b.BusinessObjectService" />
</role>
but that requires my conf file to look like:
<root>
<business-object-service>
<service>...more config stuff....</service>
</business-object-service>
</root>
instead of what I want:
<root>
<business-object-service>
... more config stuff...
</business-object-service>
</root>
Any ideas, for either ECMC or Fortress?
Thanks,
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Fortress/ECM handlers
Posted by Robert McIntosh <ro...@bull-enterprises.com>.
well, it seems to be ignoring that. The log shows:
DEBUG 10451 [system.r] (): looking up shorthand
business-object-service, returning
com.browsersoft.eq.bc.BusinessObjectService
DEBUG 10451 [system.c] (): Adding component
(com.browsersoft.eq.bc.BusinessObjectService =
com.browsersoft.eq.bc.BusinessObjectServiceImpl)
DEBUG 10451 [system.c] (): Attempting to get Handler for role
[com.browsersoft.eq.bc.BusinessObjectService]
DEBUG 10451 [system.c] (): Handler type =
org.apache.avalon.excalibur.component.DefaultComponentHandler
I even tried setting the handler to
"org.apache.avalon.excalibur.component.ThreadSafeComponentHandler"
(instead of the Fortress one), as that is what shows up for the
Excalibur conn. pool. component that I'm also using. I also tried the
handler as a sub-tag instead of an attribute, but it ignored that.
again, I'm using ExcaliburComponentManagerCreator and not Fortress
directly (if that makes a difference).
- Robert
Berin Loritsch wrote:
> Robert McIntosh wrote:
>
>>
>
>> In a word, no :-)
>> What I need is the ThreadSafeHandler for my service, which is the
>> class c.b.e.b.BusinessObjectServiceImpl. So what if I did:
>>
>> <role name="com.browsersoft.eq.bc.BusinessObjectService">
>> <component shorthand="buisiness-object-service"
>> class="com.browsersoft.eq.bc.BusinessObjectServiceImpl"
>>
>> handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
>> </role>
>>
>> ???
>> I _think_ the 'handler' attribute is what I was looking for(?)
>
>
> Yep.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Fortress/ECM handlers
Posted by Berin Loritsch <bl...@apache.org>.
Robert McIntosh wrote:
>
> In a word, no :-)
> What I need is the ThreadSafeHandler for my service, which is the class
> c.b.e.b.BusinessObjectServiceImpl. So what if I did:
>
> <role name="com.browsersoft.eq.bc.BusinessObjectService">
> <component shorthand="buisiness-object-service"
> class="com.browsersoft.eq.bc.BusinessObjectServiceImpl"
>
> handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
>
> </role>
>
> ???
> I _think_ the 'handler' attribute is what I was looking for(?)
Yep.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Fortress/ECM handlers
Posted by J Aaron Farr <ja...@yahoo.com>.
--- Robert McIntosh <ro...@bull-enterprises.com> wrote:
>
> J Aaron Farr wrote:
> >Is the "o.a.a.e.component.ThreadSafeComponentHandler" class your
> implementation
> >of "com.browsersoft.eq.bc.BusinessObjectService"? This is the only part I'm
> >not sure of with your example. In any case, what you're looking for is
> using
> >the right handler found in the org.apache.avalon.fortress.impl.handler
> package.
> >
> >
> In a word, no :-)
> What I need is the ThreadSafeHandler for my service, which is the class
> c.b.e.b.BusinessObjectServiceImpl. So what if I did:
>
> <role name="com.browsersoft.eq.bc.BusinessObjectService">
> <component shorthand="buisiness-object-service"
> class="com.browsersoft.eq.bc.BusinessObjectServiceImpl"
>
>
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
> </role>
>
> ???
> I _think_ the 'handler' attribute is what I was looking for(?)
>
> Robert
>
This looks better. Try that and I think you'll have success.
jaaron
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Fortress/ECM handlers
Posted by Robert McIntosh <ro...@bull-enterprises.com>.
J Aaron Farr wrote:
>--- Robert McIntosh <ro...@bull-enterprises.com> wrote:
>
>
>>I didn't get a response on the user list, so I'm trying here. sorry for
>>the (late) cross post....
>>
>>I am, for the moment, using the ExcaliburComponentManagerCreator during
>>my development with an eye towards going to Fortress for production
>>(after I learn how to use it wisely, coming from the old ECM). My
>>question is, how do I mark a service as thread safe or poolable without
>>using the marker interfaces like old ECM?
>>
>>
>>
>
>Your role entry should look something like this:
>
><role name="com.browsersoft.eq.bc.BusinessObjectService">
> <component shorthand="buisiness-object-service"
> class="o.a.a.e.component.ThreadSafeComponentHandler"
>
>handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
></role>
>
>Or something like that. The trick is the handler. The
>ThreadSafeComponentHandler should properly handle any Threadsafe components
>(even without the Threadsafe marker). Similarly there is a
>PoolableComponentHandler for poolable components. While I'm not as familiar
>with ECM, I believe this is the correct translation.
>
>Is the "o.a.a.e.component.ThreadSafeComponentHandler" class your implementation
>of "com.browsersoft.eq.bc.BusinessObjectService"? This is the only part I'm
>not sure of with your example. In any case, what you're looking for is using
>the right handler found in the org.apache.avalon.fortress.impl.handler package.
>
>
In a word, no :-)
What I need is the ThreadSafeHandler for my service, which is the class
c.b.e.b.BusinessObjectServiceImpl. So what if I did:
<role name="com.browsersoft.eq.bc.BusinessObjectService">
<component shorthand="buisiness-object-service"
class="com.browsersoft.eq.bc.BusinessObjectServiceImpl"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
</role>
???
I _think_ the 'handler' attribute is what I was looking for(?)
Robert
>jaaron
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Shopping - Send Flowers for Valentine's Day
>http://shopping.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Fortress/ECM handlers
Posted by J Aaron Farr <ja...@yahoo.com>.
--- Robert McIntosh <ro...@bull-enterprises.com> wrote:
> I didn't get a response on the user list, so I'm trying here. sorry for
> the (late) cross post....
>
> I am, for the moment, using the ExcaliburComponentManagerCreator during
> my development with an eye towards going to Fortress for production
> (after I learn how to use it wisely, coming from the old ECM). My
> question is, how do I mark a service as thread safe or poolable without
> using the marker interfaces like old ECM?
>
Your role entry should look something like this:
<role name="com.browsersoft.eq.bc.BusinessObjectService">
<component shorthand="buisiness-object-service"
class="o.a.a.e.component.ThreadSafeComponentHandler"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
</role>
Or something like that. The trick is the handler. The
ThreadSafeComponentHandler should properly handle any Threadsafe components
(even without the Threadsafe marker). Similarly there is a
PoolableComponentHandler for poolable components. While I'm not as familiar
with ECM, I believe this is the correct translation.
Is the "o.a.a.e.component.ThreadSafeComponentHandler" class your implementation
of "com.browsersoft.eq.bc.BusinessObjectService"? This is the only part I'm
not sure of with your example. In any case, what you're looking for is using
the right handler found in the org.apache.avalon.fortress.impl.handler package.
jaaron
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org