So you will need to add bundle the samples jar with its persistance.xml into the webapp, and then you will need to create a new module eg JPASPIModule that contains bindings for all the SPI implementations. These should be off the form

bind(spiclass.class).to(spiimplementationclass.class).inScope (Scopes.SINGLETON);

eg
bind(PersonService.class).to(PersonServiceDb.class).inScope (Scopes.SINGLETOM);


then add the full classname of the JPASPIModule at the end of the other modules in web.xml

That *should* be all you need to do.

If you want to see an example of taking the the Shindig jars and build a set of custom webapps, there is an example I did a few days ago at
https://source.sakaiproject.org/contrib/tfd/trunk/shindigadapter/

This only replaces the AuthenticationHandlers, but I gives you an idea of how to package and extend Shindig. I am bundling 2 separate webapps in this example.

HTH
Ian

On 11 Nov 2008, at 18:08, Ben Smith wrote:

Hi,

I've been playing around with the sample JPA layer, tying it into hibernate and submitting patches.

I realise that this is less complete than the rest of the Shindig sections and I'm looking to bulk up the functional tests that are already provided.

However, I'm really keen to get this working and have Shindig run off the persistence layer so I'd really appreciate any help you can give me. I'm assuming I want to add a new Guice module to the web.xml but I'm a bit lost when it comes to knowing what implementations need to be injected where and how do I bootstrap the app to pick up the appropriate persistence.xml configuration.

Please help!

Ben

Reply via email to