为Jboss EAP 6.3安装JDBC [英] Installing JDBC for Jboss EAP 6.3

查看:107
本文介绍了为Jboss EAP 6.3安装JDBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为jboss EAP 6.3创建Oracle Database Express 11数据源.

I am trying to make a Oracle Database Express 11 datasource for jboss EAP 6.3.

我试图遵循本指南但是它告诉我将存档ojdbc5.jar复制到默认服务器配置中的lib目录",这使我感到困惑,因为我没有这样的目录. 在搜索此类目录时,我找到了此页面但那里的文件树与我的完全不同.

I tried to follow this guide but it tells me to "copy the archive ojdbc5.jar to the lib directory in the default server configuration" which confuses me because I have no such directory. In search of such directory I found this page but the file tree there is absolutely different from mine.

如何安装JDBC,以及应将《设置Oracle数据源》指南中的文件放在哪里?

How do I install JDBC and where should I put the files from the "Setting up Oracle datasource" guide?

推荐答案

JBoss-EAP 6.3使用JBoss-AS 7.4.0最终社区版本.

JBoss-EAP 6.3 uses JBoss-AS 7.4.0 Final Communtity Version.

因此,您正在研究JBoss AS 5和AS4.

So you are looking into JBoss AS 5 and AS 4.

要在Jboss EAP 6.3中设置Oracle数据源,您需要执行以下步骤

For Setting Up Oracle DataSource in Jboss EAP 6.3 you need to do the following steps

  1. 您需要按如下所示在独立配置文件的数据源"元素下创建数据源

<datasource jta="true" jndi-name="your jndiName" pool-name="poolname" enabled="true" use-java-context="true" use-ccm="true">
    <connection-url>database URL</connection-url>
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <driver>oracleDriver</driver>
    <pool>
    <min-pool-size>2</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <prefill>true</prefill>
    </pool>
    <security>
    <user-name>username</user-name>
    <password>password</password>
    </security>
    </datasource>

  1. 第二,您需要在配置文件中的驱动程序"下添加驱动程序元素".像这样的东西.

<drivers>
    <driver name="oracleDriver" module="com.oracle"/>
    </drivers>

确保driver元素中的driverName与Datasource元素中的driver元素相同.

Make Sure that driverName in the driver element and that of driver element in your Datasource Element is same.

  1. 第三步是将ojdbc5.jar粘贴到jboss目录下模块目录中的文件夹中. 为此,您需要在modules/system/layers/base/下创建目录com/oracle/main [在此路径中,粘贴复制的jar文件],还需要在主目录
  2. 下创建module.xml文件.
  1. Third Step is to paste the ojdbc5.jar to the folder in your modules directory under jboss directory. For that You need to create directories com/oracle/main under modules/system/layers/base/ [in this path paste the copied jar file] and also need to create module.xml file under main directory

module.xml的内容如下:

The contents of module.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>

请确保上述module.xml文件中的模块名称与为独立配置文件中的驱动程序元素的属性模块指定的名称相同.

Please make sure that module name in above module.xml file and name specified for the attribute module for the driver element in your standalone config file are same.

我认为这些步骤将帮助您在Jboss-EAP 6.3中配置数据源

I think these Steps will help you to configure Datasource in Jboss-EAP 6.3

谢谢

这篇关于为Jboss EAP 6.3安装JDBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