Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-connect-dev] Where to get the shared connection?

Hui,

Sorry for taking so long to get back to you.

Currently, the SQL model can be accessed using the java.sql.Connection
factory.  This factory returns an object of type ConnectionInfo.  From this
object, use the getSharedDatabase() method to get the SQL model Database
object.  getSharedConnection() and getRawConnection() both return the
underlying java.sql.Connection used by the ConnectionInfo object.

We will be refactoring this for M3 so that it functions as specified in the
quick start guide (or at least close to what is specified).  So, for M3,
you will need to use
org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionInfo
 for the connection factory ID and getRawConnection() on the returned
object will be a ConnectionInfo object.  The java.sql.Connection factory
will return a java.sql.Connection.

ConnectionInfo.getSharedConnection() is slightly misnamed, since it returns
the java.sql.Connection object used by the underlying ConnectionInfo
implementation; this is a carry over from the WTP code.  This method, along
with other methods and object names may be adjusted when we complete our
API review prior to M4.

Also expected in the M3 release will be some form of connection management
that will facilitate connection sharing.  I will have a preliminary design
out sometime next week.

Please let me know if you need anymore information.

Rob



                                                                           
             Hui.Cao@xxxxxxxxx                                             
             m                                                             
             Sent by:                                                   To 
             dtp-connect-dev-b         DTP Connectivity project            
             ounces@xxxxxxxxxx         development list                    
             g                         <dtp-connect-dev@xxxxxxxxxxx>       
                                                                        cc 
                                                                           
             01/03/2006 03:52                                      Subject 
             AM                        Re: [dtp-connect-dev] Where to get  
                                       the shared connection?              
                                                                           
             Please respond to                                             
             DTP Connectivity                                              
                  project                                                  
             development list                                              
             <dtp-connect-dev@                                             
               eclipse.org>                                                
                                                                           
                                                                           





A related question is how to get the catalog model. I have tried to create
a SQL model connection using
"org.eclipse.datatools.modelbase.sql.schema.Database" as the connection
factory id but got a NullPointerException. SQL Dev Tools is on a tight
schedule, so any help is highly appreciated!


Best Regards!

Max ( Hui ) Cao
Sr S/W Eng - Dev
Sybase, Inc. Shanghai, China
Tel: 86-21-68799918-3047



                                                                           
 Hui.Cao@xxxxxxxxxx                                                        
 Sent by:                                                                  
 dtp-connect-dev-bounces@xxxxxxxxxxx                                    To 
                                               dtp-connect-dev@xxxxxxxxxxx 
                                                                        cc 
 01/03/2006 03:34 PM                                                       
                                                                   Subject 
                                               [dtp-connect-dev] Where to  
            Please respond to                  get the shared connection?  
   DTP Connectivity project development                                    
    list <dtp-connect-dev@xxxxxxxxxxx>                                     
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           






Hi,
       Is there any API for SQL Dev Tools to get the shared connection
created by a connection profile? I see that ConnectionInfoImpl maintains a
shared connection, but the ConnectionInfoImpl instance itself can only be
accessed through IConnectionProfile.createConnection, which will cause
IllegalStateException when called more than once.

Best Regards!

Max ( Hui ) Cao
DTP SQL Dev Tools committer
Sr S/W Eng - Dev
Sybase, Inc. Shanghai, China
_______________________________________________
dtp-connect-dev mailing list
dtp-connect-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-connect-dev
_______________________________________________
dtp-connect-dev mailing list
dtp-connect-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-connect-dev




Back to the top