arrow_back history picture_as_pdf This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ~~Title: DataSourceHandler and DBCredentials~~ Simple integration of multiple databases is an easy task with JVx. Configuration is usually completed via the application's, config.xml file. This allows for easy access in the LifeCycle objects: <file xml config.xml> <?xml version="1.0" encoding="UTF-8"?> <application> <securitymanager> <class>com.sibvisions.rad.server.security.DBSecurityManager</class> <database datasource="mydb" /> </securitymanager> <datasource> <db name="mydb"> <url>jdbc:oracle:thin:@localhost:1521:mydb</url> <username>user</username> <password>password</password> </db> <db name="masterdb"> <url>jdbc:derby://localhost:1527/masterdb</url> <username>master</username> <password>master</password> </db> </datasource> </application> </file> To access: <file java> IConfiguration config = SessionContext.getCurrentSessionConfig(); dba = DBAccess.getDBAccess(DBSecurityManager.getCredentials(config)); dba.open(); </file> using the DataSource of the SecurityManager. To access DataSources independently from the Security Manager we use DataSourceHandler: <file java> IConfiguration config = SessionContext.getCurrentSessionConfig(); DBCredentials cred = DataSourceHandler.createDBCredentials(config, "masterdb"); dba = DBAccess.getDBAccess(cred); dba.open(); </file> \\ **<fs 20px>Hint</fs>** The [[jvx:server:security:dbsecman|DB Security Manager]] allows the use of a standard DataSource without any additional configuration effort: <file xml config.xml> <?xml version="1.0" encoding="UTF-8"?> <application> <securitymanager> <class>com.sibvisions.rad.server.security.DBSecurityManager</class> </securitymanager> <datasource> <db name="default"> <url>jdbc:oracle:thin:@localhost:1521:mydb</url> <username>user</username> <password>password</password> </db> </datasource> </application> </file> The Security Manager uses the DataSource named "default" as the standard connection.