You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Danny Angus <da...@thought.co.uk> on 2002/05/15 15:48:37 UTC

JDBCListserv mailet

Hi all..


How hard is it to use sqlResources.xml from inside mailets and matchers?

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JDBCListserv mailet

Posted by "Noel J. Bergman" <no...@devtech.com>.
Danny

> > > How hard is it to use sqlResources.xml from inside mailets and
matchers?
> > What is the context of your question?
> I want to use it in a matcher and mailet
> > Are you thinking that mailets and
> > matchers OUGHT to use sqlResources.xml?
> Yes

Take a look at the code I mentioned earlier, and you should see what I mean
about the need for a common helper class.  I don't really have time to do it
now, but maybe I'll make the time, since I've done a lot with that sort of
thing.

Otherwise, it appears to be rather straightforward to use SQLResources.
Just tedious and wasteful without the helper class.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JDBCListserv mailet

Posted by Danny Angus <da...@thought.co.uk>.

> > How hard is it to use sqlResources.xml from inside mailets and matchers?
>
> What is the context of your question?

I want to use it in a matcher and mailet

> Are you thinking that mailets and
> matchers OUGHT to use sqlResources.xml?

Yes



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JDBCListserv mailet

Posted by "Noel J. Bergman" <no...@devtech.com>.
Danny,

> How hard is it to use sqlResources.xml from inside mailets and matchers?

What is the context of your question?  Are you thinking that mailets and
matchers OUGHT to use sqlResources.xml?  It isn't hard to do.  Using
sqlResources.xml is not as brain-dead simple as using a few initParameters
(as with JDBCListserv and JDBCAlias), but it does provide additional
functionality if needed.

There ought to be a support class, in addition to SQLResource, that provides
basic support to any repository, matcher or mailet that wants to use
sqlResources.xml.  SQLResource provides basic access to the contents of
sqlResources.xml, but it does not (and should not) provide environment
specific behavior.  There is a lot of code from JDBCMailRepository for
handling SQLResource that should be moved into a common helper class.

This helper class would contain such things as basic stuff for handling the
path, parsing the URL, creating the SQLResource instance, table existence,
connection acquisition, common behaviors to be specialized, etc.

Thoughts?

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>