Spring – Hibernate Annotation – Entity classes in JAR not recognised [XXX is not mapped]

Spring provides options to integrate many ORM frameworks available in Market and one of them is Hibernate. With the options like configuring SessionFactory and HibernateTemplate, it makes developer’s life smooth to integrate other cross cutting concerns. Amongst all the other features, Spring provides a convenient feature is to autodetect “Annotated” Entity classes from package(s) using helper bean “org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean”. The package(s) name can be injected using setter method “packagesToScan”. Set the value of this property to the package name where you place the Entity classes and you are good to go. No need to add entry for every *-hbm.xml file OR explicitly configuring annotated classes.

But recently I came across a problem, wherein I found that my application’s Entity classes were not detected and when I was querying, hibernate was simply throwing an error as “XXX is not mapped”.
Continue reading

Spring JMS API, JBoss MQ, BlazeDS & Flex

This time one more assignment to integrate Spring APIs with Jboss MQ. After reading through Spring documentation, I found its pretty easy to integrate any Messaging Provider solution into Spring application.

Configuring JMS Topic in JBoss

To create new JMS Topic destination you should configure new topic destination in [deploy_directory]/deploy/jms/jbossmq-destinations-service.xml. Following code snippet creates new Topic Destination.

Continue reading