to worldheart(时讯技术):
网上一份JBoss 3_0 Documentation(Html和PDF版),里面讲的还是JBoss 2.4.3得内容。
不知何处可以得到最新得文档?
本来想到jboss.org得网站上看看,他们得系统升级,论坛不开,好些天了,真急死了!
网上一份JBoss 3_0 Documentation(Html和PDF版),里面讲的还是JBoss 2.4.3得内容。
不知何处可以得到最新得文档?
本来想到jboss.org得网站上看看,他们得系统升级,论坛不开,好些天了,真急死了!
<!-- ===================================================================== -->
<!-- -->
<!-- foo App DataSource -->
<!-- -->
<!-- ===================================================================== --><!-- $Id: resource.xml,v 1.5 2001/10/11 22:13:58 d_jencks Exp $ -->
<server> <depends>JBOSS-SYSTEM:service=Naming</depends>
<depends>JBOSS-SYSTEM:service=TransactionManager</depends>
<depends>JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</depends>
<depends>JCA:service=RARDeployer</depends> <classpath codebase="lib" archives="mm.mysql-2.0.4-bin.jar"/> <!-- ==================================================================== -->
<!-- JDBC - Initialize the databases -->
<!-- to ConnectionFactoryLoader -->
<!-- ==================================================================== --> <mbean code="org.jboss.resource.ConnectionFactoryLoader"
name="DefaultDomain:service=ConnectionFactoryLoader,name=fooDS">
<attribute name="ManagedConnectionFactoryProperties">ConnectionURL=jdbc:mysql://localhost/arison_prp
DriverClass=org.gjt.mm.mysql.Driver
UserName=root</attribute>
<attribute name="JndiName">mySQLDS</attribute>
<attribute name="TransactionManagerName">java:/TransactionManager</attribute>
<attribute name="ResourceAdapterName">Minerva JDBC LocalTransaction ResourceAdapter</attribute>
<attribute name="RARDeployerName">JCA:service=RARDeployer</attribute>
<attribute name="ConnectionManagerFactoryName">MinervaSharedLocalCMFactory</attribute>
<attribute name="ConnectionManagerProperties">#
#Wed Aug 15 16:17:29 EDT 2001
InvalidateOnError=false
BlockingTimeoutMillis=500000
IdleTimeoutMillis=1800000
MaxSize=10
TimestampUsed=false
IdleTimeoutEnabled=false
CleanupIntervalMillis=120000
MinSize=0
GCMinIdleMillis=1200000
GCEnabled=false
MaxIdleTimeoutPercent=1.0
</attribute>
<attribute name="PrincipalMappingClass">
org.jboss.resource.security.ManyToOnePrincipalMapping
</attribute>
<attribute name="PrincipalMappingProperties">UserName=root</attribute>
</mbean></server>
第二步,把mm.mysql-2.0.4-bin.jar文件放在 server/default/lib目录下,也就是上面文件中指定的<classpath codebase="lib" ....第三步,重启服务,正常发布。再试一下吧。
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== --><!-- $Id: hsqldb-service.xml,v 1.2.2.4 2002/05/25 21:43:49 patriot1burke Exp $ -->
<server> <!-- ==================================================================== -->
<!-- New ConnectionManager setup for default hsql dbs -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- ==================================================================== --> <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=hsqldbDS"> <!-- Include a login module configuration named HsqlDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule: <application-policy name = "HsqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=hsqldbDS</module-option>
</login-module>
</authentication>
</application-policy> NOTE: the application-policy name attribute must match
SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--uncomment out this line if you are using the DB2DbRealm above
<attribute name="SecurityDomainJndiName">HsqlDbRealm</attribute>
--> <depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=mySQLDS"> <attribute name="JndiName">mySQLDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost/ads</config-property>
<config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
<config-property name="UserName" type="java.lang.String">root</config-property>
<config-property name="Password" type="java.lang.String"></config-property>
</properties>
</attribute> <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends> </mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=mySQLDS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends> <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends> <attribute name="TransactionManager">java:/TransactionManager</attribute> <!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends> </mbean></server>
15:22:47,639 ERROR [EjbModule] Initialization failed
org.jboss.deployment.DeploymentException: DefaultDS not bound
另有一事不明:~/server/default/conf下standardjbosscmp-jdbc.xml何用?
这是俺在自己的环境下配置成功的步骤,供大家参考:
同Jboss 2.4.x不同,需要在~/server/default/deploy 目录下添加文件oracle-service.xml,这个文件可参看~/docs/examples/jca/目录下(该目录存有多种数据库配置文件模板)oracle-service.xml文件。
具体步骤如下:
1、 删除~/server/default/deploy下文件hsqldb-service.xml
2、 复制一份oracle-service.xml文件到~/server/default/deploy下
3、 修改该文件:
a) <!--comment out this line if you want component managed security or want
to use the default values in the ManagedConnectionFactoryProperties -->
<attribute name="SecurityDomainJndiName">OracleDbRealm</attribute>
改为:
<!--comment out this line if you want component managed security or want
to use the default values in the ManagedConnectionFactoryProperties
<attribute name="SecurityDomainJndiName">OracleDbRealm</attribute>
-->
b) 配置ConnectionURL:jjdbc:oracle:thin:@192.168.16.68:1521:ORA816
c) 配置下面的用户名和口令
4、 修改~/server/default/conf/standardjaws.xml文件(只是头几行)
<jaws>
<datasource>java:/DefaultDS</datasource>
<type-mapping>Hypersonic SQL</type-mapping>
<debug>false</debug>
改为:
<jaws>
<datasource>java:/OracleDS</datasource>
<type-mapping>Oracle8</type-mapping>
<debug>false</debug>
5、 将class12.jar添加到CLASSPATH当中。