Error accessing application on JBoss after repeated deployments of *-ds.xml 
files.
----------------------------------------------------------------------------------

         Key: SPRING-194
         URL: http://jira.andromda.org/browse/SPRING-194
     Project: Spring Cartridge
        Type: Improvement

    Versions: 3.2-RC2, 3.2    
 Environment: CPU: Intel Pentium-4 M with Centrino @ 2GHz, Intel dual-core Xeon 
@ 3GHz
Operating system: Windows XP Professional Service Pack 2, RedHat Linux 
Enterprise Edition
JVM version: Sun JVM 1.5 patch 8
JBoss application server version: 4.0.04
Database: MySQL
AndroMDA version: 3.2
    Reporter: Manish Baxi
 Assigned to: Chad Brandon 
    Priority: Critical


If we deploy an application repeatedly to a running JBoss application server, 
the application becomes unusable, even though JBoss runs fine and does not show 
any errors of its own.  JBoss server logs show the following exception message:

You are trying to use a connection factory that has been shut down: 
ManagedConnectionFactory is null.

After lots of reading, investigation and trials-and-errors we reached the 
conclusion that the error occurs only if th *-ds.xml files are released along 
with the EAR or the WAR file.  If we manually deploy just the EAR file, we can 
keep JBoss and the application running forever.

After spending some time going through JBoss documentation, we made a change to 
our applicationContext-dataSource.xml file used by SPRING.  The change was as 
follows:

================================================================================================
Original content
================================================================================================

    <!-- JNDI DataSource for J2EE environments -->
    <bean id="dataSource" class="my-application">
        <property 
name="jndiName"><value>jndi://my-application</value></property>
    </bean>
================================================================================================

================================================================================================
New content
================================================================================================

    <!-- JNDI DataSource for J2EE environments -->
    <bean id="dataSource" class="my-application">
        <property 
name="jndiName"><value>jndi://my-application</value></property>
        <property name="cache"><value>false</value></property>
        <property 
name="proxyInterface"><value>javax.sql.DataSource</value></property>
    </bean>
================================================================================================

As can be seen, we added two more properties to the Data Source bean.  This 
prevents JBoss from caching the data source objects when an application is 
undeployed and create them afresh when the application is deployed again.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to