配置 Gatein 为Oracle连接
主要环境: JBOSS 5.1.0 Orace 10G Gatein3.1.0-GA引用一下Gatein 官方使用手册上的原文并简单反译和注解一下大概
主要环境:
JBOSS 5.1.0
Orace 10G
Gatein3.1.0-GA
引用一下Gatein 官方使用手册上的原文并简单反译和注解一下大概意思:
2.1. Database Configuration
2.1.1. Overview
GateIn 3.1 has two different database dependencies. One is the identity service configuration, which depends on Hibernate. The other is Java content repository (JCR) service, which depends on JDBC API, and can integrate with any existing datasource implementation.
When you change the database configuration for the first time, GateIn will automatically generate the proper schema (assuming that the database user has the appropriate permissions).
GateIn 3.1 assumes the default encoding for your database is latin1. You may need to change this parameter for your database in order for GateIn 3.1 to work properly.
概述: 主要是说Gatein依赖两个数据库 一个是用来做身份认证的,是用Hibernate的。 另一个用来支持JCR的,,用JDBC API 两个都可以支持当前任何已存在的数库。 在你第一次改变数据库配置后,Gatein将会自动的生成schema(注解:数据库的方案,就是表,视图等)(你的数据库用户要有这些权限) GateIn3.1假定你的数据库编码方式为latin1,你可能需要改变你的数据库的编码方式来让Gate3.1正常工作 (注解:latin1 就是ISO8859-1编码,这个好像是mySql常用的编码方式,在我建立Oracle数据库时并没有这个编码方式,我用的是UTF-8,这个是宽字符集,应该是兼容的,反正到现在还没发现有问题)2.1.2. Configuring the database for JCR
To configure the database used by JCR you will need to edit the file:
$JBOSS_HOME/server/default/conf/gatein/configuration.propertiesFor Tomcat, the file is located at
$TOMCAT_HOME/gatein/conf/configuration.propertiesAnd edit the values of driver, url, username and password with the values for your JDBC connection (please, refer to your database JDBC driver documentation).
gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
gatein.jcr.datasource.username=sa
gatein.jcr.datasource.password=
By default, the name of the database is "jdbcjcr_${name}" - ${name} should be a part of the database name, as it is dynamically replaced by the name of the portal container extension (for instance, gatein-sample-portal.ear defines "sample-portal" as container name and the default portal defines "portal" as container name).
In the case of HSQL the databases are created automatically. For any other database you will need to create a database named jdbcjcr_portal (and "jdbcjcr_sample-portal" if you have gatein-sample-portal.ear in $JBOSS_HOME/server/default/deploy - note that some databases don't accept '-' in the database name, so you may have to remove $JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear)
Make sure the user has rights to create tables on jdbcjcr_portal, and to update them as they will be automatically created during the first startup .
Also add your database's JDBC driver into the classpath - you can put it in $JBOSS_HOME/server/default/lib (or $TOMCAT_HOME/lib, if you are running on Tomcat)
MySQL example:
Let's configure our JCR to store data in MySQL. Let's pretend we have a user named "gateinuser" with a password "gateinpassword". We would create a database "mygateindb_portal" (remember that _portal is required), and assign our user the rights to create tables.
Then we need to add MySQL's JDBC driver to the classpath, and finally edit gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration to contain the following:
gatein.jcr.datasource.driver=com.mysql.jdbc.Driver
gatein.jcr.datasource.url=jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}
gatein.jcr.datasource.username=gateinuser
gatein.jcr.datasource.password=gateinpassword
2.1.2. JCR的数据库配置修改配置文件: JBOSS: $JBOSS_HOME/server/default/conf/gatein/configuration.propertiesTomcat:$TOMCAT_HOME/gatein/conf/configuration.properties修改其中的驱动,url,用户名,密码,例如:gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
gatein.jcr.datasource.username=sa
gatein.jcr.datasource.password=
....略去说它自已的默认配置方式,重点在下一段里.....
说在数据库为HSQL时,Gatein会自动的创建数据库,但是如果是别的那么要手动的建立名为:"jdbcjcr_portal"的数据库
(注解:根据上一段所说,应该是库名必须为_portal结尾,但是保险起见,我把我oracle的全局数据库名创建为,jdbcjcr_portal,
为这我还重装了一次oracle,不知道如果不改而只是创建一个名为jdbcjcr_portal的schema可以不可以,知道的试下告诉我一下吧)
(还要创建一个名为"jdbcjcr_sample-portal"的数据库,为GateIn的一个例子使用,但是有些数据库不支持"-"命名数据库,
那么就把这个例子删除,位置是$JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear)
(注解:我是直接干掉了这个ear的,简单方便)
要确保你的数据库用户有建表的权限。要把你的数据库驱动考到$JBOSS_HOME/server/default/lib (你用Tomcat的话是$TOMCAT_HOME/lib)给出了一个mysql 的例子:gatein.jcr.datasource.driver=com.mysql.jdbc.Driver
gatein.jcr.datasource.url=jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}
gatein.jcr.datasource.username=gateinuser
gatein.jcr.datasource.password=gateinpassword
我的
gatein.jcr.config.type=local
gatein.jcr.datasource.name=java:jdbcjcr
gatein.jcr.datasource.dialect=auto
gatein.jcr.datasource.driver=oracle.jdbc.driver.OracleDriver
gatein.jcr.datasource.url=jdbc:oracle:thin:@192.168.0.200:1521:dgoral
gatein.jcr.datasource.username=jdbcjcr_portal
gatein.jcr.datasource.password=XXXX
2.1.3. Configuring the database for the default identity store
By default, users are stored in a database. To change the database in which to store users, you will need to edit the file:
$JBOSS_HOME/server/default/conf/gatein/configuration.propertiesFor Tomcat, the file is located at
$TOMCAT_HOME/gatein/conf/configuration.propertiesYou will find the same kind of configuration as in jcr-configuration.xml:
gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
gatein.idm.datasource.username=sa
gatein.idm.datasource.password2.1.3. 配置身份认证的数据库还是上面的那个配置文件:JBOSS: $JBOSS_HOME/server/default/conf/gatein/configuration.propertiesTomcat:$TOMCAT_HOME/gatein/conf/configuration.properties例子:(注解:这个我和上面那个用的同一个库,粘帖下就行了)gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
gatein.idm.datasource.username=sa
gatein.idm.datasource.password
我的
# IDM
gatein.idm.datasource.name=java:jdbcidm
gatein.idm.datasource.driver=oracle.jdbc.driver.OracleDriver
gatein.idm.datasource.url=jdbc:oracle:thin:@192.168.0.200:1521:dgoral
gatein.idm.datasource.username=jdbcjcr_porta
gatein.idm.datasource.password=XXXX
看完上面的也就基本可以弄好了。多说一点,我对Oracle不是很了解,oracle的sid是不可以有“_“的,但是全局数据库名可以有,但是连接url中的部分还是要写sid的,写数据库名是不行了,有了解oracle的请指点一下。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











