[hibernate-commits] Hibernate SVN: r17683 - in sandbox/trunk/lobtest-ee5: lobtest-web/src/main/webapp and 1 other directory.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Oct 9 17:48:42 EDT 2009


Author: gbadner
Date: 2009-10-09 17:48:41 -0400 (Fri, 09 Oct 2009)
New Revision: 17683

Modified:
   sandbox/trunk/lobtest-ee5/lobtest-ejb/src/main/java/com/redhat/gss/lobtest/ejb/ThingServiceBean.java
   sandbox/trunk/lobtest-ee5/lobtest-web/src/main/webapp/basic.jsp
Log:
added print statements to confirm proxies were returned to client and that client could call target methods


Modified: sandbox/trunk/lobtest-ee5/lobtest-ejb/src/main/java/com/redhat/gss/lobtest/ejb/ThingServiceBean.java
===================================================================
--- sandbox/trunk/lobtest-ee5/lobtest-ejb/src/main/java/com/redhat/gss/lobtest/ejb/ThingServiceBean.java	2009-10-09 19:30:36 UTC (rev 17682)
+++ sandbox/trunk/lobtest-ee5/lobtest-ejb/src/main/java/com/redhat/gss/lobtest/ejb/ThingServiceBean.java	2009-10-09 21:48:41 UTC (rev 17683)
@@ -65,7 +65,9 @@
 
 	public Thing findThingJPA(Long id)
 	{
-		return em.getReference(Thing.class, id);
+		Thing t = em.getReference(Thing.class, id);
+		System.out.println("Thing: id=" + t.getId() + " name=" + t.getName() + " class=" + t.getClass());
+		return t;
 	}
 
 	public Thing setUp()

Modified: sandbox/trunk/lobtest-ee5/lobtest-web/src/main/webapp/basic.jsp
===================================================================
--- sandbox/trunk/lobtest-ee5/lobtest-web/src/main/webapp/basic.jsp	2009-10-09 19:30:36 UTC (rev 17682)
+++ sandbox/trunk/lobtest-ee5/lobtest-web/src/main/webapp/basic.jsp	2009-10-09 21:48:41 UTC (rev 17683)
@@ -1,3 +1,4 @@
+<%@page import="java.util.Iterator"%>
 <%@page import="javax.naming.InitialContext"%>
 <%@page import="com.redhat.gss.lobtest.ejb.ThingService"%>
 <%@page import="com.redhat.gss.lobtest.jpa.Thing"%>
@@ -4,11 +5,22 @@
 <%
     InitialContext ctx = new InitialContext();
     ThingService ts = (ThingService) ctx.lookup("lobtest/ThingServiceBean/local");
-    Thing t = ts.setUp();
+    ts.setUp();
     out.print("Tests set up.</br>");
-    ts.findAllThingsHibernate();
-    ts.findThingHibernate(t.getId());
-    //ts.findThingHibernateMBean(t.getId());
+
+    Thing t = null;
+    for( Iterator<Thing> it=ts.findAllThingsHibernate().iterator(); it.hasNext(); ) {
+	t = it.next();
+	System.out.println("basic.jsp from query: Thing: id=" + t.getId() + " name=" + t.getName() + " class=" + t.getClass());
+    }
+
+    t = ts.findThingHibernate(t.getId());
+    System.out.println("basic.jsp from ts.findThingHibernate(): Thing: id=" + t.getId() + " name=" + t.getName() + " class=" + t.getClass());
+
+    t = ts.findThingJPA(t.getId());
+    System.out.println("basic.jsp from ts.findThingJPA(): Thing: id=" + t.getId() + " name=" + t.getName() + " class=" + t.getClass());
+
+    //t = ts.findThingHibernateMBean(t.getId());
+    //System.out.println("basic.jsp from ts.findThingHibernateMBean(): Thing: id=" + t.getId() + " name=" + t.getName() + " class=" + t.getClass());
 %>
-
 Tests run successfully.



More information about the hibernate-commits mailing list