KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rmijdbc > RJSavepointServer


1
2 /**
3  * RmiJdbc client/server JDBC Driver
4  * (C) ObjectWeb 1999-2003
5  *
6  * @version 3.0
7  * @author Pierre-Yves Gibello (pierreyves.gibello@experlog.com)
8  */

9
10 package org.objectweb.rmijdbc;
11
12 import java.sql.*;
13 import java.rmi.RemoteException JavaDoc;
14 import java.rmi.server.UnicastRemoteObject JavaDoc;
15 import java.rmi.server.Unreferenced JavaDoc;
16
17 public class RJSavepointServer
18 extends UnicastRemoteObject JavaDoc implements RJSavepointInterface, Unreferenced JavaDoc {
19
20   Savepoint jdbcSavepoint_;
21
22   public RJSavepointServer(Savepoint s) throws RemoteException JavaDoc {
23     super(RJJdbcServer.rmiJdbcListenerPort,
24      RJJdbcServer.rmiClientSocketFactory, RJJdbcServer.rmiServerSocketFactory);
25     jdbcSavepoint_ = s;
26   }
27
28   public void unreferenced() { Runtime.getRuntime().gc(); }
29
30   public int getSavepointId() throws RemoteException JavaDoc, SQLException {
31     return jdbcSavepoint_.getSavepointId();
32   }
33
34   public String JavaDoc getSavepointName() throws RemoteException JavaDoc, SQLException {
35     return jdbcSavepoint_.getSavepointName();
36   }
37
38 };
39
40
Popular Tags