My Library with JBoss 5
Im using JBoss 5 and i want to use hibernate "3.6" instead of jboss hibernate "3.3". Is it enough to just replace the hibernate jars with mine jars 开发者_运维技巧which are located in common\lib? Can this cause any crash or something else with the jboss?
Thanks for reading :)
Do not touch your AS libraries. Do not replace the jars they thoroughly tested with your own versions. If you need a newer Hibernate, just deploy it with your application package (war, ear). Most of the application servers will recognize it and stay out of your way. In some cases, a minor change to the configuration is needed, to enable class loader isolation per application. But again, do it only if you need, as it's always better to consume the services provided by the AS instead of trying to replace an AS feature.
That said, it's worth noting that Hibernate is not there for your consumption. It's there as a "JPA provider" (and as CMP-provider for EJB 2.x), which your app can make use of. It just happens that you can use Hibernate directly, but please, don't replace it.
精彩评论