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 Serge Knystautas <se...@lokitech.com> on 2001/06/30 16:14:02 UTC

James configuration

Two things...

1. I was under the impression that as Avalon/Phoenix handled instantiating
repositories, it would make sure duplicates of the same repository would not
be created.

For instance, if the conf file specifies file://var/mail/spool, and in
another part of the conf file there is also file://var/mail/spool, then the
two different parts of James would get the same object, even though they're
using different parts of the conf file.  I think Charles recently modified
the conf of the spool repository to manaully control only one instance
getting created.  Is this how James is supposed to be designed, or was this
a bug in Avalon/Phoenix?

2. If we can assume that repository URLs are unique, I'd like to make the
JDBC repository's URL look something like this....
db://<datasource>/<repository_name>.  The "datasource" would need to be
configured in a separate and centralized place in one of the xml conf file,
and would include driver, jdbc URL, and optionally username, password, table
name, and field names.

Does this seem like a good approach to configure of the JDBC repository, and
can anyone give me pointers on where to stick the datasource configuration
and how to access it when it's initialized?

Thanks.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/


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


Re: James configuration

Posted by Oki DZ <ok...@pindad.com>.
"M.P. Willems" wrote:
> 
> >From my point of view, I would like all of the JDBC specific parameters to
> be put in a seperate configuration file, for example a JDBCconf.ini or
> JDBCconf.xml and be stored for example in the conf directory or even in it's

IMHO, it would be better to have JDBC.conf.xml (or, JDBC-conf.xml; hey,
I'm using debian here); having .ini files in Linux machines doesn't
sound right.

Oki

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


Re: James configuration

Posted by Serge Knystautas <se...@lokitech.com>.
Sounds good to me, but is there any way I can leverage Phoenix to load this
conf file for me?  Otherwise I see two options:
- use a properties type file, which is...
  - easy to implement
  - inconsistent with the other conf files
  - less structured, so more difficult to define multiple datasources in the
same file
- use an XML file, which is...
  - more code to write
  - create XML parser dependencies that might create version problems with
Phoenix (if Phoenix changes parsers, this code has to change to)

Anyone know a good way?

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "M.P. Willems" <m....@chello.nl>
To: <ja...@jakarta.apache.org>
Sent: Sunday, July 01, 2001 11:48 AM
Subject: Re: James configuration


> From my point of view, I would like all of the JDBC specific parameters to
> be put in a seperate configuration file, for example a JDBCconf.ini or
> JDBCconf.xml and be stored for example in the conf directory or even in
it's
> own directory where we can store all RDBMS related issue's like the RDBMS
> specific SQL script's. Changing the JDBC or RDBMS would be an isolated
> administrative task. ofcourse ther should be a reveral somewhere in the
> general configuration xml where we can enable the jdbc reposetory and/or
> userlist, That's what i ment with the setting of a logical^boolean but a
> reveral will do the job a lot better ;-)) .... is this your idear of
solving
> the configuration issue ?
>
> ----- Original Message -----
> From: "Serge Knystautas" <se...@lokitech.com>
> To: <ja...@jakarta.apache.org>
> Sent: Saturday, June 30, 2001 4:28 PM
> Subject: Re: James configuration
>
>
> > What would you set true or false?
> > ----- Original Message -----
> > From: "M.P. Willems" <m....@chello.nl>
> > To: <ja...@jakarta.apache.org>
> > Sent: Saturday, June 30, 2001 10:28 AM
> > Subject: Re: James configuration
> >
> >
> > > Isn't a cleaner aproach to set a true or false and handle all the
> > connection
> > > data in a single file, asccii or xml ?
> > >
> > >
> > > ----- Original Message -----
> > > From: "Serge Knystautas" <se...@lokitech.com>
> > > To: <ja...@jakarta.apache.org>
> > > Sent: Saturday, June 30, 2001 4:14 PM
> > > Subject: James configuration
> > >
> > >
> > > > Two things...
> > > >
> > > > 1. I was under the impression that as Avalon/Phoenix handled
> > instantiating
> > > > repositories, it would make sure duplicates of the same repository
> would
> > > not
> > > > be created.
> > > >
> > > > For instance, if the conf file specifies file://var/mail/spool, and
in
> > > > another part of the conf file there is also file://var/mail/spool,
> then
> > > the
> > > > two different parts of James would get the same object, even though
> > > they're
> > > > using different parts of the conf file.  I think Charles recently
> > modified
> > > > the conf of the spool repository to manaully control only one
instance
> > > > getting created.  Is this how James is supposed to be designed, or
was
> > > this
> > > > a bug in Avalon/Phoenix?
> > > >
> > > > 2. If we can assume that repository URLs are unique, I'd like to
make
> > the
> > > > JDBC repository's URL look something like this....
> > > > db://<datasource>/<repository_name>.  The "datasource" would need to
> be
> > > > configured in a separate and centralized place in one of the xml
conf
> > > file,
> > > > and would include driver, jdbc URL, and optionally username,
password,
> > > table
> > > > name, and field names.
> > > >
> > > > Does this seem like a good approach to configure of the JDBC
> repository,
> > > and
> > > > can anyone give me pointers on where to stick the datasource
> > configuration
> > > > and how to access it when it's initialized?
> > > >
> > > > Thanks.
> > > >
> > > > Serge Knystautas
> > > > Loki Technologies
> > > > http://www.lokitech.com/
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
>


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


