From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../EJB 3.0 Code/Rima Examples/.classpath | 9 + .../EJB 3.0 Code/Rima Examples/.project | 17 + .../assemble/client/LoanApplicationClient.jar | Bin 0 -> 1751 bytes .../assemble/ear/CleanDayLimitOrders.ear | Bin 0 -> 4935 bytes .../assemble/ejbjar/LoanApplicationEjb.jar | Bin 0 -> 2804 bytes .../Rima Examples/assemble/jar/EntityIntro.jar | Bin 0 -> 4073 bytes .../Rima Examples/assemble/jnijar/JavaLoanApp.jar | Bin 0 -> 870 bytes .../Rima Examples/assemble/rar/OutboundLoanRa.rar | Bin 0 -> 12671 bytes .../integration/loanratesejb/LoanRates.class | Bin 0 -> 129 bytes .../integration/loanratesejb/LoanRatesBean.class | Bin 0 -> 1814 bytes .../integration/loanratesejb/LoanRatesClient.class | Bin 0 -> 1044 bytes .../out_loan_ra/ConnectionFactoryImpl.class | Bin 0 -> 2042 bytes .../integration/out_loan_ra/ConnectionImpl.class | Bin 0 -> 1563 bytes .../out_loan_ra/ConnectionMetaDataImpl.class | Bin 0 -> 651 bytes .../out_loan_ra/ConnectionRequestInfoImpl.class | Bin 0 -> 450 bytes .../out_loan_ra/ConnectionSpecImpl.class | Bin 0 -> 207 bytes .../integration/out_loan_ra/InteractionImpl.class | Bin 0 -> 2526 bytes .../out_loan_ra/ManagedConnectionFactoryImpl.class | Bin 0 -> 2618 bytes .../out_loan_ra/ManagedConnectionImpl.class | Bin 0 -> 3738 bytes .../ManagedConnectionMetaDataImpl.class | Bin 0 -> 729 bytes .../integration/out_loan_ra/MappedRecordImpl.class | Bin 0 -> 1889 bytes .../out_loan_ra/RecordFactoryImpl.class | Bin 0 -> 678 bytes .../out_loan_ra/ResourceAdapterMetaDataImpl.class | Bin 0 -> 1871 bytes .../build/classes/examples/jni/JavaLoanApp.class | Bin 0 -> 244 bytes .../Rima Examples/etc/common.properties | 32 + .../EJB 3.0 Code/Rima Examples/etc/common.xml | 764 +++++++++++++++++++++ .../src/examples/integration/Readme.txt | 61 ++ .../src/examples/integration/build.xml | 47 ++ .../integration/loanratesejb/LoanRates.java | 9 + .../integration/loanratesejb/LoanRatesBean.java | 46 ++ .../integration/loanratesejb/LoanRatesClient.java | 18 + .../out_loan_ra/ConnectionFactoryImpl.java | 69 ++ .../integration/out_loan_ra/ConnectionImpl.java | 54 ++ .../out_loan_ra/ConnectionMetaDataImpl.java | 31 + .../out_loan_ra/ConnectionRequestInfoImpl.java | 27 + .../out_loan_ra/ConnectionSpecImpl.java | 9 + .../integration/out_loan_ra/InteractionImpl.java | 96 +++ .../integration/out_loan_ra/META-INF/ra.xml | 28 + .../out_loan_ra/ManagedConnectionFactoryImpl.java | 100 +++ .../out_loan_ra/ManagedConnectionImpl.java | 135 ++++ .../out_loan_ra/ManagedConnectionMetaDataImpl.java | 35 + .../integration/out_loan_ra/MappedRecordImpl.java | 121 ++++ .../integration/out_loan_ra/RecordFactoryImpl.java | 20 + .../out_loan_ra/ResourceAdapterMetaDataImpl.java | 124 ++++ .../src/examples/jni/JavaLoanApp.java | 20 + .../src/examples/jni/LoanApp/Debug/BuildLog.htm | 52 ++ .../src/examples/jni/LoanApp/Debug/LoanApp.dll | Bin 0 -> 114688 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.exp | Bin 0 -> 758 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.ilk | Bin 0 -> 763084 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.lib | Bin 0 -> 1928 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.obj | Bin 0 -> 14622 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.pch | Bin 0 -> 11010048 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.pdb | Bin 0 -> 2599936 bytes .../src/examples/jni/LoanApp/Debug/LoanApp.res | Bin 0 -> 880 bytes .../src/examples/jni/LoanApp/Debug/stdafx.obj | Bin 0 -> 234840 bytes .../src/examples/jni/LoanApp/Debug/vc70.idb | Bin 0 -> 617472 bytes .../src/examples/jni/LoanApp/Debug/vc70.pdb | Bin 0 -> 610304 bytes .../src/examples/jni/LoanApp/LoanApp.cpp | 65 ++ .../src/examples/jni/LoanApp/LoanApp.def | 6 + .../src/examples/jni/LoanApp/LoanApp.h | 34 + .../src/examples/jni/LoanApp/LoanApp.ncb | Bin 0 -> 68608 bytes .../src/examples/jni/LoanApp/LoanApp.rc | 115 ++++ .../src/examples/jni/LoanApp/LoanApp.sln | 21 + .../src/examples/jni/LoanApp/LoanApp.suo | Bin 0 -> 8192 bytes .../src/examples/jni/LoanApp/LoanApp.vcproj | 187 +++++ .../src/examples/jni/LoanApp/ReadMe.txt | 59 ++ .../src/examples/jni/LoanApp/Resource.h | 16 + .../jni/LoanApp/examples_jni_JavaLoanApp.h | 21 + .../src/examples/jni/LoanApp/res/LoanApp.rc2 | 13 + .../src/examples/jni/LoanApp/stdafx.cpp | 7 + .../src/examples/jni/LoanApp/stdafx.h | 52 ++ .../src/examples/jni/nativelib/LoanApp.dll | Bin 0 -> 114688 bytes .../src/examples/session/stateless/Hello.java | 13 + .../src/examples/session/stateless/HelloBean.java | 16 + .../examples/session/stateless/HelloClient.java | 59 ++ .../session/stateless/HelloClient.java.original | 41 ++ .../session/stateless/META-INF/ejb-jar.xml | 5 + .../src/examples/session/stateless/Readme.txt | 13 + .../src/examples/session/stateless/build.xml | 30 + .../src/examples/timer/CleanDayLimitOrders.java | 13 + .../examples/timer/CleanDayLimitOrdersBean.java | 67 ++ .../examples/timer/CleanDayLimitOrdersClient.java | 19 + .../examples/timer/META-INF/application-client.xml | 7 + .../src/examples/timer/META-INF/application.xml | 10 + .../src/examples/timer/META-INF/ejb-jar.xml | 22 + .../Rima Examples/src/examples/timer/Readme.txt | 15 + .../Rima Examples/src/examples/timer/build.xml | 29 + 87 files changed, 2879 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.classpath create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/.project create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jar create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.ear create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jar create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jar create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jar create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rar create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.class create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.properties create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/etc/common.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/Readme.txt create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/build.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRates.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesBean.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/loanratesejb/LoanRatesClient.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionFactoryImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionMetaDataImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ConnectionSpecImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/InteractionImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/META-INF/ra.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/MappedRecordImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/RecordFactoryImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/JavaLoanApp.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/BuildLog.htm create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dll create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.exp create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilk create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.lib create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.obj create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pch create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdb create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.res create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.obj create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idb create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdb create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.cpp create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.def create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.h create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncb create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.rc create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.sln create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suo create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.vcproj create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/ReadMe.txt create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Resource.h create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/examples_jni_JavaLoanApp.h create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/res/LoanApp.rc2 create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.cpp create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/stdafx.h create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dll create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Hello.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloBean.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/HelloClient.java.original create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/META-INF/ejb-jar.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/Readme.txt create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/session/stateless/build.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrders.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersBean.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/CleanDayLimitOrdersClient.java create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application-client.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/application.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/META-INF/ejb-jar.xml create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/Readme.txt create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/timer/build.xml (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples') 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 @@ + + + + + + + + + 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 @@ + + + EJB3-Examples + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/client/LoanApplicationClient.jar 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ear/CleanDayLimitOrders.ear 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/ejbjar/LoanApplicationEjb.jar 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jar/EntityIntro.jar 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/jnijar/JavaLoanApp.jar 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/assemble/rar/OutboundLoanRa.rar 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRates.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesBean.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/loanratesejb/LoanRatesClient.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionFactoryImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionMetaDataImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionRequestInfoImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ConnectionSpecImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/InteractionImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionFactoryImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ManagedConnectionMetaDataImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/MappedRecordImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/RecordFactoryImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/integration/out_loan_ra/ResourceAdapterMetaDataImpl.class 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/build/classes/examples/jni/JavaLoanApp.class 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 + \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 @@ + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &include; + + + + + + + + + + + + + + + \ 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 @@ + + + OutboundLoanRa + Vendor Name + EIS Type + 1.5 + + false + + + + + examples.integration.out_loan_ra.ManagedConnectionFactoryImpl + javax.resource.cci.ConnectionFactory + examples.integration.out_loan_ra.ConnectionFactoryImpl + javax.resource.cci.Connection + examples.integration.out_loan_ra.ConnectionImpl + + LocalTransaction + false + + + 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 @@ + + + + + +
+
+Build Log +
  
+

------- Build started: Project: LoanApp, Configuration: Debug|Win32 ------- +

+
+Command Lines +
  
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"
+
+Output Window +
  
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
+
+Results +
  
+Build log was saved at "file://c:\temp\3eCode\Integration\src\examples\jni\LoanApp\Debug\BuildLog.htm"
+LoanApp - 0 error(s), 1 warning(s)
+
\ 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.dll 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.exp 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.ilk 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.lib 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.obj 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pch 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.pdb 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/LoanApp.res 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/stdafx.obj 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.idb 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/Debug/vc70.pdb 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.ncb 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: " + VALUE "FileDescription", "TODO: " + VALUE "FileVersion", "1.0.0.1" + VALUE "InternalName", "LoanApp.dll" + VALUE "LegalCopyright", "TODO: (c) . All rights reserved." + VALUE "OriginalFilename","LoanApp.dll" + VALUE "ProductName", "TODO: " + 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/LoanApp/LoanApp.suo 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 +/* 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 // MFC core and standard components +#include // MFC extensions + +#ifndef _AFX_NO_OLE_SUPPORT +#include // MFC OLE classes +#include // MFC OLE dialog classes +#include // MFC Automation classes +#endif // _AFX_NO_OLE_SUPPORT + +#ifndef _AFX_NO_DB_SUPPORT +#include // MFC ODBC database classes +#endif // _AFX_NO_DB_SUPPORT + +#ifndef _AFX_NO_DAO_SUPPORT +#include // MFC DAO database classes +#endif // _AFX_NO_DAO_SUPPORT + +#include // MFC support for Internet Explorer 4 Common Controls +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // 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 Binary files /dev/null and b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Rima Examples/src/examples/jni/nativelib/LoanApp.dll 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 @@ + + + + + \ 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 @@ + + ]> + + + + + + + + + + + + + + + + + &include; + + + + + + + + + + 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 @@ + + + CleanDayLimitOrdersClient + 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 @@ + + + CleanDayLimitOrdersApp + + CleanDayLimitOrdersEjb.jar + + + CleanDayLimitOrdersClient.jar + + 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 @@ + + + + + CleanDayLimitOrdersBean + CleanDayLimitOrdersBean + examples.timer.CleanDayLimitOrders + examples.timer.CleanDayLimitOrdersBean + Stateless + + handleTimeout + + javax.ejb.Timer + + + Container + + + + + + \ 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 @@ + + ]> + + + + + + + + + + + + + + + + + &include; + + + + + + + + + \ No newline at end of file -- cgit v1.2.3