Contents Index MobiLink Java API Reference InOutByteArray interface

MobiLink Synchronization User's Guide
  Writing Synchronization Scripts in Java
    MobiLink Java API Reference

DBConnectionContext interface


An encapsulation of context that lives for the duration of one database connection. A DBConnectionContext is not valid outside of the thread that calls into the user written Java code. If context is required for a background thread or beyond the lifetime of a connection use a ServerContext.

getConnection method 

public java.sql.Connection getConnection( )
throws java.sql.SQLException

Returns the existing connection java.sql.Connection as a JDBC connection. The connection is the same connection that MobiLink uses to execute SQL scripts.

This connection must not be committed, closed or altered in any way that would affect the MobiLink server use of this connection. The connection returned is only valid for the lifetime of the underlying MobiLink connection. Do not use the connection after the end_connection event has been called for that connection.

If an error occurs binding the existing connection as a JDBC connection then it throws java.sql.SQLException

If a server connection with full access is required, use ServerContext.makeConnection().

getServerContext method 

public ServerContext getServerContext( )

Returns the ServerContext for this MobiLink server.


Contents Index MobiLink Java API Reference InOutByteArray interface