You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2003/04/23 05:58:51 UTC
RE: Model for Hibernate Service Implemented using Avalon in Fulcr um
Modify AvalonComponentService to put the web app root in the context.
Your service will depend on that being in the context but will not
depend on Turbine.
> -----Original Message-----
> From: EPugh@upstate.com [mailto:EPugh@upstate.com]
> Sent: Tuesday, April 22, 2003 6:13 PM
> To: turbine-dev@jakarta.apache.org
> Subject: RE: Model for Hibernate Service Implemented using
> Avalon in Fulcr um
>
>
> It turns out that the format for specifing config values is
> different between Excalibur and Plexus:
>
> <my-system>
> <component
>
> xmlFile="c:/cellculture/src/java/com/upstate/cellculture/om/La
> bor.hbm.xml"
> role="org.apache.fulcrum.db.HibernateService"
> class="org.apache.fulcrum.db.HibernateService">
> </component>
> </my-system>
>
> The above worked great! However, now I don't know how to
> provide less then the full path to the Labor.hbm.xml.
>
> I really want to provide something in the WEB-INF/conf
> directory. However, what I read about components is that
> they should be configured exteranlly.. Should I put in my
> configuration call in my HibernateService something like:
>
> String xmlFilename = Turbine.getRealPath(
> getConfiguration().getString(XML_FILE));
>
> That would require fulcrum having a dependency on Turbine...
> Which seems weird, but maybe is okay?
>
> Eric Pugh
>
>
> -----Original Message-----
> From: EPugh@upstate.com [mailto:EPugh@upstate.com]
> Sent: Tuesday, April 22, 2003 6:32 PM
> To: turbine-dev@jakarta.apache.org
> Subject: RE: Model for Hibernate Service Implemented using
> Avalon in Fulcr um
>
>
> Alright! The HibernateService plus a testcase that
> demonstrates the HibernateService interacting with HSQL is
> now in Fulcrum. Also, amazingly enough, all of Fulcrum's
> test cases are functioning!
>
> At this point however my knowledge of Avalon is showing the
> lack... I can run HibernateService great in Fulcrum.. But
> in my webapp, I want to use it with the
> AvalonComponentService, but I keep getting this error:
>
> Testcase: testUsingHibernateService took 0.422 sec
> Caused an ERROR
> Could not access the Component (key
> [org.apache.fulcrum.db.HibernateService])
> org.apache.avalon.framework.component.ComponentException:
> Could not access the Component (key
> [org.apache.fulcrum.db.HibernateService])
> at
> org.apache.avalon.excalibur.component.ExcaliburComponentManage
> r.lookup(Excal
> iburComponentManager.java:335)
> at
> org.apache.turbine.services.avaloncomponent.TurbineAvalonCompo
> nentService.lo
> okup(TurbineAvalonComponentService.java:209)
> at
> com.upstate.cellculture.misc.TestUsingHibernate.testUsingHiber
> nateService(Te
> stUsingHibernate.java:113)
> at
> org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestC
> ase.java:332)
> at
> org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractT
> estCase.java:2
> 35)
>
>
> My componentRoles.xml looks like this:
> <role-list>
> <role
> name="org.apache.fulcrum.db.HibernateService"
> shorthand="hibernate"
> default-class="org.apache.fulcrum.db.HibernateService"/>
> </role-list>
>
> At any rate, any feed back would be greatly appreeciated!
>
> Eric
>
> -----Original Message-----
> From: Humberto Hernandez Torres [mailto:hhernandez@itweb.com.mx]
> Sent: Tuesday, April 22, 2003 12:54 PM
> To: Turbine Developers List
> Subject: RE: Model for Hibernate Service Implemented using
> Avalon in Fulcr um
>
>
> It sounds good to me.
> --
> Humberto
>
> > -----Original Message-----
> > From: EPugh@upstate.com [mailto:EPugh@upstate.com]
> > Sent: Tuesday, April 22, 2003 8:48 AM
> > To: turbine-dev@jakarta.apache.org
> > Subject: Model for Hibernate Service Implemented using Avalon
> > in Fulcrum
> >
> >
> > Hi all,
> >
> > I am looking at the version of Torque in the plexus/fulcrum repo:
> > http://cvs.werken.com/viewcvs.cgi/fulcrum/db/src/java/org/apac
> he/fulcrum/db/
> DefaultDatabaseService.java?rev=1.1&cvsroot=plexus&content-typ
> e=text/vnd.vie
> wcvs-markup
>
> I am going to use this version as a model for my Hibernate
> service called org.apache.fulcrum.db.HibernateService.
>
> Eventually when Leandro's persisentence framework is ready,
> it can use the HibernateService to get hibernate up and
> running. That way the framework won't need to know how to
> start up it's embedded database service. It just needs to go grab it!
>
> This component will mimic the existing Torque component, and
> be tested to work with Turbine 2.3-dev.
>
> Does this sound good?
>
> Eric Pugh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org