tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Austad" <>
Subject javax.activation.DataSource AND javax.sql.DataSource
Date Tue, 26 Feb 2002 01:55:01 GMT
I have a big problem.  I am currently using Apache SOAP 2.2 with Tomcat
4.0.2.  I am using javax.activation package in SOAP to send file
attachments.  The problem I have is when ever a use it, it messes up my
javax.sql.DataSource.  Here is the code that retrieves a connection from a

       public static Connection getConnection (String dsName) throws
       		Context initCtx = new InitialContext();
                  javax.sql.DataSource ds =

       Connection conn = ds.getConnection();
       return conn;
   } //getConnection(String)

This works just great until after this call is made:(this method is in a
seperate class)

public DataHandler getFile(String fileName, String userName, int revision)
throws Exception {
        File f = new File(this.clientPath + fileName);
            throw new Exception("File not found.");
            javax.activation.DataSource ds = new FileDataSource(f);
            DataHandler dh = new DataHandler(ds);
            return dh;
        }catch(Exception e){
            throw new Exception(e.getMessage());

This call works great to, but messes up my javax.sql.DataSource.  After this
method call is made, it freezes on retrieving the Context in the method
If anyone has the slightest idea of what is going on, I would appreciate
your help.


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message