How to configure the dynamic database for the formbuilder

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to configure the dynamic database for the formbuilder

Prathyush
How to handle dynamic database  for form builder. Which way I need to configure the Data Base source name in "context.xml" from the tomcat and "Orbeon forms" are stored in single "orbeon" static db.

As of now I am using the following context in the **context.xml** and it access the static DB and then create/update/delete the forms.

    <Resource name="jdbc/postgres" auth="Container" type="javax.sql.DataSource"
    initialSize="3" maxActive="10" maxIdle="20" maxWait="30000"
    driverClassName="org.postgresql.Driver"
    poolPreparedStatements="true"
    validationQuery="select 1 "
    testOnBorrow="true"
    username="orbeon"
    password="orbeon"
    url="jdbc:postgresql://localhost:3306/orbeon?useUnicode=true&amp;characterEncoding=UTF8"/> 

Here "orbeon" is the static DB.

Instead of static DB I need to give a Dynamic DB. Before user open the form builder "**URL**" I given login page. If authentication is success then based on the userid user can access the forms his DB only.
Reply | Threaded
Open this post in threaded view
|

Re: How to configure the dynamic database for the formbuilder

Alessandro  Vernet
Administrator
Hi Prathyush,

As you said, the datasource name you setup in server.xml is "set there", and in that way is "static". I gather from your message that you'd like to pick a different datasource, based on some condition; is this correct, or are you trying to do something else? Maybe it would help us understand what you're trying to do if you could share with us a little bit of background on your situation.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to configure the dynamic database for the formbuilder

Alessandro  Vernet
Administrator
As a follow-up, for those finding this thread, Prathyush posted a description of the situation that I was able to better understand on Stack Overflow, and I've posted a response there.

http://stackoverflow.com/questions/32518172/how-to-connect-single-orbeon-with-dynamic-databases-which-changes-when-user-chan

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet