|
From: Michael R. <mr...@us...> - 2004-07-27 09:16:45
|
Update of /cvsroot/openorb/PersistentStateService/src/examples/org/openorb/pss/examples/file/transactional/first In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16711/src/examples/org/openorb/pss/examples/file/transactional/first Modified Files: Client.java FormImpl.java Server.java Log Message: Fixed all examples Index: Client.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/examples/org/openorb/pss/examples/file/transactional/first/Client.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Client.java 23 Jul 2004 23:11:57 -0000 1.2 +++ Client.java 27 Jul 2004 09:16:35 -0000 1.3 @@ -21,10 +21,10 @@ // public static void main( String args[] ) { + org.openorb.ots.Verbose.enable( null ); java.util.Properties props = new java.util.Properties(); props.put( "openorb.profile", "ots" ); s_orb = org.omg.CORBA.ORB.init( args, props ); - org.omg.CORBA.Object obj = null; try @@ -106,11 +106,12 @@ org.omg.CosTransactions.CurrentHelper.narrow( obj ); current.begin(); + System.out.println( "current status is " + current.get_status().value() ); s_form.createPerson( name, address, ageValue ); - System.out.println( "Do you want to commit ( press C to commit, others keys" - + " imply rollback )" ); + System.out.println( "Do you want to commit ( press C to commit," + + " others keys imply rollback )" ); String c = input(); @@ -219,7 +220,6 @@ { java.io.BufferedReader reader = new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) ); - return reader.readLine(); } catch ( java.lang.Exception ex ) Index: FormImpl.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/examples/org/openorb/pss/examples/file/transactional/first/FormImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FormImpl.java 10 Feb 2004 20:04:13 -0000 1.2 +++ FormImpl.java 27 Jul 2004 09:16:35 -0000 1.3 @@ -75,12 +75,12 @@ System.out.println( "== > Connector : " + m_connector ); System.out.println( "== > current session : " + m_connector.current_session() ); personHome = ( PersonHome ) m_connector.current_session().find_storage_home( - "PSDL:PersonHomeBase:1.0" ); + "PSDL:org/openorb/pss/examples/file/transactional/first/PersonHomeBase:1.0" ); } catch ( org.omg.CosPersistentState.NotFound ex ) { - System.out.println( "The home was not found..." ); - throw new org.omg.CORBA.INTERNAL(); + System.out.println( "The home was not found!" ); + throw new org.omg.CORBA.INTERNAL( "The home was not found!" ); } return personHome; } Index: Server.java =================================================================== RCS file: /cvsroot/openorb/PersistentStateService/src/examples/org/openorb/pss/examples/file/transactional/first/Server.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Server.java 23 Jul 2004 23:11:57 -0000 1.3 +++ Server.java 27 Jul 2004 09:16:35 -0000 1.4 @@ -15,6 +15,9 @@ */ public static void main( String [] args ) { + org.openorb.ots.Verbose.enable( null ); + org.openorb.pss.util.debug.debugMode( true ); + java.util.Properties props = new java.util.Properties(); props.put( "ImportModule.PSS", "${openorb.home}config/pss.xml#pss" ); props.put( "openorb.profile", "ots" ); @@ -38,13 +41,13 @@ connector.register_storage_object_factory( "PSDL:org/openorb/pss/examples/file/transactional/first/PersonBase:1.0", Thread.currentThread().getContextClassLoader().loadClass( - "org.openorb.pss.examples.file.transactional.first.PersonBaseImpl" ) ); + "org.openorb.pss.examples.file.transactional.first.PersonBaseImpl" ) ); // Register the storage home factory connector.register_storage_home_factory( "PSDL:org/openorb/pss/examples/file/transactional/first/PersonHomeBase:1.0", Thread.currentThread().getContextClassLoader().loadClass( - "org.openorb.pss.examples.file.transactional.first.PersonHomeBase" ) ); + "org.openorb.pss.examples.file.transactional.first.PersonHomeBase" ) ); // And now creates the session pool org.omg.CosPersistentState.Session mySession = null; |