Re: James configuration

Posted by Charles Benett <ch...@benett1.demon.co.uk>.
"M.P. Willems" wrote:

> >From my point of view, I would like all of the JDBC specific parameters to
> be put in a seperate configuration file, for example a JDBCconf.ini or
> JDBCconf.xml and be stored for example in the conf directory or even in it's
> own directory where we can store all RDBMS related issue's like the RDBMS
> specific SQL script's. Changing the JDBC or RDBMS would be an isolated
> administrative task. ofcourse ther should be a reveral somewhere in the
> general configuration xml where we can enable the jdbc reposetory and/or
> userlist, That's what i ment with the setting of a logical^boolean but a
> reveral will do the job a lot better ;-)) .... is this your idear of solving
> the configuration issue ?
>

I'm currently not fussed whether the jdbc config goes in the main config file
or there is just a pointer.

>
> ----- Original Message -----
> From: "Serge Knystautas" <se...@lokitech.com>
> To: <ja...@jakarta.apache.org>
> Sent: Saturday, June 30, 2001 4:28 PM
> Subject: Re: James configuration
>
> > What would you set true or false?
> > ----- Original Message -----
> > From: "M.P. Willems" <m....@chello.nl>
> > To: <ja...@jakarta.apache.org>
> > Sent: Saturday, June 30, 2001 10:28 AM
> > Subject: Re: James configuration
> >
> >
> > > Isn't a cleaner aproach to set a true or false and handle all the
> > connection
> > > data in a single file, asccii or xml ?
> > >
> > >
> > > ----- Original Message -----
> > > From: "Serge Knystautas" <se...@lokitech.com>
> > > To: <ja...@jakarta.apache.org>
> > > Sent: Saturday, June 30, 2001 4:14 PM
> > > Subject: James configuration
> > >
> > >
> > > > Two things...
> > > >
> > > > 1. I was under the impression that as Avalon/Phoenix handled
> > instantiating
> > > > repositories, it would make sure duplicates of the same repository
> would
> > > not
> > > > be created.

This should happen - specifically AvalonMailStore  should do this (which we
should really remain DefaultMailStore - there's nothing Avalon specific here)

>
> > > >
> > > > For instance, if the conf file specifies file://var/mail/spool, and in
> > > > another part of the conf file there is also file://var/mail/spool,
> then
> > > the
> > > > two different parts of James would get the same object, even though
> > > they're
> > > > using different parts of the conf file.

Yes, that should happen.

>  I think Charles recently
> > modified
> > > > the conf of the spool repository to manaully control only one instance
> > > > getting created.

Really that was because if you have two definitions but you only want one
repository, there is a high likelyhood that you would not specify them
identically.

> Is this how James is supposed to be designed, or was
> > > this
> > > > a bug in Avalon/Phoenix?

Its not an Avalon/Phoenix question.
Have you found a bug? ie identical repository definitions returning different
objects?

>
> > > >
> > > > 2. If we can assume that repository URLs are unique, I'd like to make
> > the
> > > > JDBC repository's URL look something like this....
> > > > db://<datasource>/<repository_name>.  The "datasource" would need to
> be
> > > > configured in a separate and centralized place in one of the xml conf
> > > file,
> > > > and would include driver, jdbc URL, and optionally username, password,
> > > table
> > > > name, and field names.

I think the MailStore section of the config.xml file is the place for this (or
at least a reference to an external file).

>
> > > >
> > > > Does this seem like a good approach to configure of the JDBC
> repository,
> > > and
> > > > can anyone give me pointers on where to stick the datasource
> > configuration
> > > > and how to access it when it's initialized?

The basic config for a datasource should be like a USerJDBCRepository, I guess,
so I think similar config elemements and code should work.

Charles


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


Re: James configuration

Posted by "M.P. Willems" <m....@chello.nl>.
>From my point of view, I would like all of the JDBC specific parameters to
be put in a seperate configuration file, for example a JDBCconf.ini or
JDBCconf.xml and be stored for example in the conf directory or even in it's
own directory where we can store all RDBMS related issue's like the RDBMS
specific SQL script's. Changing the JDBC or RDBMS would be an isolated
administrative task. ofcourse ther should be a reveral somewhere in the
general configuration xml where we can enable the jdbc reposetory and/or
userlist, That's what i ment with the setting of a logical^boolean but a
reveral will do the job a lot better ;-)) .... is this your idear of solving
the configuration issue ?

----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: <ja...@jakarta.apache.org>
Sent: Saturday, June 30, 2001 4:28 PM
Subject: Re: James configuration


