Hi Jeremy
You can add parameters to your config file (i.e. config.xml) as follows:
<config>
...
<param name="PARAM_NAME">PARAM_VALUE</param>
...
</config>
And then reference these from other places (e.g. datasources.xml) as
follows:
<config param="PARAM_NAME" />
So if you had a parameter for a db username and password (i.e. the
following lines in config.xml):
<param name="DB_USER">john_smith</param>
<param name="DB_PASS">secret123</param>
Then your datasources.xml would contain something like
<datasources>
...
<datasource name="xxx">
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/somedatabase</url>
<user><config param="DB_USER" /></user>
<password><config param="DB_PASS" /></password>
<poolsize>5</poolsize>
</datasource>
...
</datasources>
By the way, you can also access parameters in your config file in Java
code as follows:
Config.getRepInstance().getString("PARAM_NAME")
I think the answer to your question 2 is yes but I don't know how to do
this (you don't need to).
Can't help you on 3.
Cheers
Chris
Jeremy Whitlock wrote:
Hi All,
I have made great progress with RIFE the last few days but now I
have a few more questions about RIFE's capabilities:
1. Can the RIFE configuration files references values/parameters in the
other RIFE configuration files? (For example, I would like the
datasources.xml to reference a value in the config.xml)
2. If not, can I create a datasource programmatically that would
usually get created by the datasources.xml?
3. If I need to reference RIFE classes in another Servlet deployed as
part of the same web application, how can I do this?
I looked for the answers to these myself but didn't find anything so
that is why I'm here. Please bear with me and thank you in advance.
Take care,
Jeremy
P.S. - Sorry for the ambiguous subject but how else can you sum up three
questions?
------------------------------------------------------------------------
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users