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
javax.sql.DataSource:

       public static Connection getConnection (String dsName) throws
javax.naming.NamingException,Exception{
                Context initCtx = new InitialContext();
                  javax.sql.DataSource ds =
(javax.sql.DataSource)initCtx.lookup
("java:comp/env/jdbc/MySource);

       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);
        if(!f.exists())
            throw new Exception("File not found.");
        try{
            javax.activation.DataSource ds = new FileDataSource(f);
            DataHandler dh = new DataHandler(ds);
            return dh;
        }catch(Exception e){
            System.err.println(e.getMessage());
            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
getConnection.
If anyone has the slightest idea of what is going on, I would appreciate
your help.

thanks,
Bryan


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to