There really is no reason to deploy OJB as a SAR (I would love to hear from anyone else that can tell what a good use case would be deploying it as a SAR).
Just create a facade EJB that will create your PersistenceBroker and do your work find/save work there. Your client app's will not access the broker, but instead the EJB's methods. In that case, your EAR will contain your EJB-JAR's, probably with your DAO's, and then you can include the repository files in the root of that EAR -- works like a charm. You know have one self-contained application, with it's own OJB 'space'. You can even leverage the EJB examples that OJB ships with as your pass-through EJB. Let me know if this answers your problem, or if you have more questions. I have a current deployment that is doing exactly this right now. BTW, yes, this means that each EAR has it's own OJB version -- but if you have a unified data model, you really only want one Persistence layer across an enterprise. -Andrew -----Original Message----- From: Michael Mogley [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 12:47 PM To: OJB Users List Subject: Re: how to keep repository-user.xml mappings separate from ojb.sar? Hi Armin, So in this case, how would I access the broker? I assume through JNDI somehow? Would I have to setup the PersistenceBrokerFactory as a resource adaptor? How would I do that? Michael ----- Original Message ----- From: "Armin Waibel" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Wednesday, February 25, 2004 5:21 AM Subject: Re: how to keep repository-user.xml mappings separate from ojb.sar? > Hi Michael, > > Michael Mogley wrote: > > Hi all, > > > > I'm trying to deploy an application on JBoss 3.2.3 using latest OJB. I've followed the steps to create an ojb.sar in the deployment dir. > > > > I would like to keep the xml mapping definitions and DAOs local to the specific .ear > I'm deploying. Is this possible? Or must I keep all the mappings for > all applications > in one repository-user.xml in the ojb.sar? > > > > Don't use .sar file in this case (AFAIK it's JBoss specific and shared > among the deployed application), try to include all OJB jar (with used > libraries) + beans in each application .ear file? > (Don't ask for details ;-)) > > regards, > Armin > > > Thanks for any help/advice. > > > > Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
