Sunit,

will you be executing below code before or after a connection to the database has been 
made ? 

Werner

On Thu, 22 Jul 2004 07:57:15 -0600, Bruce Snyder wrote:

>
>Kavathekar, Sunit wrote:
>
>> Sorry about the html. It was  not intentional. The "module logon" I mentioned is 
>> just a stored procedure call that identifies the session to the db 
owner (who may be monitoring usage). 
>> 
>> For example :
>> 
>>  private void logon(int db) throws SQLException {
>>         String appName              = System.getProperty("appName", "UnknownApp");
>>         String programName          = DB_MODULE_PREFIX + appName;
>>         String programParentName    = "";
>>         String programArguments     = "";
>> 
>>         CallableStatement logon = connections[db].prepareCall("begin module_logon(? 
>> , ? , ? , ? , ? , ?); end;");
>> 
>>         logon.setString(1, programName);
>>         logon.setString(2, programParentName);
>>         logon.setString(3, programArguments);
>>         logon.registerOutParameter(4, java.sql.Types.INTEGER);
>>         logon.registerOutParameter(5, java.sql.Types.INTEGER);
>>         logon.registerOutParameter(6, java.sql.Types.INTEGER);
>> 
>>         logon.execute();
>> 
>>        etc........... 
>
>Sunit,
>
>If you just need a java.sql.Connection, this is attainable from the 
>Castor Database object like so:
>
>     Connection conn = (Connection) ((DatabaseImpl)_db).getConnection();
>
>Bruce
>-- 
>perl -e 'print 
>unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'
>
>The Castor Project
>http://www.castor.org/
>
>Apache Geronimo
>http://incubator.apache.org/projects/geronimo.html
>
>
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-user
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to