Geert Bevin <gbevin <at> uwyn.com> writes: >
Hey Geert. Once again, I'm impressed at the speed of your response. Aren't you at JavaOne? I just hope that you were at a bar with your laptop when you wrote this... > Hi John, > > > - Can I do Meta data merging out of container? > > You need to have RIFE's classloader being active. The easiest way to > do this is to run your application with the RunWithEngineClassLoader > class: > http://rifers.org/docs/api/com/uwyn/rife/test/ > RunWithEngineClassLoader.html > > When it's run inside a servlet container, this is done automatically. > > > - Anybody built an ORM abstraction that wraps the Rife layer, that > > could also > > potentially wrap Hibernate? > > There is a database abstraction layer that is built inside RIFE. It > does mainly type conversions and SQL generation. Also, when a > DbQueryManager is used, you can use it with a DbQueryManagerFactory > that is able to load a dedicated query manager for a specific > database (which then typically extends a base query manager) with DB- > specific differences or exceptions. > > The main issue here is that the DBs are detected based on the JDBC > driver name. This is not really applicable to Hibernate. Also, a lot > of RAW interactions are possible (like streaming data straight out > from the database to the web engine), I have no idea until where > these are supported by Hibernate. I have however never used Hibernate > so I can't really assess these things correctly. I think it might be > possible, but I don't know how difficult it would be. > > A while ago I was planning on looking into this, but then I realized > something. There's nothing at all that prevents you from using both. > If you want to use the RIFE database functionalities for certain > things, just do so, you can still use Hibernate for anything else you > want it to do. Thanks, good info. The db abstraction layer is perhaps my favorite part of Rife. I love the meta data system: I want to write Java, not spend all my time with XML configurbation. Still, I don't want to have any dependencies on a specific ORM in my pojos. I think maybe the simplist approach, that still affords me some reversability, is this: Create my own, simple PersistenceDataManager and Factory. Then make implementations of these that wraps ContentQueryManager. I might also make a simple Context class that houses my factory(ies) and also provides access to the Repository. > > > - Anybody have any example tests that inject a datasource, etc.? > > Can you give more information here? Inject a test into an element > during testing? I'm really talking about OOC testing of pojos. So it is a matter of having the test inject the necessary dependencies. I think I have this partially figured out. I can at least get a test version of a Repository and build stufff with that: ResourceFinder resourceFinder = ResourceFinderClasspath.getInstance(); Rep.initialize("rep/participants.xml", resourceFinder, null); DS = (Datasource) Datasources.getRepInstance().getDatasource ("test_derby"); ... Once I get my abstraction stuff figured out above, I can create a Test superclass that sets it all up and injects it into the pojos. Thanks again, I really appreciate your efforts to help out your user community. - John > > > Any answers to the above, or any general advice, would be much > > appreciated. > > Thanks. > > Best regards, > > Geert > > > > > _______________________________________________ > > Rife-users mailing list > > Rife-users <at> uwyn.com > > http://lists.uwyn.com/mailman/listinfo/rife-users > > > > -- > Geert Bevin Uwyn bvba GTalk: gbevin <at> gmail.com > "Use what you need" Avenue de Scailmont 34 Skype: gbevin > http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin > gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 > > PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 > Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net > _______________________________________________ Rife-users mailing list [email protected] http://lists.uwyn.com/mailman/listinfo/rife-users
