summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client')
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client/EmployeeAddressClient.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client/EmployeeAddressClient.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client/EmployeeAddressClient.java
new file mode 100644
index 0000000..efabba5
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_one/client/EmployeeAddressClient.java
@@ -0,0 +1,28 @@
+package examples.entity.uni.many_to_one.client;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import examples.entity.uni.many_to_one.Employee;
+import examples.entity.uni.many_to_one.interfaces.EmployeeAddressMOUni;
+
+
+public class EmployeeAddressClient {
+ public static void main(String[] args) {
+ try {
+ InitialContext ic = new InitialContext();
+ EmployeeAddressMOUni ea = (EmployeeAddressMOUni)ic.lookup(EmployeeAddressMOUni.class.getName());
+
+ ea.doSomeStuff();
+
+ for (Object o : ea.getEmployees()) {
+ Employee e = (Employee)o;
+ System.out.println("Name: "+e.getName()+", Business Address: "+
+ e.getAddress().getCity()+", "+e.getAddress().getZipcode());
+ }
+ }
+ catch (NamingException e) {
+ e.printStackTrace();
+ }
+ }
+}