[prev in list] [next in list] [prev in thread] [next in thread]
List: openorb-commits
Subject: [openorb-commits] CVS: TransactionService/src/examples/org/openorb/ots/examples/xa .cvsignore,NONE,1
From: Michael Rumpf <mrumpf () users ! sourceforge ! net>
Date: 2003-02-28 12:46:27
[Download RAW message or body]
Update of /cvsroot/openorb/TransactionService/src/examples/org/openorb/ots/examples/xa
In directory sc8-pr-cvs1:/tmp/cvs-serv1643/src/examples/org/openorb/ots/examples/xa
Modified Files:
BankClient.java BankServer.java
Added Files:
.cvsignore bank.prp
Log Message:
Moved the InstantDB property file in th xa example sub-folder.
Made the example client apps more robust for menu selection.
Added a TODO issue about the non-working subtrx example.
--- NEW FILE: .cvsignore ---
database
trace.log
--- NEW FILE: bank.prp ---
traceFile=./trace.log
traceLevel=4
traceConsole=0
!
! Allowed min ratio of empty/used rows in indexes as a percentage.
! Default is 5. Setting this too high causes frequent re-indexing
! operations. Setting too low can result in very slow index
! construction.
!
indexLoad=5
!
! Various paths and file names needed to locate database files.
!
relativeToProperties=1
tablePath=database/tables
indexPath=database/index
tmpPath=database/tmp
systemPath=database/system
!
! Specify whether to cache by number of rows or by a percentage.
! This can be overridden when the table is created.
! Default: CACHE_ROWS
!
!cacheCondition=CACHE_PERCENT
cacheCondition=CACHE_ROWS
!
! Specify number of rows or percentage to cache
! This can be overridden when the table is created.
! Default: 256 for rows, 10 for percent
!
!cacheAmount=30
cacheAmount=512
!
! Initial number of rows in cache
! Default: 256
!
!initialCacheSize=64
initialCacheSize=64
!
! Amount to increase cache when full
! Default: 256
!
!cacheExpansion=8
cacheExpansion=256
!
! Number of cache misses to included in stats
! Default: 100
!
missesInCacheStats=100
!
! Percentage of alternate cache hit improvements required to
! force a cache reset
! Default: 10
!
cacheResetPercent=10
!
! Number of rows to read in a single IO and cache.
! Default: 20
!
!rowCacheSize=4
rowCacheSize=32
!
! Number of rows in the recently used row cache (ass opposed to most popular rows cache)
! Default: 32
!
recentRows=4
!
! Caching algorithm and amount for results sets
!
resultsSetCache=CACHE_ROWS
resultsSetCacheAmount=256
Index: BankClient.java
===================================================================
RCS file: /cvsroot/openorb/TransactionService/src/examples/org/openorb/ots/examples/xa/BankClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- BankClient.java 16 Oct 2002 15:06:32 -0000 1.1
+++ BankClient.java 28 Feb 2003 12:46:25 -0000 1.2
@@ -8,6 +8,8 @@
package org.openorb.ots.examples.xa;
+import java.util.Properties;
+
/**
* This class is a client implementation for the bank server.
* @author Jerome Daniel
@@ -38,25 +40,34 @@
*/
private int menu()
{
- System.out.println( "" );
- System.out.println( "-------------------------------------------------" );
- System.out.println( "Bank client " );
- System.out.println( "-------------------------------------------------" );
- System.out.println( "" );
-
- System.out.println( "Select an option : " );
- System.out.println( "\t0. Quit" );
- System.out.println( "\t1. Create a new account." );
- System.out.println( "\t2. Get an account information." );
- System.out.println( "\t3. Make a transfer." );
- System.out.println( "" );
- System.out.print( "Your choice : " );
- String choice = input();
- if ( choice == null )
+ int result = -1;
+ do
{
- return 0;
+ System.out.println( "" );
+ System.out.println( "-------------------------------------------------" );
+ System.out.println( "Bank client " );
+ System.out.println( "-------------------------------------------------" );
+ System.out.println( "" );
+
+ System.out.println( "Select an option : " );
+ System.out.println( "\t0. Quit" );
+ System.out.println( "\t1. Create a new account." );
+ System.out.println( "\t2. Get an account information." );
+ System.out.println( "\t3. Make a transfer." );
+ System.out.println( "" );
+ System.out.print( "Your choice : " );
+ String choice = input();
+ try
+ {
+ result = new Integer( choice ).intValue();
+ }
+ catch ( Exception ex )
+ {
+ result = -1;
+ }
}
- return new Integer( choice ).intValue();
+ while ( result == -1 );
+ return result;
}
/**
@@ -259,7 +270,12 @@
*/
public static void main( String [] args )
{
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, null );
+ Properties props = new Properties();
+ // this is necessary to make the local interface TransactionCurrent available
+ // equivalent to passing -ORBProfile=ots on the command line
+ props.put( "openorb.profile", "ots" );
+ org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, props );
+
org.omg.CORBA.Object obj = null;
try
{
Index: BankServer.java
===================================================================
RCS file: /cvsroot/openorb/TransactionService/src/examples/org/openorb/ots/examples/xa/BankServer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- BankServer.java 16 Oct 2002 15:06:32 -0000 1.1
+++ BankServer.java 28 Feb 2003 12:46:25 -0000 1.2
@@ -8,6 +8,8 @@
package org.openorb.ots.examples.xa;
+import java.util.Properties;
+
/**
* This class is the bank server implementation.
* @author Jerome Daniel
@@ -19,7 +21,12 @@
*/
public static void main( String [] args )
{
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, null );
+ Properties props = new Properties();
+ // this is necessary to make the local interface TransactionCurrent available
+ // equivalent to passing -ORBProfile=ots on the command line
+ props.put( "openorb.profile", "ots" );
+ org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, props );
+
org.omg.CORBA.Object objPoa = null;
org.omg.PortableServer.POA rootPOA = null;
try
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
openorb-commits mailing list
openorb-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openorb-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic