The XML declaration of RIFE datasources supports a <jndi> tag. This allows you to declare datasources that integrate with JNDI resources that have for example been setup in your servlet container.
For example:
<datasources>
<datasource name="pgsql">
<jndi>java:comp/env/jdbc/postgres</jndi>
<poolsize>5</poolsize>
</datasource>
</datasources>
If your container provides its own connection pooling and you'd rather use that instead of RIFE's built-in pooling, simply set the <poolsize> to 0.
 | In case of NullPointerExceptions when database functoinalities are used
RIFE should automatically detect the SQL variant of your JDNI database for its database features from the meta data that's provided through the JNDI connection. However, if this should fail, you can still specify a JDBC driver class. That class will not be instantiated directly; its name will simply be used internally by RIFE to decide which of several vendor-specific SQL variants to use when constructing queries, creating new tables, and so on. |