Using object repository

View: New views
5 Messages — Rating Filter:   Alert me  

Using object repository

by Franck Routier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

it's been a long time, hasn't it ?

I come with a little question on Object Repository usage, in case
someone remembers.

Can I put something like :

<object name="org.barracudamvc.core.event.ApplicationGateway">
        <prop name="USE_EVENT_POOLING">false</prop>
</object>


in my object-repositroy.xml and expect ApplicationGateway (and classes
extending it) will have the static boolean field USE_EVENT_POOLING set
to false ?

Anyone on this ?

Franck




--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda

Re: Using object repository

by Franck Routier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, just to answer myself...

I need to say <object class="org... , not <object name="....
and, yes, it works.

So here why I was playing with this :

I propose to add a boolean static field in ApplicationGateway called
SLF4J_MODE.
This property will default to false, so nothing will change in
Barracuda.
Setting it to true (via object-repository) would disable call to log4j
NDC.remove() in ApplicationGateway.

Why this ? This will give the opportunity to run barracuda in a Slf4j
compatible mode with log4j-over-slf4j, as this bridge does not know
about NDC. It is the only place in Barracuda where we use a log4j idiom
not compatible with slf4j bridge (well, it's what I have seen so far :)

So the deal will be : if you want slf4j, don't rely on NDC (anyway you
can't, it does not exist in slf4j). Else, barracuda will continue to do
the clean-up for you in ApplicationGateway.

Does it seem reasonable ?

Franck


Le mercredi 14 novembre 2007 à 09:32 +0100, Franck Routier a écrit :

> Hi list,
>
> it's been a long time, hasn't it ?
>
> I come with a little question on Object Repository usage, in case
> someone remembers.
>
> Can I put something like :
>
> <object name="org.barracudamvc.core.event.ApplicationGateway">
> <prop name="USE_EVENT_POOLING">false</prop>
> </object>
>
>
> in my object-repositroy.xml and expect ApplicationGateway (and classes
> extending it) will have the static boolean field USE_EVENT_POOLING set
> to false ?
>
> Anyone on this ?
>
> Franck
>
>
> pièce jointe document plein texte (message-footer.txt)
> --
> Barracuda mailing list
> Barracuda@...
> http://www.ow2.org/wws/lists/projects/barracuda
--
Franck Routier
Axège Sarl - 23, rue Saint-Simon, 63000 Clermont-Ferrand (FR)
Tél : +33 463 059 540
mèl : franck.routier@...




--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda

Re: Using object repository

by Denny Chambers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds fine to me.

Franck Routier wrote:
Ok, just to answer myself...

I need to say <object class="org... , not <object name="....
and, yes, it works.

So here why I was playing with this :

I propose to add a boolean static field in ApplicationGateway called
SLF4J_MODE.
This property will default to false, so nothing will change in
Barracuda.
Setting it to true (via object-repository) would disable call to log4j
NDC.remove() in ApplicationGateway.

Why this ? This will give the opportunity to run barracuda in a Slf4j
compatible mode with log4j-over-slf4j, as this bridge does not know
about NDC. It is the only place in Barracuda where we use a log4j idiom
not compatible with slf4j bridge (well, it's what I have seen so far :)

So the deal will be : if you want slf4j, don't rely on NDC (anyway you
can't, it does not exist in slf4j). Else, barracuda will continue to do
the clean-up for you in ApplicationGateway.

Does it seem reasonable ?

Franck


Le mercredi 14 novembre 2007 à 09:32 +0100, Franck Routier a écrit :
  
Hi list,

it's been a long time, hasn't it ?

I come with a little question on Object Repository usage, in case
someone remembers.

Can I put something like :

<object name="org.barracudamvc.core.event.ApplicationGateway">
	<prop name="USE_EVENT_POOLING">false</prop>
</object>


in my object-repositroy.xml and expect ApplicationGateway (and classes
extending it) will have the static boolean field USE_EVENT_POOLING set
to false ?

Anyone on this ?

Franck


pièce jointe document plein texte (message-footer.txt)
--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda
    

-- Barracuda mailing list Barracuda@... http://www.ow2.org/wws/lists/projects/barracuda


--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda

Re: Using object repository

by shawnw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Franck,

That should work fine. Note that it is <object class="..."> and not
<object name="...">.

-shawn

Franck Routier wrote:

> Hi list,
>
> it's been a long time, hasn't it ?
>
> I come with a little question on Object Repository usage, in case
> someone remembers.
>
> Can I put something like :
>
> <object name="org.barracudamvc.core.event.ApplicationGateway">
> <prop name="USE_EVENT_POOLING">false</prop>
> </object>
>
>
> in my object-repositroy.xml and expect ApplicationGateway (and classes
> extending it) will have the static boolean field USE_EVENT_POOLING set
> to false ?
>
> Anyone on this ?
>
> Franck
>
>
>
--

========================================
Shawn A. Wilson [shawnw@...]
Senior Software Developer
ATMReports Department, ATM Express Inc.
PH: 877-271-2627 x154, FAX: 877-327-2939
========================================

Helping customers achieve their goals by building trusting
relationships...one at a time.


--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda

Re: Using object repository

by Franck Routier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Shawn and Denny,

so I went ahead and added the SLF4J_MODE flag.

nb : I still see a bug in slf4j (at least I think it is in slf4j) where
barracuda log will output as 'org.apache.log4j.Category' when using
log4j-over-slf4j, but this is another story. I opened a bug in slf4j
bugzila.

Franck


Le mercredi 14 novembre 2007 à 09:02 -0600, Denny Chambers a écrit :

> Sounds fine to me.
>
> Franck Routier wrote:
> > Ok, just to answer myself...
> >
> > I need to say <object class="org... , not <object name="....
> > and, yes, it works.
> >
> > So here why I was playing with this :
> >
> > I propose to add a boolean static field in ApplicationGateway called
> > SLF4J_MODE.
> > This property will default to false, so nothing will change in
> > Barracuda.
> > Setting it to true (via object-repository) would disable call to log4j
> > NDC.remove() in ApplicationGateway.
> >
> > Why this ? This will give the opportunity to run barracuda in a Slf4j
> > compatible mode with log4j-over-slf4j, as this bridge does not know
> > about NDC. It is the only place in Barracuda where we use a log4j idiom
> > not compatible with slf4j bridge (well, it's what I have seen so far :)
> >
> > So the deal will be : if you want slf4j, don't rely on NDC (anyway you
> > can't, it does not exist in slf4j). Else, barracuda will continue to do
> > the clean-up for you in ApplicationGateway.
> >
> > Does it seem reasonable ?
> >
> > Franck
> >
> >
> > Le mercredi 14 novembre 2007 à 09:32 +0100, Franck Routier a écrit :
> >  
> > > Hi list,
> > >
> > > it's been a long time, hasn't it ?
> > >
> > > I come with a little question on Object Repository usage, in case
> > > someone remembers.
> > >
> > > Can I put something like :
> > >
> > > <object name="org.barracudamvc.core.event.ApplicationGateway">
> > > <prop name="USE_EVENT_POOLING">false</prop>
> > > </object>
> > >
> > >
> > > in my object-repositroy.xml and expect ApplicationGateway (and classes
> > > extending it) will have the static boolean field USE_EVENT_POOLING set
> > > to false ?
> > >
> > > Anyone on this ?
> > >
> > > Franck
> > >
> > >
> > > pièce jointe document plein texte (message-footer.txt)
> > > --
> > > Barracuda mailing list
> > > Barracuda@...
> > > http://www.ow2.org/wws/lists/projects/barracuda
> > >    
> > >
> > > __________________________________________________________________
> > >
> > >
> > > --
> > > Barracuda mailing list
> > > Barracuda@...
> > > http://www.ow2.org/wws/lists/projects/barracuda
> > >    
> pièce jointe document plein texte (message-footer.txt)
> --
> Barracuda mailing list
> Barracuda@...
> http://www.ow2.org/wws/lists/projects/barracuda
--
Franck Routier
Axège Sarl - 23, rue Saint-Simon, 63000 Clermont-Ferrand (FR)
Tél : +33 463 059 540
mèl : franck.routier@...




--
Barracuda mailing list
Barracuda@...
http://www.ow2.org/wws/lists/projects/barracuda