geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james_strac...@yahoo.co.uk>
Subject Re: svn commit: r232968 - /geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
Date Tue, 23 Aug 2005 16:32:01 GMT
On 16 Aug 2005, at 16:02, David Jencks wrote:
> I'm -1 on this unless you can provide strong justification why it  
> is necessary.  IMO at the moment (very early in the morning, little  
> coffee :-) making the TCM settable requires synchronizing access to  
> it.  IIUC Spring does support constructor injection, why can't you  
> use it?

I can - its just easier far to use property based injection (as from  
a config file its hard to remember what parameter 3 is etc).

As it happens since I made this change, I've written a Spring  
BeanFactoryBean which wraps the constructor injection used on the  
GeronimoWorkManager and also I think I've refactored all Jencks code  
to use it (http://jencks.org), so I no longer depend on this change.  
So if you really feel strongly about it, by all means roll it back.

James

>
> thanks
> david jencks
>
> On Aug 16, 2005, at 2:21 AM, jstrachan@apache.org wrote:
>
>
>> Author: jstrachan
>> Date: Tue Aug 16 02:21:18 2005
>> New Revision: 232968
>>
>> URL: http://svn.apache.org/viewcvs?rev=232968&view=rev
>> Log:
>> provided property access to the transactionContextManager to make  
>> it easier to conifgure the GeronimoWorkManager from inside Spring  
>> type of environments without requiring constructor injection
>>
>> Modified:
>>     geronimo/trunk/modules/connector/src/java/org/apache/geronimo/ 
>> connector/work/GeronimoWorkManager.java
>>
>> Modified: geronimo/trunk/modules/connector/src/java/org/apache/ 
>> geronimo/connector/work/GeronimoWorkManager.java
>> URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/ 
>> connector/src/java/org/apache/geronimo/connector/work/ 
>> GeronimoWorkManager.java?rev=232968&r1=232967&r2=232968&view=diff
>> ===================================================================== 
>> =========
>> --- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/ 
>> connector/work/GeronimoWorkManager.java (original)
>> +++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/ 
>> connector/work/GeronimoWorkManager.java Tue Aug 16 02:21:18 2005
>> @@ -68,7 +68,7 @@
>>       */
>>      private WorkExecutorPool scheduledWorkExecutorPool;
>>
>> -    private final TransactionContextManager  
>> transactionContextManager;
>> +    private TransactionContextManager transactionContextManager;
>>
>>      private final WorkExecutor scheduleWorkExecutor = new  
>> ScheduleWorkExecutor();
>>      private final WorkExecutor startWorkExecutor = new  
>> StartWorkExecutor();
>> @@ -152,9 +152,17 @@
>>          scheduledWorkExecutorPool.setMaximumPoolSize(maxSize);
>>      }
>>
>> +    public TransactionContextManager getTransactionContextManager 
>> () {
>> +        return transactionContextManager;
>> +    }
>> +
>> +    public void setTransactionContextManager 
>> (TransactionContextManager transactionContextManager) {
>> +        this.transactionContextManager = transactionContextManager;
>> +    }
>> +
>>      /* (non-Javadoc)
>> -     * @see javax.resource.spi.work.WorkManager#doWork 
>> (javax.resource.spi.work.Work)
>> -     */
>> +    * @see javax.resource.spi.work.WorkManager#doWork 
>> (javax.resource.spi.work.Work)
>> +    */
>>      public void doWork(Work work) throws WorkException {
>>          executeWork(new WorkerContext(work,  
>> transactionContextManager), syncWorkExecutor, syncWorkExecutorPool);
>>      }
>>
>>
>>
>
>


James
-------
http://radio.weblogs.com/0112098/


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
http://uk.security.yahoo.com

Mime
View raw message