001    /*
002    @license.text@
003     */
004    package biz.hammurapi.sql.hypersonic;
005    
006    import biz.hammurapi.sql.Transaction;
007    
008    
009    /**
010     * Hypersonic server data source.
011     * @author Pavel Vlasov
012     * @version $Revision: 1.2 $
013     */
014    public class HypersonicServerDataSource extends HypersonicDataSource {
015    
016            /**
017             * Constructs server data source, which connects to localhost with user "sa" and blank password
018             * @param initConnectionTransaction 
019             * @throws ClassNotFoundException
020             */
021            public HypersonicServerDataSource(Transaction initConnectionTransaction) throws ClassNotFoundException {
022                    this("localhost", initConnectionTransaction);
023            }
024            
025            /**
026             * Connects to remote host specified by host parameter with user "sa" and blank password 
027             * @param host Host string. E.g. 3.111.12.14:3000
028             * @param initConnectionTransaction 
029             * @throws ClassNotFoundException
030             */
031            public HypersonicServerDataSource(String host, Transaction initConnectionTransaction) throws ClassNotFoundException {
032                    this(host, "sa", "", initConnectionTransaction);
033            }       
034            
035            /**
036             * Connects to remote host specified by host parameter. 
037             * @param host Host string. E.g. 3.111.12.14:3000
038             * @param user User name
039             * @param password Password
040             * @param initConnectionTransaction 
041             * @throws ClassNotFoundException
042             */
043            public HypersonicServerDataSource(String host, String user, String password, Transaction initConnectionTransaction) throws ClassNotFoundException {
044                    super("jdbc:hsqldb:hsql://"+host, user, password, initConnectionTransaction);
045            }       
046            
047    }