I assume your client will not make any remote calls. If this is correct, then yes you need the hibernate jars.
If your client calls the server methods remotely, it doesn't need the hibernate jars. But in this case you should consider another design:
1. an API jar that contains interfaces for your services (home and remote) etc. 2. your server jar that includes the API jar and all the implementations
This way, your client only sees what it needs to see: the service interfaces. If you need to pass the entities to the client, you might also need to provide interfaces that are put into the API jar. Thus you get a serialized version of the entity on the client but don't need to know about the implementation (which will contain JPA/Hibernate annotations).
|