Trimming trailing spaces, removing tabs by a script
- using tab width of 4 spaces
- trailing space in property files is converted to unicode, so it is
visible in sources
- bat files use CRLF
- all other text files use just LF
diff --git a/appserver/tests/appserv-tests/devtests/ejb/sfsb/passivateactivate/client/Client.java b/appserver/tests/appserv-tests/devtests/ejb/sfsb/passivateactivate/client/Client.java
index 8c22956..3b3f5c6 100644
--- a/appserver/tests/appserv-tests/devtests/ejb/sfsb/passivateactivate/client/Client.java
+++ b/appserver/tests/appserv-tests/devtests/ejb/sfsb/passivateactivate/client/Client.java
@@ -33,8 +33,8 @@
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
private static final int MAX_SFSBS = 40;
@@ -52,15 +52,15 @@
client.doTest();
System.out.println("[passivateactivateClient] DONE doTest()...");
stat.printSummary("passivateactivate");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
public void doTest() {
- initSFSBList(); //create SFSBs
+ initSFSBList(); //create SFSBs
accessSFSB(); //access the SFBS
- removeTest();
+ removeTest();
}
private void initSFSBList() {
@@ -90,21 +90,21 @@
public void accessSFSB() {
try {
- System.out.println("Waiting for 10 seconds before accessing...");
- for (int i=0; i<10; i++) {
- System.out.println("" + (10 - i) + " seconds left...");
- try {
- Thread.currentThread().sleep(1*1000);
- } catch (Exception ex) {
- }
- }
+ System.out.println("Waiting for 10 seconds before accessing...");
+ for (int i=0; i<10; i++) {
+ System.out.println("" + (10 - i) + " seconds left...");
+ try {
+ Thread.currentThread().sleep(1*1000);
+ } catch (Exception ex) {
+ }
+ }
boolean passed = true;
for (int i=0; i < MAX_SFSBS; i++) {
SFSB sfsb = (SFSB) sfsbList.get(i);
String sfsbName = _sfsbPrefix+i;
- String retrievedName = sfsb.getName();
-
+ String retrievedName = sfsb.getName();
+
boolean sessionCtxTest = sfsb.checkSessionContext();
boolean initialCtxTest = sfsb.checkInitialContext();
boolean entityHomeTest = sfsb.checkEntityHome();
@@ -114,32 +114,32 @@
boolean homeHandleTest = sfsb.checkHomeHandle();
boolean handleTest = sfsb.checkHandle();
boolean utTest = sfsb.checkUserTransaction();
- boolean activationTest = (sfsb.getActivationCount() != 0);
- boolean passivationTest = (sfsb.getPassivationCount() != 0);
+ boolean activationTest = (sfsb.getActivationCount() != 0);
+ boolean passivationTest = (sfsb.getPassivationCount() != 0);
- int actCount = sfsb.getActivationCount();
- int pasCount = sfsb.getPassivationCount();
+ int actCount = sfsb.getActivationCount();
+ int pasCount = sfsb.getPassivationCount();
System.out.println(sessionCtxTest + "; " + initialCtxTest
+ "; " + entityHomeTest + "; " + entityLocalHomeTest
+ "; " + entityRemoteTest + "; " + entityLocalTest
- + "; " + homeHandleTest + "; " + handleTest
+ + "; " + homeHandleTest + "; " + handleTest
+ "; " + utTest
- + "; " + activationTest + " (" + actCount + ")"
- + "; " + passivationTest + " (" + pasCount + ")"
- );
+ + "; " + activationTest + " (" + actCount + ")"
+ + "; " + passivationTest + " (" + pasCount + ")"
+ );
passed = sessionCtxTest && initialCtxTest
&& entityHomeTest && entityLocalHomeTest
&& entityRemoteTest && entityLocalTest
&& homeHandleTest && handleTest && utTest
- && activationTest && passivationTest;
+ && activationTest && passivationTest;
if (! passed) {
break;
}
- sfsb.sleepForSeconds(2);
+ sfsb.sleepForSeconds(2);
}
if (passed) {
@@ -153,44 +153,44 @@
String sfsbName = _sfsbPrefix+i;
sfsb.makeStateNonSerializable();
- }
+ }
- //Creating these many SFSBs should force passivation of the above
- // non-serializable beans
+ //Creating these many SFSBs should force passivation of the above
+ // non-serializable beans
for (int i=0; i < MAX_SFSBS; i++) {
- home.create(_sfsbPrefix + (i+1)*1000);
- }
+ home.create(_sfsbPrefix + (i+1)*1000);
+ }
- System.out.println("Waiting for 10 seconds for passivation to complete...");
+ System.out.println("Waiting for 10 seconds for passivation to complete...");
- for (int i=0; i<10; i++) {
- System.out.println("" + (10 - i) + " seconds left...");
- try {
- Thread.currentThread().sleep(1*1000);
- } catch (Exception ex) {
- }
- }
+ for (int i=0; i<10; i++) {
+ System.out.println("" + (10 - i) + " seconds left...");
+ try {
+ Thread.currentThread().sleep(1*1000);
+ } catch (Exception ex) {
+ }
+ }
for (int i=0; i < MAX_SFSBS; i++) {
SFSB sfsb = (SFSB) sfsbList.get(i);
String sfsbName = _sfsbPrefix+i;
try {
- System.out.print("Expecting exception for: " + sfsbName);
- String nm = sfsb.getName();
- System.out.println("ERROR. Didn't get expected exception. "
- + "Got: " + nm);
- passed = false;
- break;
- } catch (Exception ex) {
- System.out.println("[**Got Exception**]");
- }
- }
- if (passed) {
- stat.addStatus("ejbclient non-serializable-state", stat.PASS);
- } else {
- stat.addStatus("ejbclient non-serializable-state", stat.FAIL);
- }
+ System.out.print("Expecting exception for: " + sfsbName);
+ String nm = sfsb.getName();
+ System.out.println("ERROR. Didn't get expected exception. "
+ + "Got: " + nm);
+ passed = false;
+ break;
+ } catch (Exception ex) {
+ System.out.println("[**Got Exception**]");
+ }
+ }
+ if (passed) {
+ stat.addStatus("ejbclient non-serializable-state", stat.PASS);
+ } else {
+ stat.addStatus("ejbclient non-serializable-state", stat.FAIL);
+ }
} catch (Exception ex) {
stat.addStatus("ejbclient accessSFSB", stat.FAIL);
@@ -199,33 +199,33 @@
public void removeTest() {
- SFSB sfsb = null;
- try {
- String myName = "_2_" + _sfsbPrefix + "_2_";
- sfsb = (SFSB) home.create(myName);
- String retrievedName = sfsb.getName();
- boolean nameOK = myName.equalsIgnoreCase(retrievedName);
- boolean gotException = false;
+ SFSB sfsb = null;
+ try {
+ String myName = "_2_" + _sfsbPrefix + "_2_";
+ sfsb = (SFSB) home.create(myName);
+ String retrievedName = sfsb.getName();
+ boolean nameOK = myName.equalsIgnoreCase(retrievedName);
+ boolean gotException = false;
// Test BMT SFSB remove called in a transaction
- jakarta.transaction.UserTransaction ut = (jakarta.transaction.UserTransaction)
+ jakarta.transaction.UserTransaction ut = (jakarta.transaction.UserTransaction)
(new InitialContext()).lookup("java:comp/UserTransaction");
ut.begin();
- sfsb.remove();
+ sfsb.remove();
ut.commit();
- try {
- sfsb.getName();
- gotException = false; //Expecting an exception
- } catch (Exception ex) {
- gotException = true;
- }
+ try {
+ sfsb.getName();
+ gotException = false; //Expecting an exception
+ } catch (Exception ex) {
+ gotException = true;
+ }
- String resultStr = "(" + nameOK + " @@@ " + gotException + ")";
+ String resultStr = "(" + nameOK + " @@@ " + gotException + ")";
if (nameOK && gotException) {
stat.addStatus("ejbclient removeTest " + resultStr, stat.PASS);
} else {
System.err.println("======> FAIL because: nameOK: " + nameOK + " gotException: " + gotException);
- stat.addStatus("ejbclient removeTest " + resultStr, stat.FAIL);
+ stat.addStatus("ejbclient removeTest " + resultStr, stat.FAIL);
}
} catch (Exception ex) {