> What would you set true or false?
> ----- Original Message -----
> From: "M.P. Willems" <m....@chello.nl>
> To: <ja...@jakarta.apache.org>
> Sent: Saturday, June 30, 2001 10:28 AM
> Subject: Re: James configuration
>
>
> > Isn't a cleaner aproach to set a true or false and handle all the
> connection
> > data in a single file, asccii or xml ?
> >
> >
> > ----- Original Message -----
> > From: "Serge Knystautas" <se...@lokitech.com>
> > To: <ja...@jakarta.apache.org>
> > Sent: Saturday, June 30, 2001 4:14 PM
> > Subject: James configuration
> >
> >
> > > Two things...
> > >
> > > 1. I was under the impression that as Avalon/Phoenix handled
> instantiating
> > > repositories, it would make sure duplicates of the same repository
would
> > not
> > > be created.
> > >
> > > For instance, if the conf file specifies file://var/mail/spool, and in
> > > another part of the conf file there is also file://var/mail/spool,
then
> > the
> > > two different parts of James would get the same object, even though
> > they're
> > > using different parts of the conf file.  I think Charles recently
> modified
> > > the conf of the spool repository to manaully control only one instance
> > > getting created.  Is this how James is supposed to be designed, or was
> > this
> > > a bug in Avalon/Phoenix?
> > >
> > > 2. If we can assume that repository URLs are unique, I'd like to make
> the
> > > JDBC repository's URL look something like this....
> > > db://<datasource>/<repository_name>.  The "datasource" would need to
be
> > > configured in a separate and centralized place in one of the xml conf
> > file,
> > > and would include driver, jdbc URL, and optionally username, password,
> > table
> > > name, and field names.
> > >
> > > Does this seem like a good approach to configure of the JDBC
repository,
> > and
> > > can anyone give me pointers on where to stick the datasource
> configuration
> > > and how to access it when it's initialized?
> > >
> > > Thanks.
> > >
> > > Serge Knystautas
> > > Loki Technologies
> > > http://www.lokitech.com/
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>


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


Re: James configuration

Posted by Serge Knystautas <se...@lokitech.com>.
What would you set true or false?
----- Original Message -----
From: "M.P. Willems" <m....@chello.nl>
To: <ja...@jakarta.apache.org>
Sent: Saturday, June 30, 2001 10:28 AM
Subject: Re: James configuration


> Isn't a cleaner aproach to set a true or false and handle all the
connection
> data in a single file, asccii or xml ?
>
>
> ----- Original Message -----
> From: "Serge Knystautas" <se...@lokitech.com>
> To: <ja...@jakarta.apache.org>
> Sent: Saturday, June 30, 2001 4:14 PM
> Subject: James configuration
>
>
> > Two things...
> >
> > 1. I was under the impression that as Avalon/Phoenix handled
instantiating
> > repositories, it would make sure duplicates of the same repository would
> not
> > be created.
> >
> > For instance, if the conf file specifies file://var/mail/spool, and in
> > another part of the conf file there is also file://var/mail/spool, then
> the
> > two different parts of James would get the same object, even though
> they're
> > using different parts of the conf file.  I think Charles recently
modified
> > the conf of the spool repository to manaully control only one instance
> > getting created.  Is this how James is supposed to be designed, or was
> this
> > a bug in Avalon/Phoenix?
> >
> > 2. If we can assume that repository URLs are unique, I'd like to make
the
> > JDBC repository's URL look something like this....
> > db://<datasource>/<repository_name>.  The "datasource" would need to be
> > configured in a separate and centralized place in one of the xml conf
> file,
> > and would include driver, jdbc URL, and optionally username, password,
> table
> > name, and field names.
> >
> > Does this seem like a good approach to configure of the JDBC repository,
> and
> > can anyone give me pointers on where to stick the datasource
configuration
> > and how to access it when it's initialized?
> >
> > Thanks.
> >
> > Serge Knystautas
> > Loki Technologies
> > http://www.lokitech.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
>


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


Re: James configuration

Posted by "M.P. Willems" <m....@chello.nl>.
Isn't a cleaner aproach to set a true or false and handle all the connection
data in a single file, asccii or xml ?


----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: <ja...@jakarta.apache.org>
Sent: Saturday, June 30, 2001 4:14 PM
Subject: James configuration


> Two things...
>
> 1. I was under the impression that as Avalon/Phoenix handled instantiating
> repositories, it would make sure duplicates of the same repository would
not
> be created.
>
> For instance, if the conf file specifies file://var/mail/spool, and in
> another part of the conf file there is also file://var/mail/spool, then
the
> two different parts of James would get the same object, even though
they're
> using different parts of the conf file.  I think Charles recently modified
> the conf of the spool repository to manaully control only one instance
> getting created.  Is this how James is supposed to be designed, or was
this
> a bug in Avalon/Phoenix?
>
> 2. If we can assume that repository URLs are unique, I'd like to make the
> JDBC repository's URL look something like this....
> db://<datasource>/<repository_name>.  The "datasource" would need to be
> configured in a separate and centralized place in one of the xml conf
file,
> and would include driver, jdbc URL, and optionally username, password,
table
> name, and field names.
>
> Does this seem like a good approach to configure of the JDBC repository,
and
> can anyone give me pointers on where to stick the datasource configuration
> and how to access it when it's initialized?
>
> Thanks.
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>


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