Hi,

Hinnerk Feldwisch wrote:

Hello altogether,

I developed a jsp/struts/ojb- project which runs fine on my private server;
but after approximately two days the database connection fails on the real
server where the website shall be accessible.
At the end I will post the error- message.

Seems that the connections in the connection-pool (assume you don't use DataSource) are get timed out.


- Some DB allow to reconnect timed out connections, try to enable this. - Or you can use the 'validationQuery' attribute to force OJB to do a real check before a connection was returned from pool.
- Or don't use a connection pool by setting
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
(has performance impact).
- Or setup pool configuration to evict idle connections before they get timed out. commons-pool attributes reflected as 'connection-pool' attributes. See more
http://db.apache.org/ojb/repository.html#connection-pool
http://jakarta.apache.org/commons/pool/apidocs/org/apache/commons/pool/impl/GenericKeyedObjectPool.html
- Or use DataSource from your webServer (and hope your webserver does handle timed out connections for you ;-))
- Or write your own ConnectionFactory implementation ;-)


You see OJB is flexible ;-)

regards,
Armin


For me the problem seams to be that there's some connection error on the server (I don't know why), and OJB doesn't try to establish a new JDBC- Connection; is this right? Is there any way to do so?

All other projects on this internet server do run fine - but they don't use
OJB.

Would be glad for any hint!,
thanks,
Hinnerk

-------
javax.servlet.jsp.JspException: Exception accessing property
latestNews[0].daughtersSize
for bean messageManager:
org.apache.ojb.broker.PersistenceBrokerSQLException:
Communication link failure: java.net.SocketException
at
org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:233)
at org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
at
org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218)
at
org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualTag.java:96)
at
_WEB_22dINF._jsp._viewshortnews__jsp._jspService(/WEB-INF/jsp/viewshortnews.jsp:38)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
(...)


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to