How to create an unmanaged datasource in JBoss EAP 6?

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6

Issue

  • What is the difference between an unmanaged and managed datasource?
  • How to create an unmanaged datasource through admin console in JBoss EAP 6?

Resolution

  • There are two ways to create a datasource :
    • Managed : This datasource is either created by installing the JDBC driver as a deployment or installing the JDBC driver as custom module in EAP 6.
    • Unmanaged : The JDBC driver can be any location on the system.
  • To create an unmanaged datasource(for example, for an OJDBC driver) :
    • 1) Navigate to Runtime --> Domain --> Add
    • 2) Choose the unmanaged option for deployment
    • 3) Specify the path to the oracle driver as : /PathToJAR-Folder/OracleJars/ojdbc6.jar
    • 4) The next option Relative-to is a path reference, such as jboss.server.log.dir. So it should in this case be empty.
    • 5) Then set the Name and Runtime Name to ojdbc6.jar.
    • 6) Once this is done, assign it to your respective server group.

Note :
- When creating an unmanaged datasource, there is no need to create a module. The path to the Oracle driver can be given from any location.
- Then follow the same procedure for creating a datasource and you should see the driver listed under Deployed JDBC Driver Window.

Caveats when using unmanaged datasource
Please see JBoss EAP 6 datasource configuration *-ds.xml & @DataSourceDefinition

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.