spring - Separate Hibernate library for multiple web applications -


i want have 2 web applications use hibernate, spring, , jsf 2.0. 1 website available public , other content management system available on company intranet. don't want have duplicate code accesses database. want create jar file contains database manipulation using hibernate. can't find examples on of how done. have helpful tips? i've managed create hibernate jar file , put test main in , can retrieve data database. think main problem how go configuring in web application? thanks


after playing around things bit. i'm there i'm getting error when deploying glassfish error occurred during deployment: exception while loading app : java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: org.springframework.beans.factory.beancreationexception: error creating bean name 'brandservice' defined in servletcontext resource [/web-inf/applicationcontext.xml]: cannot resolve reference bean 'branddao' while setting bean property 'branddao'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'branddao' defined in servletcontext resource [/web-inf/applicationcontext.xml]: cannot resolve reference bean 'sessionfactory' while setting bean property 'sessionfactory'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'sessionfactory' defined in servletcontext resource [/web-inf/applicationcontext.xml]: cannot resolve reference bean 'datasource' while setting bean property 'datasource'; nested .... msg.seeserverlog

i think there not difference between jar used java console application(your test main) , jar used java web application .


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -