Jump to content

js 2.0 deploys on glassfish v2 beta3 but postgresq


wizhippo

Recommended Posts

I can get js 2.0 to deploy on glassfish v2 beta 3 with this sun-web.xml

 

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD
Application Server 9.0 Servlet 2.5//EN'
'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>
<sun-web-app>
<context-root>/jasperserver</context-root>
<session-config>
<session-manager/>
</session-config>

<resource-ref>
<res-ref-name>jdbc/jasperserver</res-ref-name>
<jndi-name>jdbc/jasperserver</jndi-name>
</resource-ref>

</sun-web-app>

 

 

The problem is I use postgresql and postgresql requires that AutoCommit is off for the use of large objects. So after adding an image the application crashes.

 

I have added defaultAutoCommit = false to the conntection pool but it seems to be ignored.

 

I have changed the spring been to bypass using jndi and make a driect connection and it works.

 

 

 

ApplicationContext.xml

Code:
[code]
<bean id="dataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="${metadata.jdbc.driverClassName}" />
<property name="url" value="${metadata.jdbc.url}" />
<property name="username" value="${metadata.jdbc.username}" />
<property name="password" value="${metadata.jdbc.password}" />
<property name="defaultAutoCommit" value="false" />
</bean>

 

 

Haven't tried it with mysql but I would assume it works.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...