james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenny Smith <james-l...@journalscape.com>
Subject Re: Suggestions for Beginning Dev
Date Mon, 12 Jan 2004 01:15:50 GMT
Hi Noel,

Totally understood about preparing for change. I can't figure out how  
to get a ComponentManager. This is the code I'm trying to imitate from  
JDBCVirtualUserTable:

--------------------------------------------------------------------
ComponentManager componentManager =  
(ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPO 
NENT_MANAGER);

// Get the DataSourceSelector service
DataSourceSelector datasources =  
(DataSourceSelector)componentManager.lookup(DataSourceSelector.ROLE);

// Get the data-source required.
datasource = (DataSourceComponent)datasources.select(datasourceName);

conn = datasource.getConnection();
--------------------------------------------------------------------

I can't figure out how to get a ComponentManager from the SMTPHandler,  
SMTPHandlerConfigurationData or MailServer. Any help?

Thanks!
Kenny

On Jan 11, 2004, at 3:40 PM, Noel J. Bergman wrote:

>> I found code in JDBCVirtualUserTable that gets a data source, is that
>> the proper way to get a data source in a place like SMTPHandler?
>
> For now.  And be prepared to change.
>
> 	--- Noel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>
-- Kenny


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message