[nbj2ee] Database resources not created when deploying from the command line for glassfish 2.1.1 and NetBeans 7.1.1

  • From: "Robert Ratcliff" < >
  • To: < >
  • Subject: [nbj2ee] Database resources not created when deploying from the command line for glassfish 2.1.1 and NetBeans 7.1.1
  • Date: Mon, 23 Apr 2012 15:43:30 -0500

Hi,

 

I have an enterprise application that bundles an EJB that defines a database resource using:

 

<resources>

  <jdbc-resource enabled="true" jndi-name="reporting_database_connection" object-type="user" pool-name="mysql_reporting_rootPool"/>

  <jdbc-connection-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" name="mysql_reporting_rootPool" 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="User" value="root"/>

    <property name="Password" value="()"/>

    <property name="serverName" value="localhost"/>

    <property name="portNumber" value="3306"/>

    <property name="databaseName" value="reporting"/>

    <property name="URL" value="jdbc:mysql://localhost:3306/reporting"/>

    <property name="driverClass" value="com.mysql.jdbc.Driver"/>

  </jdbc-connection-pool>

</resources>

 

asadmin deploy --user admin --passwordfile "/tmp/temp.txt"  --host localhost --port 4848 --force=true --enabled=true --name CommunicationServices --verify=false --precompilejsp=false --upload=true "CommunicationServices.ear"

 

 

When it deploys using ant from the command line, the JMS resources are created, but the database connection is not created. If I deploy directly from within NetBeans, all the resources are created correctly and it deploys successfully.

 

I can always manually add the Glassfish database resources using asadmin, but I’d like to be able to leverage the bundled resource approach.

 

Anybody have suggestions on what could be going wrong?

 

Thanks,

 

Rob

 



[nbj2ee] Database resources not created when deploying from the command line for glassfish 2.1.1 and NetBeans 7.1.1

Robert Ratcliff 04/23/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close