I use hibernate generated objects throughout much of my application.
I can successfully use these with Java RMI, however, I am facing many challenges with web services.
a) is it necessary for me to rewrite all the classes using arrays instead of the collections that are created by HibernateTool?
b) when and why is it necessary to encapsulate an array in an object? I've seen this design pattern in some examples in the forums and elsewhere.
c) Is JBossWS eventually going to allow Hibernate style object graphs to be transferred seamlessly over a web services endpoint as an argument or return type?
d) I've created an EJB3 class annotated @Stateless and @WebService. The @PersistenceContext annotation is ignored and the entity manager is not injected. I've seen this issue documented elsewhere, but without a clear solution. Is this issue fixed in the current release? For the moment, I've had to write a wrapper bean to lookup the real bean with JNDI and proxy the function calls.
At present, I'm using Jboss 4.0.4.GA installed by JEMS installer with the EJB3 profile.
Yes, we are working on that. Hibernate / EJB3 entities should be seamlessly used as request/response wrapper. Still at this point we are limited to what the JAX-RPC specs mandate, especially when it comes to collections. Lookout for improved hibernate integration early next year.