Before using hibernate, I'd typically have a data communication (DC) object for each entity bean. For example, if I had CustomerEntityBean, I'd have a Serializable CustomerDC object to pass to any front-end code.
I don't see the need for DC objects with hibernate. So in my current project, where we have an applet talking to stateless session beans, I just pass around the serializable POJOs that have been mapped to the database via hibernate.
But lately I've been getting "CGLIB Enhancement failed" exceptions on some objects in the applet. These exceptions aren't fatal, but they really slow down processing time, because in some situations I see this exception for each POJO being loaded into a JTable.
And the thing is, I don't think I want CGLIB enhancement in the applet. I love it on the server-side, where my customer.getCreditCard() magically turns into a sql statment, but what good does it do me on the applet?
So I wonder if there's any way to turn enhancement off in the applet jvm, and if that's even a sensible thing to do.
In fact, I thnk I probably somehow had CGLIB enhancement turned off earlier, because this problem only started when our project moved from an ant build to a maven build. At that point we made a whole slew of changes, some to the .war that holds the applet, some to the way we deploy server-side code to jboss (we now drop a hibernate.sar into jboss's deploy directory.)
Anyway, any advice would be appreciated.
|