summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples')
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.classpath9
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.project17
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jarbin0 -> 1751 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.earbin0 -> 4935 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jarbin0 -> 2804 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jarbin0 -> 4073 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jarbin0 -> 870 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rarbin0 -> 12671 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.classbin0 -> 129 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.classbin0 -> 1814 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.classbin0 -> 1044 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.classbin0 -> 2042 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.classbin0 -> 1563 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.classbin0 -> 651 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.classbin0 -> 450 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.classbin0 -> 207 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.classbin0 -> 2526 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.classbin0 -> 2618 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.classbin0 -> 3738 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.classbin0 -> 729 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.classbin0 -> 1889 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.classbin0 -> 678 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.classbin0 -> 1871 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.classbin0 -> 244 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.properties32
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.xml764
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/Readme.txt61
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/build.xml47
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRates.java9
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesBean.java46
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesClient.java18
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionFactoryImpl.java69
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionImpl.java54
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionMetaDataImpl.java31
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.java27
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionSpecImpl.java9
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/InteractionImpl.java96
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/META-INF/ra.xml28
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.java100
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionImpl.java135
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.java35
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/MappedRecordImpl.java121
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/RecordFactoryImpl.java20
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.java124
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/JavaLoanApp.java20
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/BuildLog.htm52
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dllbin0 -> 114688 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.expbin0 -> 758 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilkbin0 -> 763084 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.libbin0 -> 1928 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.objbin0 -> 14622 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pchbin0 -> 11010048 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdbbin0 -> 2599936 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.resbin0 -> 880 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.objbin0 -> 234840 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idbbin0 -> 617472 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdbbin0 -> 610304 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.cpp65
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.def6
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.h34
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncbbin0 -> 68608 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.rc115
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.sln21
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suobin0 -> 8192 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.vcproj187
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/ReadMe.txt59
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Resource.h16
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/examples_jni_JavaLoanApp.h21
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/res/LoanApp.rc213
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.cpp7
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.h52
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dllbin0 -> 114688 bytes
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Hello.java13
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloBean.java16
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java59
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java.original41
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/META-INF/ejb-jar.xml5
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Readme.txt13
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/build.xml30
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrders.java13
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersBean.java67
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersClient.java19
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application-client.xml7
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application.xml10
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/ejb-jar.xml22
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/Readme.txt15
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/build.xml29
87 files changed, 2879 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.classpath b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.classpath
new file mode 100644
index 0000000..af5c052
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5.0"/>
+ <classpathentry kind="lib" path="C:/Programme/glassfish/lib/appserv-ws.jar"/>
+ <classpathentry kind="lib" path="C:/Programme/glassfish/lib/appserv-rt.jar"/>
+ <classpathentry kind="lib" path="C:/Programme/glassfish/lib/javaee.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.project b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.project
new file mode 100644
index 0000000..8f225f6
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>EJB3-Examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jar b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jar
new file mode 100644
index 0000000..d0255e6
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jar
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.ear b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.ear
new file mode 100644
index 0000000..66156e7
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.ear
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jar b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jar
new file mode 100644
index 0000000..141f1eb
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jar
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jar b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jar
new file mode 100644
index 0000000..5dcc517
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jar
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jar b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jar
new file mode 100644
index 0000000..a6f689f
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jar
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rar b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rar
new file mode 100644
index 0000000..6d8c6ba
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rar
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.class
new file mode 100644
index 0000000..60b19ca
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.class
new file mode 100644
index 0000000..e8b71cf
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.class
new file mode 100644
index 0000000..db0f77c
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.class
new file mode 100644
index 0000000..a96cfbe
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.class
new file mode 100644
index 0000000..bcb283d
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.class
new file mode 100644
index 0000000..6a9741c
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.class
new file mode 100644
index 0000000..bfc6cb8
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.class
new file mode 100644
index 0000000..bab7695
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.class
new file mode 100644
index 0000000..121fb0e
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.class
new file mode 100644
index 0000000..ea7a8a6
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.class
new file mode 100644
index 0000000..acd5489
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.class
new file mode 100644
index 0000000..73dc2cf
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.class
new file mode 100644
index 0000000..1ba8854
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.class
new file mode 100644
index 0000000..2a87db4
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.class
new file mode 100644
index 0000000..dd35805
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.class b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.class
new file mode 100644
index 0000000..97e5df6
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.class
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.properties b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.properties
new file mode 100644
index 0000000..ddf8b69
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.properties
@@ -0,0 +1,32 @@
+#
+# Common properties, included by common.xml
+# Edit this file to reflect your environment.
+
+# local configuration parameters
+admin.password=adminadmin
+admin.host=localhost
+appserver.instance=server
+appserver.instance.port=8080
+admin.user=admin
+admin.port=4848
+domain.name=domain1
+
+#jndi.port=3700
+#jndi.factory=com.sun.jndi.cosnaming.CNCtxFactory
+#jndi.factory=com.sun.jndi.fscontext.RefFSContextFactory
+#jndi.provider.url=corbaloc::${admin.host}:${jndi.port}/NameService
+#jndi.provider.url=file:c:
+
+
+# The path seperator for the platform
+# Unix - :
+# Note for windows add the drive after the seperator
+# Windows - ;C:
+pathsep=;
+
+# The directory seperator for the platform
+# Unix - /
+# Windows - \
+#
+dirsep=/
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.xml
new file mode 100644
index 0000000..a228986
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.xml
@@ -0,0 +1,764 @@
+<!--
+Common ant targets for Mastering EJB 3.0,
+
+This file is included from each chapter's build.xml files
+and does not need to be edited. To adapt the build environment,
+edit common.properties only.
+-->
+
+<!-- ======================================================== -->
+<!-- Application Server Common Properties -->
+<!-- ======================================================== -->
+
+<property file="${basedir}/etc/common.properties"/>
+<property environment="env"/>
+
+
+
+<!-- -->
+<!-- JBoss-specific properties -->
+<!-- -->
+
+<property name="jboss.home" value="${env.JBOSS_HOME}"/>
+<property name="jboss.server.config" value="all"/>
+<!-- <property name="deploy.dir" value="${jboss.home}/server/${jboss.server.config}/deploy"/> -->
+<property name="vendor.lib.dir1" value="c:/Programme/jboss-EJB-3.0_RC1/lib/ejb3.deployer"/>
+<property name="vendor.lib.dir2" value="${env.JBOSS_HOME}/client"/>
+<property name="vendor.deploy.dir" value="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer"/>
+<property name="vendor.ejb3-1.jar" value="jboss-ejb3.jar" />
+<property name="vendor.ejb3-2.jar" value="jboss-ejb3x.jar" />
+
+<!-- -->
+<!-- Sun-specific properties -->
+<!-- -->
+
+<!-- Source file location. -->
+<property name="src" value="./src"/>
+<property name="generated.dir" value="${src.dir}/generated" />
+<property name="src.docroot" value="${src}/docroot"/>
+<property name="appserver.home" value="${env.GLASSFISH_HOME}"/>
+<property name="deploy.dir" value="${env.GLASSFISH_HOME}/domains/domain1/autodeploy"/>
+
+<!-- Destination directory for the build and assembly targets -->
+<property name="build" value="./build"/>
+<property name="descriptors" value="./descriptors"/>
+<property name="build.classesdir" value="${build}/classes"/>
+<property name="assemble" value="./assemble"/>
+<property name="assemble.jar" value="${assemble}/jar"/>
+<property name="assemble.par" value="${assemble}/par"/>
+<property name="assemble.ejbjar" value="${assemble}/ejbjar"/>
+<property name="assemble.ear" value="${assemble}/ear"/>
+<property name="assemble.clientjar" value="${assemble}/client"/>
+<property name="assemble.war" value="${assemble}/war"/>
+<property name="assemble.rar" value="${assemble}/rar"/>
+
+<property name="service.wsdl"
+ value="http://${admin.host}:${appserver.instance.port}/${ServiceName}/${PortType}?WSDL" />
+
+
+<!-- some common file names -->
+<property name="ear" value="${appname}.ear"/>
+<property name="jar" value="${appname}.jar"/>
+<property name="par" value="${appname}.par"/>
+<property name="war" value="${appname}.war"/>
+<property name="rar" value="${raname}.rar"/>
+<property name="ejbjar" value="${appname}Ejb.jar"/>
+<property name="clientjar" value="${appname}Client.jar"/>
+<property name="earDD" value="application.xml"/>
+<property name="jarDD" value="ejb-jar.xml"/>
+<property name="sunjarDD" value="sun-ejb-jar.xml"/>
+<property name="wsDD" value="webservices.xml"/>
+<property name="warDD" value="web.xml,sun-web.xml,sun-jaxws.xml"/>
+
+<!--Rima added this property for the timer's managed client example-->
+<property name="clientDD" value="application-client.xml"/>
+
+<!--Rima added the following properties for the connector example-->
+<property name="assemble.jnijar" value="${assemble}/jnijar"/>
+<property name="jnijar" value="${jnijarname}.jar"/>
+<property name="rarDD" value="ra.xml"/>
+
+<!-- classpath jar files location. -->
+<property name="sample.classpath.dir" value="${appserver.home}/lib"/>
+<property name="optional.taskdef.jar" value="sun-appserv-ant.jar"/>
+
+<target name="setup_env"
+ depends="init_common">
+ <property name="admin.host" value="${as.env.AS_ADMIN_HOST}"/>
+ <property name="admin.port" value="${as.env.AS_ADMIN_PORT}"/>
+ <property name="admin.user" value="${as.env.AS_ADMIN_USER}"/>
+ <property name="admin.password" value="${as.env.AS_ADMIN_PASSWORD}"/>
+ <property name="appserver.instance" value="${as.env.AS_ADMIN_INSTANCE}"/>
+</target>
+
+<target name="init_common" depends="build_cpath">
+ <property name="classpath.prefix" value="."/>
+ <property name="classpath.suffix" value="."/>
+ <property name="build.classpath"
+ value="${classpath.prefix}:${build.classesdir}:${appserver.cpath}:${classpath.suffix}:${java.home}/../lib/tools.jar"/>
+ <property name="run.classpath"
+ value="${build.classpath}:${assemble.clientjar}/${clientjar}"/>
+ <taskdef name="apt" classname="com.sun.tools.ws.ant.Apt" >
+ <classpath refid="sample_classpath_jars"/>
+</taskdef>
+
+<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport" >
+ <classpath refid="sample_classpath_jars"/>
+</taskdef>
+
+<taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen" >
+ <classpath refid="sample_classpath_jars"/>
+</taskdef>
+</target>
+
+<target name="build_cpath" unless="appserver.cpath">
+ <path id="sample_classpath_jars">
+ <fileset dir="${appserver.home}/lib" includes="*.jar" />
+ <pathelement location="${assemble.clientjar}/${clientjar}"/>
+ </path>
+
+ <pathconvert pathsep=";" property="appserver.cpath"
+ refid="sample_classpath_jars"/>
+</target>
+
+
+
+
+<!-- =============================== -->
+<!-- Compile all classes -->
+<!-- =============================== -->
+
+<target name="compile_common" depends="init_common">
+ <mkdir dir="${build.classesdir}"/>
+ <mkdir dir="${src}/generated"/>
+ <echo message="${pack.dir}" />
+ <javac srcdir="${pack.dir}"
+ destdir="${build.classesdir}"
+ classpath="${build.classpath}"/>
+</target>
+
+
+
+<!-- ======================================================= -->
+<!-- Clean up various files and directories. -->
+<!-- ======================================================= -->
+<target name="clean_clientjar_common">
+ <delete dir="${assemble.clientjar}"/>
+</target>
+
+
+<target name="clean_war_common">
+ <delete dir="${assemble.war}"/>
+</target>
+
+
+<target name="clean_ear_common">
+ <delete dir="${assemble.ear}"/>
+</target>
+
+<target name="clean_ejbjar_common">
+ <delete dir="${assemble.ejbjar}"/>
+</target>
+
+<target name="clean_rar_common">
+ <delete dir="${assemble.rar}"/>
+</target>
+
+<target name="clean_jar_common">
+ <delete dir="${assemble.jar}"/>
+</target>
+
+
+<target name="clean_common" >
+ <delete dir="${build.dir}"/>
+ <delete dir="${generated.dir}"/>
+</target>
+
+<!-- Rima commented this target -->
+<!--<target name="create_client_jar">-->
+<!-- <jar destfile="${assemble.clientjar}/${clientjar}">-->
+<!-- <zipfileset dir="${assemble.clientjar}" -->
+<!-- includes="**/*.class" /> -->
+<!-- <metainf dir="." includes="${assemble}/${clientDD}"/>-->
+<!-- </jar>-->
+<!--</target>-->
+
+<!-- ======================================================= -->
+<!-- Assemble EAR module. -->
+<!-- ======================================================= -->
+<target name="mkdir_ear">
+ <mkdir dir="${assemble.ear}/META-INF"/>
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Assemble WAR module. -->
+<!-- ======================================================= -->
+<target name="check_warfile">
+ <available file="${build.classesdir}" type="dir"
+ property="warfiles.present"/>
+</target>
+
+<target name="mkdir_war">
+ <mkdir dir="${assemble.war}"/>
+</target>
+
+
+
+<target name="add_docroot" if="docroot.present">
+ <jar destfile="${assemble.war}/${war}" update="true">
+ <fileset dir="${src.docroot}" excludes="CVS,annotation"/>
+ </jar>
+</target>
+
+<target name="add_classes" if="warfiles.present">
+ <jar destfile="${assemble.war}/${war}" update="true">
+ <zipfileset dir="${src}/jsp/" includes="*.jsp" />
+ </jar>
+ <jar destfile="${assemble.war}/${war}" update="true">
+ <zipfileset dir="${build.classesdir}/${war.pkg}/" includes="**/*Servlet.class"
+ prefix="WEB-INF/classes/${war.pkg}"/>
+ </jar>
+</target>
+
+
+<target name="add_ejbjar_war" if="ejbjar.done">
+ <jar destfile="${assemble.war}/${war}" update="true">
+ <zipfileset dir="${assemble.ejbjar}" includes="${ejbjar}"
+ prefix="WEB-INF/lib"/>
+ </jar>
+</target>
+
+
+<target name="mkdir_ear_dir">
+ <mkdir dir="${assemble.ear}"/>
+</target>
+
+<target name="add_ejbjar" if="ejbjar.done">
+ <jar destfile="${assemble.ear}/${ear}" update="true">
+ <fileset dir="${assemble.ejbjar}" includes="${ejbjar}"/>
+ </jar>
+</target>
+
+<target name="add_war" if="war.done">
+ <jar destfile="${assemble.ear}/${ear}" update="true">
+ <fileset dir="${assemble.war}" includes="${war}"/>
+ </jar>
+</target>
+
+<target name="add_clientjar" if="clientjar.done">
+ <jar destfile="${assemble.ear}/${ear}" update="true">
+ <fileset dir="${assemble.clientjar}" includes="${clientjar}"/>
+ </jar>
+</target>
+
+<target name="create_ear_common" depends="clean_ear_common,mkdir_ear_dir,add_clientjar,add_war">
+<echo message="${src.dir}/${package}/META-INF/${earDD}"/>
+ <jar destfile="${assemble.ear}/${ear}" update="true">
+ <fileset dir="${assemble.ejbjar}" includes="${ejbjar}"/>
+ <fileset dir="${assemble.ejbjar}" includes="sun-application.xml"/>
+ <fileset dir="${src.dir}/${package}" includes="META-INF/${earDD}"/>
+ </jar>
+
+ <delete file="../${ejbjar}" />
+ <delete file="../${clientjar}" />
+</target>
+
+<target name="create_ear_common_with_clientjar" depends="clean_ear_common,mkdir_ear_dir,add_clientjar,add_war">
+ <jar destfile="${assemble.ear}/${ear}" update="true">
+ <fileset dir="${assemble.ejbjar}" includes="${ejbjar}"/>
+ <fileset dir="${assemble.ejbjar}" includes="${sun-ejbjar}"/>
+ <metainf dir="${assemble}" includes="${earDD}"/>
+
+ <!-- Rima added below line to make sure that EAR's DD is included -->
+ <fileset dir="${src.dir}/${package}" includes="META-INF/${earDD}"/>
+
+
+ <fileset dir="${assemble.clientjar}" includes="${clientjar}"/>
+ <metainf dir="${assemble}" includes="${clientDD}"/>
+ </jar>
+
+ <delete file="../${ejbjar}" />
+ <delete file="../${clientjar}" />
+</target>
+
+
+<target name="create_war_common"
+ depends="mkdir_war,create_ejbjar_common">
+
+ <jar destfile="${assemble.war}/${war}" update="true">
+ <zipfileset dir="${build.classesdir}/${app.pkg}/" includes="**/*.class"/>
+ </jar>
+ <echo message="${src.dir}/${package}/WEB-INF/${warDD}" />
+ <jar destfile="${assemble.war}/${war}" update="true" >
+ <fileset dir="${src.dir}/${package}" includes="WEB-INF/*.xml" />
+ </jar>
+ <property name="war.done" value="true"/>
+</target>
+
+
+
+<!-- ======================================================= -->
+<!-- Assemble EJB JAR module. -->
+<!-- ======================================================= -->
+<target name="create_ejbjar_common" depends="clean_ejbjar_common">
+ <mkdir dir="${assemble.ejbjar}"/>
+ <jar destfile="${assemble.ejbjar}/${ejbjar}">
+ <zipfileset dir="${build.classesdir}/${app.pkg}/" includes="**/*.class"
+ excludes="**/servlet/, **/client/" prefix="${jar.pkg}"/>
+ <fileset dir="${src.dir}/${package}" includes="META-INF/${jarDD}"/>
+ <fileset dir="${generated.dir}" includes="**"/>
+ </jar>
+
+ <property name="ejbjar.done" value="true"/>
+</target>
+
+<target name="create_ejbjar_ws_common" depends="clean_ejbjar_common">
+ <mkdir dir="${assemble.ejbjar}"/>
+ <mkdir dir="${assemble}/wsdl"/>
+ <copy file="${assemble}/${appname}.wsdl" todir="${assemble}/wsdl" failonerror="false"/>
+ <copy file="${assemble}/mapping.xml" todir="${assemble}/wsdl" failonerror="false"/>
+ <copy file="${src}/${wsDD}" todir="${assemble}/" failonerror="false"/>
+ <jar destfile="${assemble.ejbjar}/${ejbjar}">
+ <zipfileset dir="${build.classesdir}/${jar.pkg}/" includes="**/*.class"
+ excludes="**/servlet/, **/client/" prefix="${jar.pkg}"/>
+ <metainf dir="${assemble}" includes="${jarDD},${sunjarDD},${wsDD},wsdl/**"/>
+ </jar>
+ <copy file="${assemble.ejbjar}/${ejbjar}" tofile="../${ejbjar}"/>
+ <property name="ejbjar.done" value="true"/>
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Assemble Connector RAR module. -->
+<!-- ======================================================= -->
+<target name="create_rar_common" depends="clean_rar_common">
+ <mkdir dir="${assemble.rar}"/>
+ <jar destfile="${assemble.rar}/${rar}">
+ <zipfileset dir="${build.classesdir}/${rar.pkg}/" includes="**/*.class"
+ excludes="**/servlet/, **/client/" prefix="${rar.pkg}"/>
+
+ <fileset dir="${src.dir}/${rar.pkg}" includes="META-INF/${rarDD}"/>
+ <fileset dir="${generated.dir}" includes="**"/>
+
+ <!--Also include JNI Jar within the RAR module-->
+ <fileset file="${assemble.jnijar}/${jnijar}" includes="**"/>
+ </jar>
+
+ <copy file="${assemble.rar}/${rar}" tofile="../${rar}"/>
+ <delete file="../${rar}" />
+
+ <property name="rar.done" value="true"/>
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Assemble client JAR module. -->
+<!-- ======================================================= -->
+
+<target name="clientjar_common" depends="clean_clientjar_common">
+ <rmic classname="${remote.interface}"
+ classpath="${build}:${appserver.home}/lib/j2ee.jar:${appserver.home}/lib/appserv-ext.jar"
+ iiop="yes"
+ base="${build}"/>
+
+ <rmic classname="${remote.home}"
+ classpath="${build}:${appserver.home}/lib/j2ee.jar:${appserver.home}/lib/appserv-ext.jar"
+ iiop="yes"
+ base="${build}"/>
+
+ <mkdir dir="${assemble.clientjar}"/>
+ <jar destfile="${assemble.clientjar}/${clientjar}">
+ <zipfileset dir="${build.classesdir}"
+ includes="**/*.class" excludes="**/*Bean.class"/>
+<!-- prefix="${app.pkg}"/> -->
+ <metainf dir="." includes="${assemble}/${clientDD}"/>
+ </jar>
+
+ <jar destfile="${assemble.clientjar}/${clientjar}" update="true">
+ <zipfileset dir="${assemble}" includes="${clientDD}" prefix="META-INF"/>
+ </jar>
+
+ <property name="clientjar.done" value="true"/>
+</target>
+
+
+<target name="base_clientjar_common" depends="clean_clientjar_common">
+ <mkdir dir="${assemble.clientjar}"/>
+ <jar destfile="${assemble.clientjar}/${clientjar}">
+ <zipfileset dir="${build.classesdir}/${app.pkg}/"
+ includes="**/*.class" excludes="**/*Bean.class, **/*Home.class"
+ prefix="${app.pkg}"/>
+ <metainf dir="." includes="${clientDD}"/>
+ </jar>
+
+ <jar destfile="${assemble.clientjar}/${clientjar}" update="true">
+ <zipfileset dir="${assemble}" includes="${clientDD}" prefix="META-INF"/>
+ </jar>
+
+ <property name="clientjar.done" value="true"/>
+</target>
+
+<!-- Rima added the below target to enable packaging of Java EE application clients-->
+
+<target name="app_clientjar_common" depends="clean_clientjar_common">
+ <mkdir dir="${assemble.clientjar}"/>
+ <jar destfile="${assemble.clientjar}/${clientjar}">
+ <zipfileset dir="${build.classesdir}/${app.pkg}/"
+ includes="**/*.class" excludes="**/*Bean.class, **/*Home.class"
+ prefix="${app.pkg}"/>
+ <metainf dir="." includes="${clientDD}"/>
+
+ <fileset dir="${src.dir}/${package}" includes="META-INF/${clientDD}"/>
+
+ <manifest>
+ <attribute name="Main-Class" value="${client.class}"/>
+ </manifest>
+ </jar>
+
+ <jar destfile="${assemble.clientjar}/${clientjar}" update="true">
+ <zipfileset dir="${assemble}" includes="${clientDD}" prefix="META-INF"/>
+ </jar>
+
+ <property name="clientjar.done" value="true"/>
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Assemble Simple JAR file. -->
+<!-- ======================================================= -->
+<target name="create_jar_common" depends="clean_jar_common">
+ <mkdir dir="${assemble.jar}"/>
+ <jar destfile="${assemble.jar}/${jar}">
+ <zipfileset dir="${build.classesdir}/${app.pkg}/" includes="**/*.class"
+ prefix="${app.pkg}"/>
+ </jar>
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Deploy CLI support. -->
+<!-- ======================================================= -->
+
+<!-- Name of the asadmin commands -->
+<property name="s1as.admin" value="${appserver.home}/bin/asadmin"/>
+
+<!-- determine which OS is being utilized. -->
+<target name="checkPlatform" >
+ <condition property ="isUnixPlatform">
+ <os family="unix"/>
+ </condition>
+ <condition property ="isWindowsPlatform">
+ <os family="windows"/>
+ </condition>
+</target>
+
+<!-- configUnix will be invoked when ant is being run on
+ unix/Linux. It will configure the values for ${os}
+ and ${dir.sep}
+-->
+<target name="configUnix" depends="checkPlatform" if="isUnixPlatform" >
+ <echo message="on unix"/>
+ <property name="dir.sep" value="/"/>
+ <property name="os" value="unix"/>
+ <property name="exec.asadmin" value="${s1as.admin}" />
+ <property name="exec.asadmin.part2" value="" />
+</target>
+
+<!--
+configWindows will be invoked when ant is being run on
+windows. It will configure the values for ${os}
+and ${dir.sep}
+-->
+
+<target name="configWindows" depends="checkPlatform" if="isWindowsPlatform" >
+ <echo message="on windows"/>
+ <property name="dir.sep" value="\\"/>
+ <property name="os" value="windows"/>
+ <property name="exec.asadmin" value="cmd.exe" />
+ <property name="exec.asadmin.part2" value= " /c ${s1as.admin}" />
+</target>
+
+
+
+<!-- ======================================================= -->
+<!-- Update target. -->
+<!-- ======================================================= -->
+
+<target name="update_common" depends="setup_env">
+ <echo message="Updating ${deploy.file}."/>
+ <sun-appserv-update file="${deploy.file}"/>
+</target>
+
+<!-- ======================================================= -->
+<!-- Deploy CLI support. -->
+<!-- ======================================================= -->
+
+<!-- Name of the asadmin commands -->
+<property name="s1as.admin" value="${appserver.home}/bin/asadmin"/>
+<property name="s1as.domain.dir" value="${appserver.home}/domains"/>
+<property name="s1as.domain.name" value="${domain.name}"/>
+<property name="s1as.domain" value="${s1as.domain.dir}/${s1as.domain.name}"/>
+
+<target name="configPlatform"
+ depends="checkPlatform, configUnix, configWindows"/>
+
+
+
+<!-- ======================================================= -->
+<!-- Install targets. -->
+<!-- ======================================================= -->
+
+<target name="deploy_common"
+ depends="checkPlatform, configUnix, configWindows">
+ <echo message="Deploying ${deploy.file}."/>
+ <copy file="${assemble.dir}/${deploy.file}" todir="${deploy.dir}"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}_deployed"/>
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}_deployFailed"/>
+ </or>
+ </waitfor>
+</target>
+
+<target name="deploy_connector_common"
+ depends="checkPlatform, configUnix, configWindows">
+ <echo message="Deploying ${assemble.rar}/${raname}.rar."/>
+ <exec executable="${exec.asadmin}" >
+ <arg line="${exec.asadmin.part2}" />
+ <arg line=" deploy"/>
+ <arg line=" --user ${admin.user}"/>
+ <arg line=" --password ${admin.password}"/>
+ <arg line=" --host ${admin.host}"/>
+ <arg line=" --port ${admin.port}"/>
+ <arg line=" --virtualservers ${appserver.instance}"/>
+ <arg line=" --force=true"/>
+ <arg line=" --name ${raname}"/>
+ <arg line=" --upload=true"/>
+ <arg line="${assemble.rar}/${raname}.rar"/>
+ </exec>
+</target>
+
+<target name="deploy_retrieve_common" depends="setup_env, checkPlatform, configUnix, configWindows">
+ <echo message="Deploying ${deploy.file} and retrieving client stubs."/>
+ <exec executable="${exec.asadmin}" >
+ <arg line="${exec.asadmin.part2}" />
+ <arg line=" deploy"/>
+ <arg line=" --user ${admin.user}"/>
+ <arg line=" --password ${admin.password}"/>
+ <arg line=" --host ${admin.host}"/>
+ <arg line=" --port ${admin.port}"/>
+ <arg line=" --virtualservers ${appserver.instance}"/>
+ <arg line=" --force=true"/>
+ <arg line=" --name ${appname}"/>
+ <arg line=" --upload=true"/>
+ <arg line=" --retrieve="/>
+ <arg line="${deploy.file}"/>
+ </exec>
+</target>
+
+<!-- Run stand-alone client target -->
+
+<target name="run_client_standalone" depends="setup_env">
+ <java classname="${client.class}" classpath="${build.classesdir};${appserver.home}/lib/appserv-rt.jar;${appserver.home}/lib/appserv-admin.jar;${appserver.home}/lib/javaee.jar;" fork="yes">
+ </java>
+</target>
+
+<!-- Run client target -->
+
+<!-- Rima commented this target and substituted it with the new run_client target-->
+<!--<target name="run_client" depends="setup_env">-->
+<!-- <java classname="${client.class}" classpath="${appserver.home}/lib;${assemble.clientjar}/${clientjar};${appserver.home}/lib/j2ee.jar;${appserver.home}/lib/appserv-ext.jar" fork="yes">-->
+<!-- <sysproperty key="java.naming.provider.url" value="corbaloc::localhost:3700/NameService"/>-->
+<!-- <sysproperty key="java.naming.factory.initial" value="com.sun.jndi.cosnaming.CNCtxFactory"/> -->
+<!-- </java>-->
+<!--</target>-->
+
+<target name="run_client" depends="setup_env">
+ <java classname="${client.class}" classpath="${assemble.ejbjar}/${ejbjar};${assemble.clientjar}/${clientjar};${appserver.home}/lib/appserv-rt.jar;${appserver.home}/lib/javaee.jar" fork="yes"/>
+</target>
+
+<!-- Rima added this target to make the client run in a Java EE Application Client container for the timer example-->
+
+<target name="run_client_in_appcontainer" depends="setup_env">
+ <condition property="appclient.executable" value="${appserver.home}/bin/appclient.bat">
+ <os family="windows"/>
+ </condition>
+
+ <condition property="appclient.executable" value="${appserver.home}/bin/appclient">
+ <not>
+ <os family="windows"/>
+ </not>
+ </condition>
+
+ <exec executable="${appclient.executable}" dir="${basedir}">
+ <arg line="-client ${assemble.clientjar}/${clientjar}" />
+ </exec>
+</target>
+
+<!-- ======================================================= -->
+<!-- Uninstall targets. -->
+<!-- ======================================================= -->
+
+<target name="undeploy_common" depends="init_common" >
+ <echo message="undeploying ${appserver.home}/domains/domain1/autodeploy/${deploy.file}" />
+ <delete file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}_undeployed"/>
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}_undeployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="undeploy_succeeded">
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}.jar_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${appserver.home}/domains/domain1/autodeploy/${deploy.file}.jar_undeployFailed"/>
+ </condition>
+ <fail if="undeploy_failed" message="undeployment failed"/>
+</target>
+
+
+
+
+<!-- ======================================================= -->
+<!-- Admin targets. -->
+<!-- ======================================================= -->
+<target name="admin_command_common" depends="setup_env">
+ <echo message="Doing admin task ${admin.command}"/>
+ <sun-appserv-admin
+ command="${admin.command}"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${appserver.home}" />
+</target>
+
+<target name="reconfig_common">
+</target>
+
+
+<!-- ======================================================= -->
+<!-- Verify Targets. -->
+<!-- ======================================================= -->
+<target name="verify_common" depends="init_common">
+ <echo message="Verifying Process for ${verify.file}" />
+ <java classname="com.sun.enterprise.tools.verifier.Verifier" fork="yes" dir="." failonerror="true">
+ <sysproperty key="appserver.home" value="${appserver.home}"/>
+ <sysproperty key="com.sun.aas.verifier.xsl" value="${appserver.home}/lib/verifier/" />
+ <!-- uncomment the following for verbose output -->
+ <!--<arg value="-v"/>-->
+ <arg value="${verify.file}"/>
+ <classpath path="${build.classpath}"/>
+ </java>
+</target>
+
+<!-- ======================================================= -->
+<!-- Rima added these other connector specific targets -->
+<!-- ======================================================= -->
+
+<target name="compile_jni_common" depends="init_common">
+ <mkdir dir="${build.classesdir}"/>
+ <mkdir dir="${src}/generated"/>
+ <echo message="${jni.pack.dir}" />
+ <javac srcdir="${jni.pack.dir}"
+ destdir="${build.classesdir}"
+ classpath="${build.classpath}"/>
+</target>
+
+<target name="create_jnijar_common" depends="clean_jnijar_common">
+ <mkdir dir="${assemble.jnijar}"/>
+ <jar destfile="${assemble.jnijar}/${jnijar}">
+ <zipfileset dir="${build.classesdir}/${jniapp.pkg}/" includes="**/*.class"
+ excludes="**/servlet/, **/client/" prefix="${jniapp.pkg}"/>
+ </jar>
+
+ <property name="jnijar.done" value="true"/>
+</target>
+
+<target name="clean_jnijar_common">
+ <delete dir="${assemble.jnijar}"/>
+</target>
+
+<target name="compile_connector_common" depends="init_common">
+ <mkdir dir="${build.classesdir}"/>
+ <mkdir dir="${src}/generated"/>
+ <echo message="${connector.pack.dir}" />
+ <javac srcdir="${connector.pack.dir}"
+ destdir="${build.classesdir}"
+ classpath="${build.classpath};${assemble.jnijar}/${jnijar}"/>
+</target>
+
+<target name="create-connector-connection-pool_common" unless="connector.connection.pool.exists.common" depends="setup_env">
+ <antcall target="admin_command_common">
+ <param name="admin.command" value="create-connector-connection-pool --raname ${raname} --connectiondefinition ${connector.connectiondefinition} ${connector.connection.pool.name}"/>
+ </antcall>
+</target>
+
+<target name="delete-connector-connection-pool_common">
+ <antcall target="admin_command_common">
+ <param name="admin.command" value="delete-connector-connection-pool ${connector.connection.pool.name} " />
+ </antcall>
+</target>
+
+<target name="create-connector-resource_common" unless="connector.resource.exists.common" depends="setup_env">
+ <antcall target="admin_command_common">
+ <param name="admin.command" value="create-connector-resource --poolname ${connector.connection.pool.name} ${connector.connection.pool.jndiname}"/>
+ </antcall>
+</target>
+
+<target name="delete-connector-resource_common">
+ <antcall target="admin_command_common">
+ <param name="admin.command" value="delete-connector-resource ${connector.connection.pool.jndiname}"/>
+ </antcall>
+</target>
+
+<target name= "deploy-connector-resource_common" depends = "verify_connector_connection_pool_exists_common, verify_connector_resource_exists_common" >
+ <antcall target="create-connector-connection-pool_common"/>
+ <antcall target="create-connector-resource_common"/>
+</target>
+
+<target name="undeploy_connector_common" depends="setup_env">
+ <echo message="Undeploying ${raname}."/>
+ <sun-appserv-undeploy
+ name="${raname}"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${appserver.home}" />
+</target>
+
+<target name= "undeploy_connector_resource_common">
+ <antcall target="delete-connector-resource_common"/>
+ <antcall target="delete-connector-connection-pool_common"/>
+</target>
+
+<target name="verify_connector_connection_pool_exists_common" depends="setup_env, checkPlatform, configUnix, configWindows">
+ <exec executable="${exec.asadmin}" outputproperty="list.connector.connection.pools" failonerror="true">
+ <arg line="${exec.asadmin.part2}" />
+ <arg line=" list-connector-connection-pools"/>
+ <arg line=" --user ${admin.user}"/>
+ <arg line=" --password ${admin.password}"/>
+ <arg line=" --host ${admin.host}"/>
+ <arg line=" --port ${admin.port}"/>
+ </exec>
+ <condition property="connector.connection.pool.exists.common" value="true">
+ <contains string="${list.connector.connection.pools}" substring="${connector.connection.pool.name}" casesensitive="false"/>
+ </condition>
+</target>
+
+<target name="verify_connector_resource_exists_common" depends="setup_env, checkPlatform, configUnix, configWindows">
+ <exec executable="${exec.asadmin}" outputproperty="list.connector.resources" failonerror="true">
+ <arg line="${exec.asadmin.part2}" />
+ <arg line=" list-connector-resources"/>
+ <arg line=" --user ${admin.user}"/>
+ <arg line=" --password ${admin.password}"/>
+ <arg line=" --host ${admin.host}"/>
+ <arg line=" --port ${admin.port}"/>
+ </exec>
+ <condition property="connector.resource.exists.common" value="true">
+ <contains string="${list.connector.resources}" substring="${connector.connection.pool.jndiname}" casesensitive="false"/>
+ </condition>
+</target> \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/Readme.txt b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/Readme.txt
new file mode 100644
index 0000000..98c39f3
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/Readme.txt
@@ -0,0 +1,61 @@
+J2EE Connector Example
+----------------------
+
+The following are the steps to build, deploy, and run this sample.
+Make sure that the Java EE 5 server is running before deployment.
+
+1) Make sure the following DLLs are in the system classpath
+ (ideally, in c:\winnt\system32):
+ mfc71d.dll
+ msvcr71d.dll
+
+ You can download these DLLs from:
+ http://www.dll-files.com/dllindex/dll-files.shtml?mfc71d
+ http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71d
+
+2) Copy /src/examples/jni/nativelib/LoanApp.dll to your C drive
+ (C:\LoanApp.dll).
+
+3) Make sure that the appropriate security permissions are granted to
+ the resource adapter for linking the dynamic library (LoanApp.dll)
+ by inserting the following line in the java.policy file under
+ <JDK Installation Directory>\jre\lib\security directory.
+
+ permission java.lang.RuntimePermission "loadLibrary.*";
+
+4) Compile and jar the JavaLoanApp.java, which uses JNI calls to
+ invoke functionality of LoanApp.dll library, by typing the following:
+
+ asant jnijar
+
+5) Compile the connector source files and and create the corresponding
+ connector RAR file by using the following target:
+
+ asant rar
+
+6) Deploy the connector, alongwith connector resources such as
+ connector connection pool and the associated JNDI name resource.
+
+ asant deploy_connector
+
+7) Now compile LoanRatesEJB files and create the corresponding ejbjar.
+
+ asant jar
+
+8) Deploy LoanRatesEjb.
+
+ asant deploy_common
+
+9) Compile and jar the LoanRatesEJB client application.
+
+ asant base_clientjar_common.
+
+10) Turn off the firewall, if any, and run the client now.
+
+ asant run_client
+
+11) Undeploy the connector and the EJB, and delete the build classes
+
+ asant undeploy_connector
+ asant undeploy_common
+ asant clean_all \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/build.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/build.xml
new file mode 100644
index 0000000..f42b509
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/build.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [ <!ENTITY include SYSTEM "../../../etc/common.xml"> ]>
+
+<project name="ejb3-examples-integration" default="jar"
+ basedir="../../..">
+
+ <!-- basic settings -->
+ <property name="src.dir" value="${basedir}/src"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="appname" value="LoanApplication"/>
+ <property name="client.class" value="examples.integration.loanratesejb.LoanRatesClient"/>
+ <property name="app.pkg" value="examples/integration/loanratesejb"/>
+ <property name="package" value="${app.pkg}"/>
+ <property name="pack.dir" value="${src.dir}/${app.pkg}"/>
+ <property name="jar.pkg" value="examples/integration/loanratesejb"/>
+
+ <!-- Connector specific properties -->
+
+ <property name="jnijarname" value="JavaLoanApp"/>
+ <property name="jniapp.pkg" value="examples/jni"/>
+ <property name="jni.pack.dir" value="${src.dir}/examples/jni"/>
+
+ <property name="raname" value="OutboundLoanRa"/>
+ <property name="rar.pkg" value="examples/integration/out_loan_ra"/>
+ <property name="connector.pack.dir" value="${src.dir}/examples/integration/out_loan_ra"/>
+ <property name="connector.connection.pool.name" value="OutboundLoanRaPool"/>
+ <property name="connector.connection.pool.jndiname" value="OutboundLoanJNDIName"/>
+ <property name="connector.connectiondefinition" value="javax.resource.cci.ConnectionFactory"/>
+
+
+ <!-- Include common.xml -->
+ &include;
+
+ <property name="assemble.dir" value="${assemble.ejbjar}"/>
+ <property name="deploy.file" value="${ejbjar}"/>
+
+ <target name="jar" depends="compile_common, create_ejbjar_common"/>
+ <target name="ear" depends="jar,create_ear_common"/>
+
+ <target name="clean_all" depends="clean_common, clean_ejbjar_common, clean_clientjar_common, clean_jnijar_common, clean_rar_common"/>
+
+ <!-- Targets pertaining to Connector -->
+ <target name="jnijar" depends="compile_jni_common,create_jnijar_common"/>
+ <target name="rar" depends="compile_connector_common,create_rar_common"/>
+ <target name="deploy_connector" depends="deploy_connector_common, deploy-connector-resource_common"/>
+ <target name="undeploy_connector" depends="undeploy_connector_resource_common, undeploy_connector_common"/>
+</project> \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRates.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRates.java
new file mode 100644
index 0000000..39efddd
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRates.java
@@ -0,0 +1,9 @@
+package examples.integration.loanratesejb;
+
+public interface LoanRates{
+
+ public float getHomeEquityRate();
+}
+
+
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesBean.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesBean.java
new file mode 100644
index 0000000..f01f25e
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesBean.java
@@ -0,0 +1,46 @@
+package examples.integration.loanratesejb;
+
+import javax.resource.cci.*;
+
+import javax.ejb.Stateless;
+import javax.ejb.Remote;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
+import javax.annotation.*;
+
+@Stateless
+@Remote(LoanRates.class)
+@TransactionManagement(TransactionManagementType.BEAN)
+public class LoanRatesBean implements LoanRates{
+
+ @Resource (name="OutboundLoanJNDIName")
+ public javax.resource.cci.ConnectionFactory connFactory;
+
+ public float getHomeEquityRate() {
+ float retVal=0;
+
+ System.out.println("LoanRatesBean.getHomeEquityRate() called");
+
+ try {
+ javax.resource.cci.Connection myCon = connFactory.getConnection();
+ javax.resource.cci.Interaction interaction = myCon.createInteraction();
+ javax.resource.cci.MappedRecord recordIn = connFactory.getRecordFactory().createMappedRecord("");
+
+ recordIn.put("HomeEquityRate","");
+
+ javax.resource.cci.MappedRecord recordOut =
+ (javax.resource.cci.MappedRecord)interaction.execute(null, (javax.resource.cci.Record)recordIn);
+
+ myCon.close();
+
+ Object result = recordOut.get("HomeEquityRate");
+ retVal = ((Float)result).floatValue();
+
+ } catch(Exception e) {
+
+ e.printStackTrace();
+ }
+
+ return retVal;
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesClient.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesClient.java
new file mode 100644
index 0000000..8a10952
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesClient.java
@@ -0,0 +1,18 @@
+package examples.integration.loanratesejb;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.Hashtable;
+import javax.naming.*;
+
+public class LoanRatesClient {
+
+ public static void main(String[] args) throws Exception{
+
+ Context ctx = new InitialContext();
+
+ LoanRates loanRates = (LoanRates) ctx.lookup("examples.integration.loanratesejb.LoanRates");
+
+ System.out.println("getHomeEquityRate() returned: " + loanRates.getHomeEquityRate() + ". Take a look at application server log or console for messages from LoanRatesEJB and OutboundLoanRA.");
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionFactoryImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionFactoryImpl.java
new file mode 100644
index 0000000..02e4aaf
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionFactoryImpl.java
@@ -0,0 +1,69 @@
+package examples.integration.out_loan_ra;
+
+import java.io.*;
+
+import javax.resource.Referenceable;
+import javax.resource.*;
+import javax.resource.spi.*;
+import javax.naming.Reference;
+import javax.resource.cci.*;
+
+public class ConnectionFactoryImpl implements ConnectionFactory, Serializable, Referenceable {
+
+ private ManagedConnectionFactory manConnFactory;
+ private ConnectionManager connManager;
+ private Reference ref;
+
+ public ConnectionFactoryImpl(ManagedConnectionFactory manConnFactory, ConnectionManager connManager) {
+
+ System.out.println("ConnectionFactoryImpl(ManagedConnectionFactory manConnFactory, ConnectionManager connManager) called");
+
+ this.manConnFactory = manConnFactory;
+
+ this.connManager = connManager;
+ }
+
+ public javax.resource.cci.Connection getConnection() throws ResourceException {
+
+ System.out.println("ConnectionFactoryImpl.getConnection() called");
+
+ javax.resource.cci.Connection conn = null;
+
+ conn = (javax.resource.cci.Connection) connManager.allocateConnection(manConnFactory, null);
+
+ return conn;
+ }
+
+ public javax.resource.cci.Connection getConnection(ConnectionSpec cSpec) throws ResourceException {
+
+ System.out.println("ConnectionFactoryImpl.getConnection(ConnectionSpec cSpec) called");
+
+ javax.resource.cci.Connection conn = null;
+
+ ConnectionRequestInfo connRequestInfo = new ConnectionRequestInfoImpl();
+
+ conn = (javax.resource.cci.Connection) connManager.allocateConnection(manConnFactory, connRequestInfo);
+
+ return conn;
+ }
+
+ public ResourceAdapterMetaData getMetaData() throws ResourceException {
+
+ return new ResourceAdapterMetaDataImpl();
+ }
+
+ public RecordFactory getRecordFactory() throws ResourceException {
+
+ return new RecordFactoryImpl();
+ }
+
+ public void setReference(Reference ref) {
+
+ this.ref = ref;
+ }
+
+ public Reference getReference() {
+
+ return ref;
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionImpl.java
new file mode 100644
index 0000000..5cd6b72
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionImpl.java
@@ -0,0 +1,54 @@
+package examples.integration.out_loan_ra;
+
+import java.util.*;
+
+import javax.resource.cci.*;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEvent;
+import javax.resource.spi.IllegalStateException;
+import javax.resource.spi.*;
+import javax.resource.NotSupportedException;
+
+public class ConnectionImpl implements javax.resource.cci.Connection {
+
+ private ManagedConnectionImpl manConn;
+
+ ConnectionImpl(ManagedConnectionImpl manConn) {
+
+ System.out.println("ConnectionImpl(ManagedConnectionImpl) called");
+
+ this.manConn = manConn;
+ }
+
+ public Interaction createInteraction() throws ResourceException {
+
+ return new InteractionImpl(this);
+ }
+
+ public javax.resource.cci.LocalTransaction getLocalTransaction() throws ResourceException {
+
+ throw new NotSupportedException("Local transactions are not supported.");
+ }
+
+ public ResultSetInfo getResultSetInfo() throws ResourceException {
+
+ throw new NotSupportedException("ResultSet records are not supported.");
+ }
+
+ public void close() throws ResourceException {
+
+ System.out.println("ConnectionImpl.close() called");
+
+ if (manConn == null)
+ return;
+
+ manConn.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this);
+
+ manConn = null;
+ }
+
+ public ConnectionMetaData getMetaData() throws ResourceException {
+
+ return new ConnectionMetaDataImpl(manConn);
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionMetaDataImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionMetaDataImpl.java
new file mode 100644
index 0000000..e51860b
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionMetaDataImpl.java
@@ -0,0 +1,31 @@
+package examples.integration.out_loan_ra;
+
+import javax.resource.ResourceException;
+import javax.resource.cci.*;
+import javax.resource.spi.*;
+
+public class ConnectionMetaDataImpl implements ConnectionMetaData {
+
+ private ManagedConnectionImpl manConn;
+
+ public ConnectionMetaDataImpl (ManagedConnectionImpl manConn) {
+
+ this.manConn = manConn;
+ }
+
+ public String getEISProductName() throws ResourceException {
+
+ return "Loan Application DLL";
+ }
+
+ public String getEISProductVersion() throws ResourceException {
+
+ return "1.0";
+ }
+
+ public String getUserName() throws ResourceException {
+
+ return null;
+ }
+}
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.java
new file mode 100644
index 0000000..cbfa9d8
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.java
@@ -0,0 +1,27 @@
+package examples.integration.out_loan_ra;
+
+import javax.resource.spi.ConnectionRequestInfo;
+
+public class ConnectionRequestInfoImpl implements ConnectionRequestInfo {
+
+ public ConnectionRequestInfoImpl() {
+ }
+
+ public boolean equals(Object object) {
+
+ if (object == null) return false;
+
+ if (object instanceof ConnectionRequestInfoImpl) {
+
+ return true;
+ } else {
+
+ return false;
+ }
+ }
+
+ public int hashCode() {
+
+ return (new String("ConnectionRequestInfoImpl")).hashCode();
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionSpecImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionSpecImpl.java
new file mode 100644
index 0000000..dd426f0
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionSpecImpl.java
@@ -0,0 +1,9 @@
+package examples.integration.out_loan_ra;
+
+import javax.resource.cci.*;
+
+public class ConnectionSpecImpl implements ConnectionSpec {
+
+ public ConnectionSpecImpl() {
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/InteractionImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/InteractionImpl.java
new file mode 100644
index 0000000..2f532f9
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/InteractionImpl.java
@@ -0,0 +1,96 @@
+package examples.integration.out_loan_ra;
+
+import examples.jni.JavaLoanApp;
+
+import java.util.*;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEvent;
+import javax.resource.spi.IllegalStateException;
+import javax.resource.cci.*;
+import java.lang.reflect.*;
+import java.lang.*;
+
+public class InteractionImpl implements Interaction {
+
+ Connection conn = null;
+
+ public InteractionImpl(Connection conn) {
+
+ System.out.println("InteractionImpl(Connection conn) called");
+
+ this.conn = conn;
+ }
+
+ public javax.resource.cci.Connection getConnection() {
+
+ return conn;
+ }
+
+ public void close() throws ResourceException {
+
+ conn = null;
+ }
+
+ public boolean execute (InteractionSpec iSpec, Record in, Record out) throws ResourceException {
+
+ System.out.println ("InteractionImpl.execute(InteractionSpec iSpec, Record in, Record out) called");
+
+ out = exec((MappedRecord)in,(MappedRecord)out);
+
+ if (out != null) {
+
+ return true;
+ } else {
+
+ return false;
+ }
+ }
+
+ public Record execute (InteractionSpec iSpec, Record in) throws ResourceException {
+
+ System.out.println ("InteractionImpl.execute(InteractionSpec iSpec, Record in) called");
+
+ MappedRecord out = new MappedRecordImpl();
+
+ return exec((MappedRecord)in, out);
+ }
+
+ Record exec(MappedRecord in, MappedRecord out) throws ResourceException {
+
+ try {
+
+ System.out.println("InteractionImpl.exec(MappedRecord in, MappedRecord out) called");
+
+ Set keys = in.keySet();
+ Iterator iterator = keys.iterator();
+
+ while (iterator.hasNext()) {
+
+ String key = (String)iterator.next();
+
+ if (key.equalsIgnoreCase("HomeEquityRate")) {
+
+ JavaLoanApp jlaObj = new JavaLoanApp("C:\\LoanApp.dll");
+ float equityRate = jlaObj.getHomeEquityLoanRate();
+ System.out.println ("JNI Call Returned: " + equityRate);
+ out.put(key, new Float(equityRate));
+ }
+ }
+
+ return out;
+ }
+ catch(Exception e) {
+
+ throw new ResourceException(e.getMessage());
+ }
+ }
+
+ public ResourceWarning getWarnings() throws ResourceException {
+
+ return null;
+ }
+
+ public void clearWarnings() throws ResourceException {
+
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/META-INF/ra.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/META-INF/ra.xml
new file mode 100644
index 0000000..7e08c79
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/META-INF/ra.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<connector
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ version="1.5"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ >
+ <display-name>OutboundLoanRa</display-name>
+ <vendor-name>Vendor Name</vendor-name>
+ <eis-type>EIS Type</eis-type>
+ <resourceadapter-version>1.5</resourceadapter-version>
+ <license>
+ <license-required>false</license-required>
+ </license>
+ <resourceadapter>
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>examples.integration.out_loan_ra.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
+ <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>examples.integration.out_loan_ra.ConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.resource.cci.Connection</connection-interface>
+ <connection-impl-class>examples.integration.out_loan_ra.ConnectionImpl</connection-impl-class>
+ </connection-definition>
+ <transaction-support>LocalTransaction</transaction-support>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+ </resourceadapter>
+</connector>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.java
new file mode 100644
index 0000000..3d3407e
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.java
@@ -0,0 +1,100 @@
+package examples.integration.out_loan_ra;
+
+import java.io.*;
+import java.util.*;
+
+import javax.resource.*;
+import javax.resource.spi.*;
+import javax.resource.spi.security.PasswordCredential;
+import javax.resource.spi.SecurityException;
+import javax.security.auth.Subject;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+public class ManagedConnectionFactoryImpl implements ManagedConnectionFactory, Serializable {
+
+ private PrintWriter manConnLogWriter;
+
+ public ManagedConnectionFactoryImpl() {
+
+ System.out.println("ManagedConnectionFactoryImpl() called");
+ }
+
+ public Object createConnectionFactory(ConnectionManager connManager) throws ResourceException {
+
+ System.out.println("ManagedConnectionFactoryImpl.createConnectionFactory(ConnectionManager) called");
+
+ return new ConnectionFactoryImpl(this, connManager);
+ }
+
+ public Object createConnectionFactory() throws ResourceException {
+ throw new ResourceException ("How can you call this method in a managed environment?");
+ }
+
+
+ public ManagedConnection createManagedConnection (Subject subject, ConnectionRequestInfo connRequestInfo) {
+
+ System.out.println ("ManagedConnectionFactoryImpl.createManagedConnection (Subject, ConnectionRequestInfo) called");
+
+ return new ManagedConnectionImpl (this);
+ }
+
+
+ public ManagedConnection matchManagedConnections(Set connSet, Subject subject, ConnectionRequestInfo connRequestInfo)
+ throws ResourceException {
+
+ System.out.println("ManagedConnectionFactoryImpl.matchManagedConnections(Set, Subject, ConnectionRequestInfo) called");
+
+ Iterator iterator = connSet.iterator();
+
+ while (iterator.hasNext()) {
+
+ Object object = iterator.next();
+
+ if (object instanceof ManagedConnectionImpl) {
+
+ ManagedConnectionImpl manConn = (ManagedConnectionImpl) object;
+ ManagedConnectionFactory manConnFactory = manConn.getManagedConnectionFactory();
+
+ if (manConnFactory.equals(this)) {
+
+ System.out.println("From ManagedConnectionFactoryImpl.matchManagedConnections() -> Connection matched");
+
+ return manConn;
+ }
+ }
+ }
+
+ System.out.println("From ManagedConnectionFactoryImpl.matchManagedConnections() -> Connection did not match");
+
+ return null;
+ }
+
+ public void setLogWriter(PrintWriter manConnLogWriter) {
+
+ this.manConnLogWriter = manConnLogWriter;
+ }
+
+ public PrintWriter getLogWriter() {
+
+ return manConnLogWriter;
+ }
+
+ public boolean equals(Object object) {
+
+ if (object == null) return false;
+
+ if (object instanceof ManagedConnectionFactoryImpl) {
+
+ return true;
+ } else {
+
+ return false;
+ }
+ }
+
+ public int hashCode() {
+
+ return (new String("ManagedConnectionFactoryImpl")).hashCode();
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionImpl.java
new file mode 100644
index 0000000..2087172
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionImpl.java
@@ -0,0 +1,135 @@
+package examples.integration.out_loan_ra;
+
+import java.io.*;
+import java.util.*;
+
+import javax.resource.*;
+import javax.resource.spi.*;
+import javax.resource.spi.security.PasswordCredential;
+import javax.resource.spi.IllegalStateException;
+import javax.resource.spi.SecurityException;
+import javax.resource.NotSupportedException;
+import javax.security.auth.Subject;
+import javax.transaction.xa.XAResource;
+
+public class ManagedConnectionImpl implements ManagedConnection {
+
+ private ConnectionEventListener connEventListener;
+ private ManagedConnectionFactory manConnFactory;
+ private boolean isDestroyed;
+ private PrintWriter manConnLogWriter;
+
+ ManagedConnectionImpl (ManagedConnectionFactory manConnFactory) {
+
+ System.out.println("ManagedConnectionImpl(ManagedConnectionFactory) called");
+
+ this.manConnFactory = manConnFactory;
+ }
+
+ public Object getConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo)
+ throws ResourceException {
+
+ System.out.println("ManagedConnectionImpl.getConnection(Subject, ConnectionRequestInfo) called");
+
+ ConnectionImpl conn = new ConnectionImpl(this);
+
+ return conn;
+ }
+
+ public void destroy() throws ResourceException {
+
+ System.out.println("ManagedConnectionImpl.destroy() called");
+
+ isDestroyed=true;
+
+ cleanup();
+ }
+
+ public void cleanup() throws ResourceException {
+
+ System.out.println("ManagedConnectionImpl.cleanup() called");
+ }
+
+ public void associateConnection(Object connection) throws ResourceException {
+
+ throw new NotSupportedException("ManagedConnectionImpl.associateConnection() not supported.");
+ }
+
+ public void addConnectionEventListener(ConnectionEventListener connEventListener) {
+
+ System.out.println("ManagedConnectionImpl.addConnectionEventListener(ConnectionEventListener) called");
+
+ this.connEventListener = connEventListener;
+ }
+
+ public void removeConnectionEventListener (ConnectionEventListener connEventListener) {
+
+ }
+
+ public XAResource getXAResource() throws ResourceException {
+
+ throw new NotSupportedException("Global transactions are not supported");
+ }
+
+ public LocalTransaction getLocalTransaction() throws ResourceException {
+
+ throw new NotSupportedException("Local transactions are not supported");
+ }
+
+ public ManagedConnectionMetaData getMetaData() throws ResourceException {
+
+ if (isDestroyed)
+ throw new ResourceException ("Managed connection has already been closed.");
+
+ return new ManagedConnectionMetaDataImpl (this);
+ }
+
+ public void setLogWriter(PrintWriter manConnLogWriter) {
+
+ this.manConnLogWriter = manConnLogWriter;
+ }
+
+ public PrintWriter getLogWriter() {
+
+ return manConnLogWriter;
+ }
+
+ void sendEvent(int eventType, Exception e, Object connHandle) {
+
+ System.out.println("ManagedConnectionImpl.sendEvent(int, e, connHandle) called");
+
+ ConnectionEvent connEvent = null;
+
+ if (e == null)
+ connEvent = new ConnectionEvent(this, eventType);
+ else
+ connEvent = new ConnectionEvent(this, eventType, e);
+
+ connEvent.setConnectionHandle(connHandle);
+
+ switch (connEvent.getId()) {
+ case ConnectionEvent.CONNECTION_CLOSED:
+ this.connEventListener.connectionClosed(connEvent);
+ break;
+ case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
+ this.connEventListener.localTransactionStarted(connEvent);
+ break;
+ case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
+ this.connEventListener.localTransactionCommitted(connEvent);
+ break;
+ case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
+ this.connEventListener.localTransactionRolledback(connEvent);
+ break;
+ case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
+ this.connEventListener.connectionErrorOccurred(connEvent);
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported event: " + connEvent.getId());
+ }
+ }
+
+ ManagedConnectionFactory getManagedConnectionFactory() {
+
+ return manConnFactory;
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.java
new file mode 100644
index 0000000..cc47162
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.java
@@ -0,0 +1,35 @@
+package examples.integration.out_loan_ra;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.IllegalStateException;
+import javax.resource.spi.*;
+
+public class ManagedConnectionMetaDataImpl implements ManagedConnectionMetaData {
+
+ private ManagedConnectionImpl manConn;
+
+ public ManagedConnectionMetaDataImpl(ManagedConnectionImpl manConn) {
+
+ this.manConn = manConn;
+ }
+
+ public String getEISProductName() throws ResourceException {
+
+ return "Loan Application DLL";
+ }
+
+ public String getEISProductVersion() throws ResourceException {
+
+ return "1.0";
+ }
+
+ public int getMaxConnections() throws ResourceException {
+
+ return 1;
+ }
+
+ public String getUserName() throws ResourceException {
+
+ return null;
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/MappedRecordImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/MappedRecordImpl.java
new file mode 100644
index 0000000..7ade217
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/MappedRecordImpl.java
@@ -0,0 +1,121 @@
+package examples.integration.out_loan_ra;
+
+import java.util.*;
+
+public class MappedRecordImpl implements javax.resource.cci.MappedRecord {
+
+ private String recordName;
+ private String recordDescription;
+ private HashMap mappedRecord;
+
+ public MappedRecordImpl() {
+
+ mappedRecord = new HashMap();
+ }
+
+ public MappedRecordImpl (String recordName) {
+
+ mappedRecord = new HashMap();
+ this.recordName = recordName;
+ }
+
+ public String getRecordName() {
+
+ return this.recordName;
+ }
+
+ public void setRecordName(String recordName) {
+
+ this.recordName = recordName;
+ }
+
+ public String getRecordShortDescription() {
+
+ return recordDescription;
+ }
+
+ public void setRecordShortDescription(String recordDescription) {
+
+ this.recordDescription = recordDescription;
+ }
+
+ public boolean equals(Object object) {
+
+ if(!(object instanceof MappedRecordImpl))
+ return false;
+
+ MappedRecordImpl mappedRecordObject = (MappedRecordImpl)object;
+
+ return (recordName == mappedRecordObject.recordName) && mappedRecord.equals(mappedRecordObject.mappedRecord);
+ }
+
+ public int hashCode() {
+
+ return (new String("MappedRecordImpl")).hashCode();
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+
+ return this.clone();
+ }
+
+ public void clear() {
+
+ mappedRecord.clear();
+ }
+
+ public boolean containsKey(Object key) {
+
+ return mappedRecord.containsKey(key);
+ }
+
+ public boolean containsValue(Object value) {
+
+ return mappedRecord.containsValue(value);
+ }
+
+ public Set entrySet() {
+
+ return mappedRecord.entrySet();
+ }
+
+ public Object get(Object object) {
+
+ return mappedRecord.get(object);
+ }
+
+ public boolean isEmpty(){
+
+ return mappedRecord.isEmpty();
+ }
+
+ public Set keySet(){
+
+ return mappedRecord.keySet();
+ }
+
+ public Object put(Object key, Object value) {
+
+ return mappedRecord.put(key, value);
+ }
+
+ public void putAll(Map map) {
+
+ mappedRecord.putAll (map);
+ }
+
+ public Object remove(Object object) {
+
+ return mappedRecord.remove(object);
+ }
+
+ public int size() {
+
+ return mappedRecord.size();
+ }
+
+ public Collection values() {
+
+ return mappedRecord.values();
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/RecordFactoryImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/RecordFactoryImpl.java
new file mode 100644
index 0000000..d3f051a
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/RecordFactoryImpl.java
@@ -0,0 +1,20 @@
+package examples.integration.out_loan_ra;
+
+import javax.resource.cci.*;
+import java.util.Map;
+import java.util.Collection;
+import javax.resource.ResourceException;
+import javax.resource.NotSupportedException;
+
+public class RecordFactoryImpl implements javax.resource.cci.RecordFactory{
+
+ public MappedRecord createMappedRecord(String recordName) throws ResourceException {
+
+ return new MappedRecordImpl(recordName);
+ }
+
+ public IndexedRecord createIndexedRecord(String recordName) throws ResourceException {
+
+ throw new NotSupportedException("IndexedRecords are not supported.");
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.java
new file mode 100644
index 0000000..44c153f
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.java
@@ -0,0 +1,124 @@
+package examples.integration.out_loan_ra;
+
+import java.io.*;
+
+import javax.resource.Referenceable;
+import javax.resource.*;
+import javax.resource.spi.*;
+import javax.naming.Reference;
+import javax.resource.cci.*;
+
+public class ResourceAdapterMetaDataImpl implements ResourceAdapterMetaData {
+
+ private String adapterName;
+ private String adapterShortDescription;
+ private String adapterVendorName;
+ private String adapterVersion;
+ private String[] interactionSpecsSupported;
+ private String specVersion;
+ private boolean supportsExecuteWithInputAndOutputRecord;
+ private boolean supportsExecuteWithInputRecordOnly;
+ private boolean supportsLocalTransactionDemarcation;
+
+ // Additional properties
+ private boolean supportsGlobalTransactions;
+ private boolean supportsLifecycleManagement;
+ private boolean supportsMessageInflow;
+ private boolean supportsTransactionInflow;
+ private boolean supportsConnectionManagement;
+ private boolean supportsSecurityManagement;
+
+ public ResourceAdapterMetaDataImpl() {
+
+ adapterName = "Loan Application Resource Adapter";
+ adapterShortDescription = "Loan Application Resource Adapter provides connectivity to Loan Application DLL";
+ adapterVendorName = "Connectors Inc.";
+ adapterVersion = "1.0";
+ interactionSpecsSupported[0] = "InteractionImpl";
+ specVersion = "1.5";
+ supportsExecuteWithInputAndOutputRecord = true;
+ supportsExecuteWithInputRecordOnly = true;
+ supportsLocalTransactionDemarcation = false;
+ supportsGlobalTransactions = false;
+ supportsLifecycleManagement = false;
+ supportsMessageInflow = false;
+ supportsTransactionInflow = false;
+ supportsConnectionManagement = true;
+ supportsSecurityManagement = false;
+ }
+
+ public String getAdapterName() {
+
+ return adapterName;
+ }
+
+ public String getAdapterShortDescription() {
+
+ return adapterShortDescription;
+ }
+
+ public String getAdapterVendorName() {
+
+ return adapterVendorName;
+ }
+
+ public String getAdapterVersion() {
+
+ return adapterVersion;
+ }
+
+ public String[] getInteractionSpecsSupported() {
+
+ return interactionSpecsSupported;
+ }
+
+ public String getSpecVersion() {
+
+ return specVersion;
+ }
+
+ public boolean supportsExecuteWithInputAndOutputRecord() {
+
+ return supportsExecuteWithInputAndOutputRecord;
+ }
+
+ public boolean supportsExecuteWithInputRecordOnly() {
+
+ return supportsExecuteWithInputRecordOnly;
+ }
+
+ public boolean supportsLocalTransactionDemarcation() {
+
+ return supportsLocalTransactionDemarcation;
+ }
+
+ public boolean supportsGlobalTransactions() {
+
+ return supportsGlobalTransactions;
+ }
+
+ public boolean supportsLifecycleManagement() {
+
+ return supportsLifecycleManagement;
+ }
+
+ public boolean supportsMessageInflow() {
+
+ return supportsMessageInflow;
+ }
+
+ public boolean supportsTransactionInflow() {
+
+ return supportsTransactionInflow;
+ }
+
+ public boolean supportsConnectionManagement() {
+
+ return supportsConnectionManagement;
+ }
+
+ public boolean supportsSecurityManagement() {
+
+ return supportsSecurityManagement;
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/JavaLoanApp.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/JavaLoanApp.java
new file mode 100644
index 0000000..4a23e0d
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/JavaLoanApp.java
@@ -0,0 +1,20 @@
+package examples.jni;
+
+public class JavaLoanApp
+{
+
+ public JavaLoanApp(String libPath) {
+
+ System.load(libPath);
+ }
+
+ /* Use this function to unit test whether the library is being loaded properly */
+ /*
+ public static void main(String args[])
+ {
+ JavaLoanApp jla = new JavaLoanApp("c:\\LoanApp.dll");
+ System.out.println ("Here is the output from the JNI call: " + jla.getHomeEquityLoanRate());
+ }*/
+
+ public native float getHomeEquityLoanRate();
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/BuildLog.htm b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/BuildLog.htm
new file mode 100644
index 0000000..86c5e67
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/BuildLog.htm
@@ -0,0 +1,52 @@
+<html>
+<head>
+<META HTTP-EQUIV="Content-Type" content="text/html; charset=Windows-1252">
+</head>
+<body>
+<pre>
+<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>
+Build Log
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+<h3>------- Build started: Project: LoanApp, Configuration: Debug|Win32 -------
+</h3>
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Command Lines
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000001.rsp" with contents
+[
+/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zc:wchar_t /Yu"stdafx.h" /Fp"Debug/LoanApp.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP /I "C:\Sun\J2SDKEE1.4\jdk\include"
+/I "C:\Sun\J2SDKEE1.4\jdk\include\win32"
+.\LoanApp.cpp
+]
+Creating command line "cl.exe @c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000001.rsp /nologo"
+Creating temporary file "c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000002.rsp" with contents
+[
+/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zc:wchar_t /Yc"stdafx.h" /Fp"Debug/LoanApp.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP /I "C:\Sun\J2SDKEE1.4\jdk\include"
+/I "C:\Sun\J2SDKEE1.4\jdk\include\win32"
+.\stdafx.cpp
+]
+Creating command line "cl.exe @c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000002.rsp /nologo"
+Creating command line "rc.exe /d "_DEBUG" /d "_AFXDLL" /l 0x409 /I "Debug" /fo"Debug/LoanApp.res" .\LoanApp.rc"
+Creating temporary file "c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000003.rsp" with contents
+[
+/OUT:"Debug/LoanApp.dll" /INCREMENTAL /NOLOGO /DLL /DEF:".\LoanApp.def" /DEBUG /PDB:"Debug/LoanApp.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Debug/LoanApp.lib" /MACHINE:X86
+.\Debug\LoanApp.obj
+.\Debug\stdafx.obj
+.\Debug\LoanApp.res
+]
+Creating command line "link.exe @c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\RSP000003.rsp"
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Output Window
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...
+stdafx.cpp
+Compiling...
+LoanApp.cpp
+c:\temp\3eCode\Integration\src\examples\jni\LoanApp\LoanApp.h(33) : warning C4305: 'return' : truncation from 'double' to 'jfloat'
+Compiling resources...
+Linking...
+ Creating library Debug/LoanApp.lib and object Debug/LoanApp.exp
+</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
+Results
+</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
+Build log was saved at "file://c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\BuildLog.htm"
+LoanApp - 0 error(s), 1 warning(s)</pre></table><table width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>
+</font></table></body></html> \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dll b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dll
new file mode 100644
index 0000000..a288419
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dll
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.exp b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.exp
new file mode 100644
index 0000000..d4ffd8d
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.exp
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilk b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilk
new file mode 100644
index 0000000..a87dd3b
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilk
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.lib b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.lib
new file mode 100644
index 0000000..774cb22
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.lib
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.obj b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.obj
new file mode 100644
index 0000000..b6f3a3f
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.obj
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pch b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pch
new file mode 100644
index 0000000..8da2235
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pch
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdb b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdb
new file mode 100644
index 0000000..715d9d6
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdb
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.res b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.res
new file mode 100644
index 0000000..cefd6e4
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.res
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.obj b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.obj
new file mode 100644
index 0000000..2c8bca3
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.obj
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idb b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idb
new file mode 100644
index 0000000..afd4952
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idb
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdb b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdb
new file mode 100644
index 0000000..e390469
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdb
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.cpp b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.cpp
new file mode 100644
index 0000000..fc447b2
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.cpp
@@ -0,0 +1,65 @@
+// LoanApp.cpp : Defines the initialization routines for the DLL.
+//
+
+#include "stdafx.h"
+#include "LoanApp.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+//
+// Note!
+//
+// If this DLL is dynamically linked against the MFC
+// DLLs, any functions exported from this DLL which
+// call into MFC must have the AFX_MANAGE_STATE macro
+// added at the very beginning of the function.
+//
+// For example:
+//
+// extern "C" BOOL PASCAL EXPORT ExportedFunction()
+// {
+// AFX_MANAGE_STATE(AfxGetStaticModuleState());
+// // normal function body here
+// }
+//
+// It is very important that this macro appear in each
+// function, prior to any calls into MFC. This means that
+// it must appear as the first statement within the
+// function, even before any object variable declarations
+// as their constructors may generate calls into the MFC
+// DLL.
+//
+// Please see MFC Technical Notes 33 and 58 for additional
+// details.
+//
+
+// CLoanAppApp
+
+BEGIN_MESSAGE_MAP(CLoanAppApp, CWinApp)
+END_MESSAGE_MAP()
+
+
+// CLoanAppApp construction
+
+CLoanAppApp::CLoanAppApp()
+{
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+
+// The one and only CLoanAppApp object
+
+CLoanAppApp theApp;
+
+
+// CLoanAppApp initialization
+
+BOOL CLoanAppApp::InitInstance()
+{
+ CWinApp::InitInstance();
+
+ return TRUE;
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.def b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.def
new file mode 100644
index 0000000..382f22e
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.def
@@ -0,0 +1,6 @@
+; LoanApp.def : Declares the module parameters for the DLL.
+
+LIBRARY "LoanApp"
+
+EXPORTS
+ ; Explicit exports can go here
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.h b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.h
new file mode 100644
index 0000000..db9c166
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.h
@@ -0,0 +1,34 @@
+// LoanApp.h : main header file for the LoanApp DLL
+//
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h" // main symbols
+
+
+// CLoanAppApp
+// See LoanApp.cpp for the implementation of this class
+//
+
+#include "examples_jni_JavaLoanApp.h"
+
+class CLoanAppApp : public CWinApp
+{
+public:
+ CLoanAppApp();
+
+// Overrides
+public:
+ virtual BOOL InitInstance();
+
+ DECLARE_MESSAGE_MAP()
+};
+
+JNIEXPORT jfloat JNICALL Java_examples_jni_JavaLoanApp_getHomeEquityLoanRate(JNIEnv *, jobject)
+{
+ return 5.64;
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncb b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncb
new file mode 100644
index 0000000..f3c2323
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncb
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.rc b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.rc
new file mode 100644
index 0000000..c6f0a3b
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.rc
@@ -0,0 +1,115 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#include ""res\\LoanApp.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // APSTUDIO_INVOKED
+
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "TODO: <Company name>"
+ VALUE "FileDescription", "TODO: <File description>"
+ VALUE "FileVersion", "1.0.0.1"
+ VALUE "InternalName", "LoanApp.dll"
+ VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved."
+ VALUE "OriginalFilename","LoanApp.dll"
+ VALUE "ProductName", "TODO: <Product name>"
+ VALUE "ProductVersion", "1.0.0.1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
+
+#endif
+#ifndef APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#include "res\\LoanApp.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.sln b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.sln
new file mode 100644
index 0000000..19e9621
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LoanApp", "LoanApp.vcproj", "{7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}.Debug.ActiveCfg = Debug|Win32
+ {7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}.Debug.Build.0 = Debug|Win32
+ {7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}.Release.ActiveCfg = Release|Win32
+ {7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suo b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suo
new file mode 100644
index 0000000..c036b6e
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suo
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.vcproj b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.vcproj
new file mode 100644
index 0000000..b9de1bd
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.vcproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="LoanApp"
+ ProjectGUID="{7D0EA7E6-4A2E-4BA9-ACAC-1DFD08836FCA}"
+ Keyword="MFCDLLProj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/I &quot;C:\Sun\J2SDKEE1.4\jdk\include&quot;
+/I &quot;C:\Sun\J2SDKEE1.4\jdk\include\win32&quot;"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="TRUE"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/LoanApp.dll"
+ LinkIncremental="2"
+ ModuleDefinitionFile=".\LoanApp.def"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/LoanApp.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="FALSE"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/LoanApp.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile=".\LoanApp.def"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/LoanApp.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="FALSE"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\LoanApp.cpp">
+ </File>
+ <File
+ RelativePath=".\LoanApp.def">
+ </File>
+ <File
+ RelativePath=".\stdafx.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\LoanApp.h">
+ </File>
+ <File
+ RelativePath=".\Resource.h">
+ </File>
+ <File
+ RelativePath=".\stdafx.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\LoanApp.rc">
+ </File>
+ <File
+ RelativePath=".\res\LoanApp.rc2">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/ReadMe.txt b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/ReadMe.txt
new file mode 100644
index 0000000..54d2076
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/ReadMe.txt
@@ -0,0 +1,59 @@
+========================================================================
+ MICROSOFT FOUNDATION CLASS LIBRARY : LoanApp Project Overview
+========================================================================
+
+
+AppWizard has created this LoanApp DLL for you. This DLL not only
+demonstrates the basics of using the Microsoft Foundation classes but
+is also a starting point for writing your DLL.
+
+This file contains a summary of what you will find in each of the files that
+make up your LoanApp DLL.
+
+LoanApp.vcproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+LoanApp.h
+ This is the main header file for the DLL. It declares the
+ CLoanAppApp class.
+
+LoanApp.cpp
+ This is the main DLL source file. It contains the class CLoanAppApp.
+LoanApp.rc
+ This is a listing of all of the Microsoft Windows resources that the
+ program uses. It includes the icons, bitmaps, and cursors that are stored
+ in the RES subdirectory. This file can be directly edited in Microsoft
+ Visual C++.
+
+res\LoanApp.rc2
+ This file contains resources that are not edited by Microsoft
+ Visual C++. You should place all resources not editable by
+ the resource editor in this file.
+
+LoanApp.def
+ This file contains information about the DLL that must be
+ provided to run with Microsoft Windows. It defines parameters
+ such as the name and description of the DLL. It also exports
+ functions from the DLL.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named LoanApp.pch and a precompiled types file named StdAfx.obj.
+
+Resource.h
+ This is the standard header file, which defines new resource IDs.
+ Microsoft Visual C++ reads and updates this file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Resource.h b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Resource.h
new file mode 100644
index 0000000..4f1e958
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by LoanApp.RC
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+
+#define _APS_NEXT_RESOURCE_VALUE 1000
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 1000
+#define _APS_NEXT_COMMAND_VALUE 32771
+#endif
+#endif
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/examples_jni_JavaLoanApp.h b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/examples_jni_JavaLoanApp.h
new file mode 100644
index 0000000..5fa7ae1
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/examples_jni_JavaLoanApp.h
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class examples_jni_JavaLoanApp */
+
+#ifndef _Included_examples_jni_JavaLoanApp
+#define _Included_examples_jni_JavaLoanApp
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: examples_jni_JavaLoanApp
+ * Method: getHomeEquityLoanRate
+ * Signature: ()F
+ */
+JNIEXPORT jfloat JNICALL Java_examples_jni_JavaLoanApp_getHomeEquityLoanRate
+ (JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/res/LoanApp.rc2 b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/res/LoanApp.rc2
new file mode 100644
index 0000000..dba29d8
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/res/LoanApp.rc2
@@ -0,0 +1,13 @@
+//
+// LoanApp.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.cpp b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.cpp
new file mode 100644
index 0000000..637e68b
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.cpp
@@ -0,0 +1,7 @@
+// stdafx.cpp : source file that includes just the standard includes
+// LoanApp.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.h b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.h
new file mode 100644
index 0000000..38a65bb
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.h
@@ -0,0 +1,52 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#endif
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> // MFC OLE classes
+#include <afxodlgs.h> // MFC OLE dialog classes
+#include <afxdisp.h> // MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> // MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> // MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dll b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dll
new file mode 100644
index 0000000..a288419
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dll
Binary files differ
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Hello.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Hello.java
new file mode 100644
index 0000000..fa4648b
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Hello.java
@@ -0,0 +1,13 @@
+package examples.session.stateless;
+
+/**
+ * This is the Hello business interface.
+ */
+
+public interface Hello {
+
+ /**
+ * @return a greeting to the client.
+ */
+ public String hello();
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloBean.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloBean.java
new file mode 100644
index 0000000..10e6baf
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloBean.java
@@ -0,0 +1,16 @@
+package examples.session.stateless;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * Demonstration stateless session bean.
+ */
+@Stateless
+@Remote(Hello.class)
+public class HelloBean implements Hello {
+ public String hello() {
+ System.out.println("hello()");
+ return "Hello, World!";
+ }
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java
new file mode 100644
index 0000000..9becd53
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java
@@ -0,0 +1,59 @@
+package examples.session.stateless;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.Hashtable;
+
+// The following import should be removed.
+
+import examples.session.stateless.*;
+import javax.naming.*;
+
+/**
+ * This class is an example of client code which invokes
+ * methods on a simple, remote stateless session bean.
+ */
+public class HelloClient {
+
+ public static void main(String[] args) throws Exception {
+ /*
+ * Obtain the JNDI initial context.
+ *
+ * The initial context is a starting point for
+ * connecting to a JNDI tree. We choose our JNDI
+ * driver, the network location of the server, etc
+ * by passing in the environment properties.
+ */
+
+ System.out.println("about to create initialcontext");
+
+ Hashtable env = new Hashtable();
+ env.put("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
+ env.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
+ env.put("java.naming.provider.url","localhost:3700");
+ Context ctx = new InitialContext();
+
+ //System.out.println ("Trying to get the name of this context: " + ctx.getNameInNamespace());
+
+ System.out.println("Got initial context ... yeah ");
+
+ /*
+ * Get a reference to a bean instance, looked up by class name
+ */
+ NamingEnumeration ne = ctx.list("");
+ System.out.println("Got list... ");
+ while(ne.hasMore())
+ {
+ NameClassPair nc = (NameClassPair)ne.next();
+ System.out.println("Entry is ... "+nc.getName()+" -- "+nc.getClassName());
+ }
+
+ Hello hello = (Hello) ctx.lookup("examples.session.stateless.Hello");
+
+ /*
+ * Call the hello() method on the bean.
+ * We then print the result to the screen.
+ */
+ System.out.println(hello.hello());
+ }
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java.original b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java.original
new file mode 100644
index 0000000..f90a759
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java.original
@@ -0,0 +1,41 @@
+package examples.session.stateless;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+/**
+ * This class is an example of client code which invokes
+ * methods on a simple, remote stateless session bean.
+ */
+public class HelloClient {
+
+ public static void main(String[] args) throws Exception {
+ /*
+ * Obtain the JNDI initial context.
+ *
+ * The initial context is a starting point for
+ * connecting to a JNDI tree. We choose our JNDI
+ * driver, the network location of the server, etc
+ * by passing in the environment properties.
+ */
+
+ System.out.println("about to create initialcontext");
+ //Context ctx = new InitialContext(System.getProperties());
+ Context ctx = new InitialContext();
+
+ //System.out.println ("Trying to get the name of this context: " + ctx.getNameInNamespace());
+
+ System.out.println("Got initial context ... yeah ");
+
+ /*
+ * Get a reference to a bean instance, looked up by class name
+ */
+ Hello hello = (Hello) ctx.lookup("HelloBean");
+
+ /*
+ * Call the hello() method on the bean.
+ * We then print the result to the screen.
+ */
+ System.out.println(hello.hello());
+ }
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/META-INF/ejb-jar.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/META-INF/ejb-jar.xml
new file mode 100644
index 0000000..9503e74
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/META-INF/ejb-jar.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+ <ejb-jar>
+ <enterprise-beans>
+ </enterprise-beans>
+</ejb-jar> \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Readme.txt b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Readme.txt
new file mode 100644
index 0000000..a35bbb5
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Readme.txt
@@ -0,0 +1,13 @@
+1) asant jar
+
+2) asant deploy_common
+
+3) asant base_clientjar_common
+
+4) Turn off the firewall right before running the client (for Glassfish)
+
+asant run_client
+
+5) asant undeploy_common
+
+6) asant clean_all \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/build.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/build.xml
new file mode 100644
index 0000000..7fbd159
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/build.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [ <!ENTITY include SYSTEM "../../../../etc/common.xml"> ]>
+
+<project name="ejb3-examples-session-stateless" default="jar"
+ basedir="../../../..">
+
+ <!-- basic settings -->
+ <property name="src.dir" value="${basedir}/src"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="build.classes.dir" value="${build.dir}/classes"/>
+ <property name="appname" value="StatelessSession"/>
+ <property name="client.class" value="examples.session.stateless.HelloClient"/>
+ <property name="app.pkg" value="examples/session/stateless"/>
+ <property name="package" value="${app.pkg}"/>
+ <property name="pack.dir" value="${src.dir}/${app.pkg}"/>
+ <property name="jar.pkg" value="examples/session/stateless"/>
+
+
+ <!-- Include common.xml -->
+ &include;
+
+ <property name="assemble.dir" value="${assemble.ejbjar}"/>
+ <property name="deploy.file" value="${ejbjar}"/>
+
+ <target name="jar" depends="compile_common, create_ejbjar_common"/>
+ <target name="ear" depends="jar,create_ear_common"/>
+
+ <target name="clean_all" depends="clean_common, clean_ejbjar_common, clean_clientjar_common"/>
+</project>
+
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrders.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrders.java
new file mode 100644
index 0000000..55df678
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrders.java
@@ -0,0 +1,13 @@
+package examples.timer;
+
+import javax.ejb.Remote;
+import javax.ejb.Timer;
+
+
+/**
+ * This is the business interface for CleanDayLimitOrders enterprise bean.
+ */
+@Remote
+public interface CleanDayLimitOrders {
+ public void cleanPeriodicallyDayLimitOrders();
+}
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersBean.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersBean.java
new file mode 100644
index 0000000..1f90550
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersBean.java
@@ -0,0 +1,67 @@
+package examples.timer;
+
+import javax.ejb.*;
+import javax.annotation.Resource;
+
+import java.util.Calendar;
+import java.util.TimeZone;
+import java.util.SimpleTimeZone;
+import java.util.GregorianCalendar;
+import java.util.Date;
+
+@Stateless
+public class CleanDayLimitOrdersBean implements CleanDayLimitOrders {
+
+ @Resource private SessionContext ctx;
+
+ public void cleanPeriodicallyDayLimitOrders()
+ {
+ // Get hold of the eastern time zone assuming that the securities are being
+ // traded on NYSE and NASDAQ exchanges.
+ String[] timezoneIDs = TimeZone.getAvailableIDs (-5 * 60 * 60 * 1000);
+
+ SimpleTimeZone est = new SimpleTimeZone (-5 * 60 * 60 * 1000, timezoneIDs[0]);
+
+ // Provide the rules for start and end days of daylight savings time.
+ est.setStartRule (Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
+ est.setEndRule (Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
+
+ // Get hold of a calendar instance for the eastern time zone.
+ Calendar cal = new GregorianCalendar(est);
+
+ // Set the calendar to the current time.
+ cal.setTime (new Date ());
+
+ // Calculate the difference between now and market close i.e. 4 PM Eastern.
+ int hourofday = cal.get (cal.HOUR_OF_DAY);
+ int minuteofhour = cal.get (cal.MINUTE);
+
+ // If this method is invoked after the market close, then set the timer expiration
+ // immediately i.e. start=0. Otherwise, calculate the milliseconds that needs
+ // to elapse until first timer expiration.
+ long start = 0;
+ if (hourofday < 16)
+ {
+ int hourdiff = 16 - hourofday - 1;
+ int mindiff = 60 - minuteofhour;
+
+ start = (hourdiff * 60 * 60 * 1000) + (mindiff * 60 * 1000);
+ }
+
+ // Finally, get hold of the timer service instance from EJBContext object and create the
+ // recurrent expiration timer.
+ TimerService timerService = ctx.getTimerService();
+ Timer timer = timerService.createTimer(start, 86400000, null);
+
+ System.out.println("CleanDayLimitOrdersBean: Timer created to first expire after " + start + " milliseconds.");
+ }
+
+ @Timeout
+ public void handleTimeout(Timer timer)
+ {
+ System.out.println("CleanDayLimitOrdersBean: handleTimeout called.");
+
+ // Put here the code for cleaning the database of day limit orders that have
+ // not been executed.
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersClient.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersClient.java
new file mode 100644
index 0000000..749de86
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersClient.java
@@ -0,0 +1,19 @@
+package examples.timer;
+
+import javax.ejb.EJB;
+
+public class CleanDayLimitOrdersClient {
+ @EJB
+ private static CleanDayLimitOrders cleanDayLimitOrders;
+
+ public static void main(String[] args) {
+ try {
+ cleanDayLimitOrders.cleanPeriodicallyDayLimitOrders();
+
+ System.out.println ("cleanPeriodicallyDayLimitOrders() returned successfully. Take a look at the application server log or console for messages from bean.");
+ } catch (Exception ex) {
+ System.err.println("Caught an unexpected exception!");
+ ex.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application-client.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application-client.xml
new file mode 100644
index 0000000..7e232d8
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application-client.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client xmlns='http://java.sun.com/xml/ns/javaee'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
+ version="5">
+ <display-name>CleanDayLimitOrdersClient</display-name>
+</application-client>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application.xml
new file mode 100644
index 0000000..8fc0433
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
+ <display-name>CleanDayLimitOrdersApp</display-name>
+ <module>
+ <ejb>CleanDayLimitOrdersEjb.jar</ejb>
+ </module>
+ <module>
+ <java>CleanDayLimitOrdersClient.jar</java>
+ </module>
+</application>
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/ejb-jar.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/ejb-jar.xml
new file mode 100644
index 0000000..a358d5a
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/ejb-jar.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" full="false" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+ <enterprise-beans>
+ <session>
+ <display-name>CleanDayLimitOrdersBean</display-name>
+ <ejb-name>CleanDayLimitOrdersBean</ejb-name>
+ <business-remote>examples.timer.CleanDayLimitOrders</business-remote>
+ <ejb-class>examples.timer.CleanDayLimitOrdersBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <timeout-method>
+ <method-name>handleTimeout</method-name>
+ <method-params>
+ <method-param>javax.ejb.Timer</method-param>
+ </method-params>
+ </timeout-method>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+</ejb-jar> \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/Readme.txt b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/Readme.txt
new file mode 100644
index 0000000..6e5d1aa
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/Readme.txt
@@ -0,0 +1,15 @@
+1) asant jar
+
+2) asant app_clientjar_common
+
+3) asant create_ear_common_with_clientjar
+
+4) asant deploy_common
+
+5) Turn off the firewall right before running the client (for Glassfish)
+
+6) asant run_client_in_appcontainer
+
+5) asant undeploy_common
+
+6) asant clean_all \ No newline at end of file
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/build.xml b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/build.xml
new file mode 100644
index 0000000..7030d4a
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/build.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [ <!ENTITY include SYSTEM "../../../etc/common.xml"> ]>
+
+<project name="ejb3-examples-session-stateless" default="jar"
+ basedir="../../..">
+
+ <!-- basic settings -->
+ <property name="src.dir" value="${basedir}/src"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="build.classes.dir" value="${build.dir}/classes"/>
+ <property name="appname" value="CleanDayLimitOrders"/>
+ <property name="client.class" value="examples.timer.CleanDayLimitOrdersClient"/>
+ <property name="app.pkg" value="examples/timer"/>
+ <property name="package" value="${app.pkg}"/>
+ <property name="pack.dir" value="${src.dir}/${app.pkg}"/>
+ <property name="jar.pkg" value="examples/timer"/>
+
+
+ <!-- Include common.xml -->
+ &include;
+
+ <property name="assemble.dir" value="${assemble.ear}"/>
+ <property name="deploy.file" value="${ear}"/>
+
+ <target name="jar" depends="compile_common, create_ejbjar_common"/>
+ <target name="ear" depends="jar,create_ear_common"/>
+
+ <target name="clean_all" depends="clean_common, clean_ejbjar_common, clean_clientjar_common"/>
+</project> \ No newline at end of file