素因数分解 - 整数理論では、正の整数の素因数は、その整数を正確に割る素数です。これらの数を見つけるプロセスは、整数因数分解、または素因数分解と呼ばれます。例 - 288 の素因数は: 288=2x2x2x2x2

2025年、グローバルデジタル仮想通貨取引プラットフォームは、トランザクションのボリューム、セキュリティ、ユーザーエクスペリエンスなどの指標に基づいて、2025年に世界のトップ10のデジタル通貨取引プラットフォームを激しく競争しています。 OKXは、強力な技術的強さとグローバルな運用戦略で最初にランクされており、Binanceは高流動性と低料金に密接に続きます。 Gate.io、Coinbase、Krakenなどのプラットフォームは、それぞれの利点がある最前線にいます。このリストには、Huobi、Kucoin、Bitfinex、Crypto.com、Geminiなどの取引プラットフォームがそれぞれ独自の特徴がありますが、投資は注意する必要があります。プラットフォームを選択するには、セキュリティ、流動性、料金、ユーザーエクスペリエンス、通貨選択、規制コンプライアンスなどの要因を考慮し、合理的に投資する必要があります

トップ10の仮想通貨取引プラットフォームのランキング(2025年の最新): Binance:グローバルリーダー、高い流動性、規制が注目を集めています。 OKX:大規模なユーザーベース、複数の通貨をサポートし、レバレッジされた取引を提供します。 gate.io:さまざまなフィアット通貨支払い方法を備えた上級交換は、さまざまな取引ペアと投資商品を提供します。 Bitget:デリバティブ交換、高流動性、低料金。 Huobi:さまざまな通貨と取引ペアをサポートする古い交換。 コインベース:厳密に規制されている有名なアメリカの交換。 フェメックスなど。

トップ10のデジタル通貨取引プラットフォーム:1。OKX、2。BINANCE、3。GATE.IO、4。HuobiGlobal、5。Kraken、6。Coinbase、7。Kucoin、8。Bitfinex、9。Crypto.com、10。Gemini、これらの交換は、ユーザーがユーザーを選択できます。

この記事では、10個のデジタル通貨トレーディング。プラットフォームを選択する際には、セキュリティ、流動性、取引料、通貨選択、ユーザーインターフェイス、カスタマーサービスサポート、規制コンプライアンスなどの要因を考慮し、リスクを慎重に評価し、盲目的にトレンドに従うことはありません。

信頼できるデジタル通貨プラットフォームには、1。OKX、2。GATE.IO、4。HuobiGlobal、6。Coinbase、7。Bitfinex、9。Crypto.com、10。Geminiが顧客を選択することができます。

トップの仮想通貨プラットフォームは次のとおりです。 ランキングは、プラットフォームの流動性、通貨の選択、セキュリティ、ユーザーエクスペリエンス、取り扱い料、コンプライアンスなどの包括的な考慮事項に基づいていますが、参照のみがお客様の責任である必要があります。

デジタル通貨市場が急増するため、この記事には、投資家が信頼できる使いやすいプラットフォームを選択できるように、上位10のデジタル通貨取引アプリをリストします。ランキングリストには、Binance、Coinbase、Gemini、Kraken、FTX、Huobi、Okx、Bitfinex、Crypto.com、およびgate.ioが含まれます。これらのアプリは、幅広い取引ペア、安全で信頼性の高いプラットフォーム、低い取引手数料、高流動性を提供します。投資家は、セキュリティ、ユーザーフレンドリー、取引手数料、流動性、サポート通貨、顧客サービスなどの要因に基づいて、ニーズを最大限に満たすアプリを選択する必要があります。
