Cameron McKenzie wrote:
All you need to do is create a Java project and then import the Hibernate libraries from the directory in which they sit. For web projects, it's even easier, you just put the Hibernate libraries in the lib folder and it links automtatically.
All you have to do is make your jar files available to your development environment. It's all very basic stuff.
Is there a particular problem you are anticipating?
Hi Cameron, thanks for your reply.
I have created a skeleton for my Enterprise project. It has an EAR, WAR, EJB and EJBClient parts, basic stuff with one servlet and it all works fine. I have created one class which is mapped correctly using hbm.xml, hibernate.hbm.cfg files etc and it is all working nicely, Oracle db is getting updated, queried etc. I was planning to explore annotations now to see how that ties in and this is where I am having problems. If I create a plain java class and start using @Entity, @Table annotations, as in 'Java Persistence With Hibernate' book, RAD 6 starts complaining 'Syntax error on tokens, delete these tokens' so I assume it doesn not know what to do with @Entity and @Table annotations. There is an option to create annotated session bean but should I really be creating annotated session beans?
I can make this work using NetBeans with Sun app server 9.1 but when I click on Rile > Run everything is done for me in the background, including deployment. With RAD6, up until annotations, I could export the EAR file, deploy it to WAS6 and it is working swimmingly but as soon as I start using annotations it just don't seem to recognize them. Obviously, buinding the EAR is not an option until this gets sorted out. I have doublechecked classpath etc and all libraries seem to be there. I was hoping there is a simple tutorial for using annotations with RAD6 but I don't seem to be able to find any.
I hope I am not confusing things.
Best regards.