Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Spring - Context - Standalone Client

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

We have an web application developed which works fine (JSF/Spring/Database). Have used HibernateDAO Support for the Persistance.

Now few services needs to be exposed as WebServices. So i have created new class and hosted as webservice, internally calling the DAO class which extends the HibernateDAOSupport by context.getbean("dao").

By Doing so i am not able to get the sessionfactory/ datasource and others. While calling the webservice, the bean creation fails with error in creating the bean "dao", and it gives sessionfactory and datasource as the attributes.

I do agree that these would be loaded during application startup by the container. But how to achieve the same from Standalone client

Would request to guide on solving the above issue.

Thanks
Rudresh
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initialize the application context yourself. Details are in the Spring documentation and tutorials.
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!