-
1. Re: why this variable in xml not get replaced
wdfink Nov 26, 2012 8:02 AM (in response to bondchan921)What version of JBoss do you use and how the configuration and start command look like. Also the boot.log might help.
-
2. Re: why this variable in xml not get replaced
bondchan921 Nov 27, 2012 2:17 AM (in response to wdfink)1)I'm using jboss 5.1.0.GA, this parameter uses fine with my previous version 4.2.3.GA,
2)pass by bat:
set RUN_ARGS= %RUN_ARGS% -Ddatasource.min.pool.size=5
set RUN_ARGS= %RUN_ARGS% -Ddatasource.max.pool.size=20
set RUN_ARGS= %RUN_ARGS% -Djboss.jndi.port=1099 --->works ...
set RUN_ARGS= %RUN_ARGS% -Djboss.hajndi.port=1100 --->works ...
.....
call %JBOSS_HOME%\bin\run.bat -b 0.0.0.0 -c %PROFILE_NAME%
3)which part of boot log do you want?
--I have changed the default deploy as follows, does this matter?
<bean name="topContextComparator">
<constructor factoryClass="org.jboss.system.deployers.LegacyDeploymentContextComparator" factoryMethod="getInstance"/>
<property name="suffixOrder" class="java.util.Map">
<map keyClass="java.lang.String" valueClass="java.lang.Integer">
<entry> <key>.deployer</key><value>50</value> </entry>
<entry> <key>-deployer.xml</key><value>60</value> </entry>
<entry> <key>.aop</key><value>70</value> </entry>
<entry> <key>-aop.xml</key><value>80</value> </entry>
<entry> <key>-ds.xml</key><value>90</value> </entry>
<entry> <key>.rar</key><value>120</value> </entry>
<entry> <key>.beans</key><value>200</value> </entry>
<entry> <key>-jboss-beans.xml</key><value>201</value> </entry>
<entry> <key>-service.xml</key><value>300</value> </entry>
<entry> <key>.har</key><value>301</value> </entry>
...
</map>
</property>
<property name="useDefaults">false</property>
</bean>
-
3. Re: why this variable in xml not get replaced
bondchan921 Nov 27, 2012 2:26 AM (in response to bondchan921)3):boot log
15:17:46,454 DEBUG [ServerInfo] java.vendor: Sun Microsystems Inc.
15:17:46,454 DEBUG [ServerInfo] sun.java.launcher: SUN_STANDARD
15:17:46,454 DEBUG [ServerInfo] sun.management.compiler: HotSpot Tiered Compilers
15:17:46,454 DEBUG [ServerInfo] datasource.min.pool.size: 5
15:17:46,454 DEBUG [ServerInfo] os.name: Windows XP
15:17:46,454 DEBUG [ServerInfo] sun.boot.class.path: E:\jboss5test5\jboss\lib\endorsed\activation.jar;E:\jboss5test5\jboss\lib\endorsed\jaxb-api.jar;E:\jboss5test5\jboss\lib\endorsed\jaxb-impl.jar;E:\jboss5test5\jboss\lib\endorsed\jaxen-core.jar;E:\jboss5test5\jboss\lib\endorsed\jaxen-jdom.jar;E:\jboss5test5\jboss\lib\endorsed\jbossws-native-jaxrpc.jar;E:\jboss5test5\jboss\lib\endorsed\jbossws-native-jaxws-ext.jar;E:\jboss5test5\jboss\lib\endorsed\jbossws-native-jaxws.jar;E:\jboss5test5\jboss\lib\endorsed\jbossws-native-saaj.jar;E:\jboss5test5\jboss\lib\endorsed\jdom.jar;E:\jboss5test5\jboss\lib\endorsed\resolver.jar;E:\jboss5test5\jboss\lib\endorsed\saxpath.jar;E:\jboss5test5\jboss\lib\endorsed\serializer.jar;E:\jboss5test5\jboss\lib\endorsed\stax-api.jar;E:\jboss5test5\jboss\lib\endorsed\xalan.jar;E:\jboss5test5\jboss\lib\endorsed\xercesImpl.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\modules\jdk.boot.jar;C:\Program Files\Java\jdk1.6.0_32\jre\classes
15:17:46,454 DEBUG [ServerInfo] datasource.max.pool.size: 20
15:17:46,454 DEBUG [ServerInfo] sun.desktop: windows
15:17:46,454 DEBUG [ServerInfo] jboss.messaging.groupname: MessagingPostOffice
15:17:46,454 DEBUG [ServerInfo] java.vm.specification.vendor: Sun Microsystems Inc.
15:17:46,454 DEBUG [ServerInfo] java.runtime.version: 1.6.0_32-b05
15:17:46,454 DEBUG [ServerInfo] jboss.messaging.datachanneludpport: 45567
15:17:46,454 DEBUG [ServerInfo] jboss.jndi.port: 1099
15:17:46,454 DEBUG [ServerInfo] user.name: test
15:17:46,454 DEBUG [ServerInfo] jboss.bind.address: 0.0.0.0
15:17:46,454 DEBUG [ServerInfo] jboss.hapartition.mcast_port: 45566
15:17:46,454 DEBUG [ServerInfo] jboss.cache.invaludpport: 48888
15:17:46,454 DEBUG [ServerInfo] jboss.cache.repudpport: 48866
15:17:46,454 DEBUG [ServerInfo] jboss.home.dir: E:\jboss5test5\jboss
15:17:46,454 DEBUG [ServerInfo] user.language: en
15:17:46,454 DEBUG [ServerInfo] sun.boot.library.path: C:\Program Files\Java\jdk1.6.0_32\jre\bin
15:17:46,454 DEBUG [ServerInfo] jboss.home.url: file:/E:/jboss5test5/jboss/
15:17:46,454 DEBUG [ServerInfo] java.version: 1.6.0_32
15:17:46,454 DEBUG [ServerInfo] java.util.logging.manager: org.jboss.logmanager.LogManager
15:17:46,454 DEBUG [ServerInfo] user.timezone: Asia/Shanghai
-
4. Re: why this variable in xml not get replaced
bondchan921 Nov 27, 2012 2:32 AM (in response to bondchan921)4)datasource config:
<xa-datasource>
<jndi-name>DefaultDS</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<!--<track-statements>true</track-statements>-->
<isSameRM-override-value>false</isSameRM-override-value>
<!--<managedconnectionfactory-class>org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory</managedconnectionfactory-class>-->
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<security-domain>DefaultDSRealm</security-domain>
<xa-datasource-property name="URL">jdbc:oracle:thin:@172.20.30.14:1521:sha11202</xa-datasource-property>
<xa-datasource-property name="ImplicitCachingEnabled">true</xa-datasource-property>
<xa-datasource-property name="MaxStatements">50</xa-datasource-property>
<min-pool-size>${datasource.min.pool.size:5}</min-pool-size>
<max-pool-size>${datasource.max.pool.size:20}</max-pool-size>
<!--xa-datasource-property name="User">bond</xa-datasource-property>
<xa-datasource-property name="Password">iGT.9BVsinkjNfHV00bm8DMGLHo3O0qX</xa-datasource-property-->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
<new-connection-sql>select callAlterSession('bond','${jboss.db.caseSensitive:true}') from dual</new-connection-sql>
</xa-datasource>
4) from server log during deployment, you can see the MinSize and MaxSize are both 0, if I don't set these 2 value by commenting these two line out in datasoure config file, then the MaxSize seems set to 10 .
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceCreator] (main:) About to create bean: jboss.jca:service=ManagedConnectionPool,name=DefaultDS with code: org.jboss.resource.connectionmanager.JBossManagedConnectionPool
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceCreator] (main:) Created mbean: jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) PoolJndiName set to DefaultDS in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) MinSize set to 0 in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) MaxSize set to 0 in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) BlockingTimeoutMillis set to 30000 in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) IdleTimeoutMinutes set to 30 in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) BackGroundValidationMillis set to 0 in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) PreFill set to false in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) StrictMin set to false in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) StatisticsFormatter set to org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) Criteria set to ByContainer in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceConfigurator] (main:) ManagedConnectionFactoryName set to jboss.jca:service=ManagedConnectionFactory,name=DefaultDS in jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.system.ServiceController] (main:) Creating service jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main:) Creating jboss.jca:service=ManagedConnectionPool,name=DefaultDS
2012-11-27 15:18:20,609 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main:) Created jboss.jca:service=ManagedConnectionPool,name=DefaultDS
-
5. Re: why this variable in xml not get replaced
bondchan921 Nov 30, 2012 1:20 AM (in response to wdfink)Hi Wolf-Dieer Fink, do you got a chance to check my comments?
-
6. Re: why this variable in xml not get replaced
bondchan921 Dec 12, 2012 12:56 AM (in response to wdfink)Hi Wolf-Dieer Fink, any clue ?
-
7. Re: why this variable in xml not get replaced
wdfink Dec 14, 2012 12:27 PM (in response to bondchan921)Hi Chan,
looks like a bug in 5.1, I've checked the last 4.3 and it worked as expected.
It looks like that it is fixed for the EAP version.
If you need it you might fix.
-
8. Re: why this variable in xml not get replaced
bondchan921 Dec 16, 2012 2:25 AM (in response to wdfink)Thanks Fink,
I download the source code of jboss 5.1.0, but unfortunately got this error when build the source code
https://community.jboss.org/thread/215712
I'm trying to fix this issue, any suggestion to where I can start ?
-
9. Re: why this variable in xml not get replaced
bondchan921 Mar 3, 2013 8:36 PM (in response to bondchan921)1)After some research and test, this should be related to the 'xml schema' of jboss 5 have defined 'max-pool-size' and 'min-pool-size' to
<xsd:complexType name="min-pool-sizeType">
<xsd:simpleContent>
<xsd:restriction base="javaee:xsdIntegerType"/>
</xsd:simpleContent>
</xsd:complexType>
2)while other parameters whose 'xml schema' defined to string is ok to be evaluated to it's value
3)To have a quick 'fix' about this, where should I look for in the sorce code?