[JBoss JIRA] Created: (JBAS-7788) <check-valid-connection-sql> done after a failure maybe?
by deanhiller (JIRA)
<check-valid-connection-sql> done after a failure maybe?
--------------------------------------------------------
Key: JBAS-7788
URL: https://jira.jboss.org/jira/browse/JBAS-7788
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: EJB3, Hibernate service
Affects Versions: JBossAS-5.1.0.GA
Reporter: deanhiller
Assignee: Carlo de Wolf
Priority: Critical
related directly to this bug in seam https://jira.jboss.org/jira/browse/JBSEAM-4528
I would prefer the <check-valid-connection-sql> be run AFTER any exceptions from the jdbc api rather than before it. This would fix half the bug in the ticket referred to above(at least with postgres' case)....
ie.
1. go get a wrapper connection(not from pool)
2. when you make a real jdbc call, go get the real connection from the pool
3. if that jdbc call fails with an exception, run the check-valid-connection-sql
4. If check-valid-connection-sql fails, go get another connection from pool(or create one) and if fails, move to next
5. once all connections are exhausted, throw exception back to framework or whoever called the jdbc call.
NOTE: This gives the performance benefit on sunny day we are never running the check valid connection sql. It also solves half of the ticket above which tends to break postgres/jboss/seam combination from working. I have to have check valid connection sql or my seam app never recovers from a db outage but having that also causes all normal seam pages that don't need the database to spin the browser into infinite redirect(ie. if I hit login page it comes up in jboss/seam IF AND ONLY IF I don't have check-valid-connection-sql set).
thanks,
Dean
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (JBVFS-149) VirtualFileURLConnection does not override getContentType()
by Alessio Soldano (JIRA)
VirtualFileURLConnection does not override getContentType()
-----------------------------------------------------------
Key: JBVFS-149
URL: https://jira.jboss.org/jira/browse/JBVFS-149
Project: JBoss VFS
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.0.CR3
Reporter: Alessio Soldano
While overriding URLConnection:getContentType() seems at first not required, this is currently causing regressions in JBossWS SwA testsuite. When the user provides a DataHandler as a parameter for an attachment, JBossWS needs to get the content-type from it. DataHandler (javax.activation) delegates to its datasource, which in in the example below is a URLDataSource. The URLDataSource simply opens a connection from the url and calls getContentType on it. Since VirtualFileURLConnection does not override getContentType(), it uses the impl in java.net.URLConnection, which simply returns null. Before the changes for VFS3, this was using the Sun's impl sun.net.www.URLConnection which redefines the getContentType() and leverages the convenient method guessContentTypeFromName(..) from java.net.URLConnection.
Example:
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/AttachmentService");
Attachment port = (Attachment)service.getPort(Attachment.class);
URL url = new File("jaxrpc/samples/swa/attach.gif").toURL();
String value = port.send("Some text message", new DataHandler(url));
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months