Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the best way of using dynamic JDBC username and password?
    primarykey
    data
    text
    <p>We are creating an XPages application with an MySQL backend. Application will be used by several customers. Each has their own NSF database and a corresponding MySQL database. Each customer will have their own MySQL username. We are using the Extension Library JDBC components (<code>ConnectionManager</code>).</p> <p>We were planning to store the username and password in a <code>NotesDocument</code>. This way the NSF's design can be easily updated from NTF template without affecting this data. However, the ConnectionManager component and <code>@GetJdbcConnection</code> SSJS function both read the username, password and other connection info from a file stored in <em>WEB-INF/jdbc</em> folder. Files stored there will be overwritten when the NSF design is updated, thus losing the customer-specific information.</p> <p>There seems to be no way of making these files dynamic (WEB-INF is by specification read-only) or to include dynamic elements inside them (see my <a href="https://stackoverflow.com/questions/16938384/can-jdbc-connection-files-contain-computed-properties">previous question</a>).</p> <p>We could use a dynamic JDBC URL in the <code>ConnectionManager</code>, however the ExtLib book warns against this practice. It seems that we then lose the connection pooling. And besides, the <code>@GetJdbcConnection</code> function does not accept JDBC URLS.</p> <p>So, what is the best way of storing NSF-specific JDBC connection information?</p> <h2>EDIT: SOLVED</h2> <p>I created a subclass of the jdbcConnectionManager component. The procedure is detailed here: <a href="http://lazynotesguy.net/blog/2013/08/09/subclassing-an-extlib-component/" rel="nofollow noreferrer">http://lazynotesguy.net/blog/2013/08/09/subclassing-an-extlib-component/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload