Created an Enterprise APllication with EAR (EJB+WEB Modules) .
EJB Module coming with glassfish-resources.xml contanining the db resourse as jdbc/db_ds and these jndi is referred by persistence.xml file.
I read : another issue about but ,
I am asking , it is possible to get GF to auto create Jdbc resourse and pool without to configure it from asadmin or web console admin ?
In other words , how to configure glassfish_resurces.xml to create resource when EAR is deployed ? My tring is below but doesn't work because deployer complain
'Invalid resource : jdbc/hb_ds__pm of jdbc connection pools.'
my glassfish-resource.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
<jdbc-resource enabled="true" jndi-name="jdbc/hb_ds" object-type="user" pool-name="hb_pool">
<description/>
</jdbc-resource>
<jdbc-connection-pool name="hb_pool" allow-non-component-callers="false" associate-with- thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<property name="URL" value="jdbc:mysql://localhost:3306/hb?zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC"/>
<property name="User" value="HB"/>
<property name="Password" value="hb"/>
</jdbc-connection-pool>
</resources>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…