You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by JJ <uk...@yahoo.com> on 2004/02/26 03:22:40 UTC

Using DataSources within a mailet or matcher

I need to query a database during the processing of
mail. I've looked at the three configuration files in
the \SAR-INF directory but cannot easily ascertain
where I would specify a resource as I would in say
Tomcat.

Is it possible to set up a DataSource in James and get
a reference to it via JNDI in a mailet init() method?

Any help, as always, greatly appreciated.

Jonathan (CIT Ltd, Auckland, N.Z.)

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

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


Specifying DataSources... Kernel.xml??

Posted by JJ <uk...@yahoo.com>.
If a DataSource is obtained by doing a look up on the
Avalon ComponentManager is a component element
specified for a DataSource in the kernel.xml file?
This is the only place I can find any declarative
configuration information that looks like it might
apply to the ComponentManager. If this is the place to
specify a data source, what's the format of the
<component/> element? There's no DTD for this
document.

Thanks in advance for any help...

Jonathan (CIT Ltd. Auckland)

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

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


RE: Using DataSources within a mailet or matcher

Posted by JJ <uk...@yahoo.com>.
>> Is it possible to set up a DataSource in James and
>> get a reference to it via JNDI in a mailet init()
>> method?
 
> Not at this time.  See the other JDBC using mailets
> for examples.  This will
> change when we incorporate JNDI.
> 
> 	--- Noel

I've had a look at Mailets that use DataSources,
JDBCAlias for example. Rather than using JNDI you're
using the Avalon ComponentManager to do a lookup. I'm
still not quite sure where it is that I specify the
DataSources name, driver, url etc. How / where do I
make a DataSource available to the Avalon
ComponentManager?

regards,

Jonathan
  


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

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


External and Internal mailing problems....

Posted by Thomas Greenough <th...@autonomous.co.uk>.
This does seem like something which is so obvious...but:

I have installed James on my local network, no problems, mysql integrated
fine.  I can send mail to external addresses, and receive it - no problem.

HOWEVER, when another user (outwith my network), tries to use James to send
and receive he can receive from all, but only send mails to other 'users' -
he cannot send to external addresses.

Have I overlooked something very basic?


Thomas
-- 



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


RE: Using DataSources within a mailet or matcher

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Is it possible to set up a DataSource in James and get
> a reference to it via JNDI in a mailet init() method?

Not at this time.  See the other JDBC using mailets for examples.  This will
change when we incorporate JNDI.

	--- Noel


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