User: vharcq
Date: 01/06/23 04:27:12
Modified: src/examples/org/jboss/docs/cmp/cd List.java Remove.java
Upload.java
Log:
Complete Chapter 4 examples
Revision Changes Path
1.2 +0 -15 manual/src/examples/org/jboss/docs/cmp/cd/List.java
Index: List.java
===================================================================
RCS file: /cvsroot/jboss/manual/src/examples/org/jboss/docs/cmp/cd/List.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- List.java 2001/06/20 22:01:15 1.1
+++ List.java 2001/06/23 11:27:11 1.2
@@ -20,21 +20,6 @@
public static void main(String[] args)
{
- // Get information about the Bean server from the properties file
- Properties props = new Properties();
- Properties sysProps = System.getProperties();
- try
- {
- props.load (new FileInputStream ("cd.properties"));
- sysProps.putAll(props);
- }
- catch (Exception e)
- {
- System.err.println ("Can't read cd.properties");
- System.exit (-1);
- }
- System.setProperties (sysProps);
-
// Enclosing the whole process in a single "try" block is not an ideal way
// to do exception handling, but I don't want to clutter the program up
// with catch blocks
1.2 +0 -13 manual/src/examples/org/jboss/docs/cmp/cd/Remove.java
Index: Remove.java
===================================================================
RCS file: /cvsroot/jboss/manual/src/examples/org/jboss/docs/cmp/cd/Remove.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Remove.java 2001/06/20 22:01:15 1.1
+++ Remove.java 2001/06/23 11:27:11 1.2
@@ -18,19 +18,6 @@
public class Remove {
public static void main(String[] args) {
- // Get information about the Bean server from the properties file
- Properties props = new Properties();
- Properties sysProps = System.getProperties();
- try
- {
- props.load (new FileInputStream ("cd.properties"));
- sysProps.putAll(props);
- } catch (Exception e) {
- System.err.println ("Can't read `cd.properties'");
- System.exit (-1);
- }
- System.setProperties (sysProps);
-
// Enclosing the whole process in a single `try' block is not an ideal
way
// to do exception handling, but I don't want to clutter the program up
// with catch blocks
1.3 +3 -25 manual/src/examples/org/jboss/docs/cmp/cd/Upload.java
Index: Upload.java
===================================================================
RCS file: /cvsroot/jboss/manual/src/examples/org/jboss/docs/cmp/cd/Upload.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Upload.java 2001/06/20 22:39:21 1.2
+++ Upload.java 2001/06/23 11:27:11 1.3
@@ -31,31 +31,8 @@
*/
public static void main(String[] args)
{
- // Check that the command line has specified a filename
+ String filename = "CDs.txt";
- if (args.length < 1)
- {
- System.err.println("Usage: java com.web_tomorrow.cd.Upload
[filename]");
- System.exit(-1);
- }
-
- String filename = args[0];
-
- // Get information about the Bean server from the properties file
- Properties props = new Properties();
- Properties sysProps = System.getProperties();
- try
- {
- props.load (new FileInputStream ("cd.properties"));
- sysProps.putAll(props);
- }
- catch (Exception e)
- {
- System.err.println ("Can't read `cd.proprties'");
- System.exit (-1);
- }
- System.setProperties (sysProps);
-
try
{
uploadFile (filename);
@@ -117,9 +94,10 @@
String artist = tokens[2];
String type = tokens[3];
String notes = tokens[4];
+ System.out.println("id="+Integer.valueOf(id));
try
{
- cdCollection.addCd(Integer.getInteger(id),
title, artist, type, notes);
+ cdCollection.addCd(Integer.valueOf(id),
title, artist, type, notes);
}
catch (CDExistsException e)
{
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development