1 7 package org.jboss.tutorial.blob.client; 8 9 import java.util.HashMap ; 10 import javax.naming.InitialContext ; 11 import org.jboss.tutorial.blob.bean.LobTester; 12 import org.jboss.tutorial.blob.bean.BlobEntity2; 13 14 20 public class Client 21 { 22 public static void main(String [] args) throws Exception 23 { 24 InitialContext ctx = new InitialContext (); 25 LobTester test = (LobTester) ctx.lookup(LobTester.class.getName()); 26 long blobId = test.create(); 27 HashMap map = test.findBlob(blobId); 28 System.out.println("is hello in map: " + map.get("hello")); 29 System.out.println(test.findClob(blobId)); 30 System.out.println("creating and getting a BlobEntity2 that uses byte[] and String instead of Clob/Blob"); 31 blobId = test.create2(); 32 BlobEntity2 entity = test.findBlob2(blobId); 33 34 } 35 } 36 | Popular Tags |