So I now have an entity bean adaptor that will access the high counter entity bean. I've made a static final HighCounterHome object. So this will be used by all ejbCreate methods requiring a new, unique ID. Will there be any problem in holding on to this home object for, say, weeks at a time? Will there be any problem in having this one home object be used by, say, hundreds of different entity beans?
I would take a look at serializing the bean into a handle. Something like: Context ctx = new InitialContext(); Object obj = ctx.lookup("com.session.ProductHome"); ProductHome home = (ProductHome) PortableRemoteObject.narrow(obj,ProductHome.class); product = home.create(); session.setAttribute("handle", product.getHandle()); handle = (Handle) session.getAttribute("handle"); product = (Product) handle.getEJBObject();
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com