Spring Transactions
Hi there, I have an implementation of my model with OJB using just PersistenceBroker. Now I'm looking into adding transactional support, looked into ODMG but it seems complex to implement since all my mapping and query is in Broker lingo, so I'm looking at injecting Transaction support for my process methods with spring, that way I shouldn't need to change config files and just one class that interfaces with the Broker. Now, I tried to look for samples outthere found this http://www.springframework.org/node/116 But after setting it up transactions don't seem to be happening. So my questions are. 1- Do I need to use InnoDB on Mysql ? My tables are MyIsam. 2- Am I missing any other feature besides applicationContext setup and deriving my class from PersistenceBrokerDaoSupport? Here is the applicationContext.xml PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED,readOnly Thanks Sam
DListImpl
Hi everyone, I've been using PB to implement my persistence framework, works wonders so far Now I came accross a point that needs to use a list in a class similar to DListImpl, where I can have a collection of objects without having to set a forignkey on the N side Is there a way of using DListImpl from PB? And if not Is there a way of initializing the DListImpl without having to do OJB.getInstance().newDListImpl()?? That way I can keep my convention of not using Persistence related code in my model. Thanks, Saman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ojb-tags
Thanks for the response Thomas. Keep up the great work you guys are doing. OJB rocks!! "Mahler Thomas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Saman, > > The ojb-tags are part of the contributions package. This archive contains > contributions that are not part of the maintained distribution. > The Ojb Tags library was developed by Jacob Hookom (Jacob.Hookom at > redline.mckhboc.com) for 1.0.RC3. > > I think it makes sense to talk directly to Jacob. > > cheers, > Thomas > > > -Original Message- > > From: Saman Ghodsian [mailto:[EMAIL PROTECTED] > > Sent: Monday, January 19, 2004 11:31 AM > > To: [EMAIL PROTECTED] > > Subject: ojb-tags > > > > > > Hi there, > > Has anyone used ojb-tags? and if so... in tomcat 5? > > I've been having problems using it getting exceptions > > Is it still being mantained? > > > > Thanks > > > > Saman > > > > > > > > > > - > > 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]
ojb-tags
Hi there, Has anyone used ojb-tags? and if so... in tomcat 5? I've been having problems using it getting exceptions Is it still being mantained? Thanks Saman
ojb-tags
Hi there, Has anyone used ojb-tags? and if so... in tomcat 5? I've been having problems using it getting exceptions Is it still being mantained? Thanks Saman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
M:n relation
Hi everyone, here is my problem with m:n non-decomposed associations I have to classes Actor and Role, the problem is that when I try to persist the m:n relation the indirection-table doesn't get populated I've looked in the Logs and something interesting was happening. After inserting an actor or Role, OJB is issuing a DELETE !!! here is my code and mapping info Help appreciated Comments: String ObjectLookup is an extention from ManageableCollection [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeInsert : [EMAIL PROTECTED] [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeInsert: [EMAIL PROTECTED]: INSERT INTO organization_role (oid,name,description,unit_id) VALUES (581,'Anyone',null,[EMAIL PROTECTED] [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeUpdateSQL: DELETE FROM organization_actorRole WHERE mRole_id=? [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeInsert : [EMAIL PROTECTED] [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeInsert: [EMAIL PROTECTED]: INSERT INTO organization_actor (oid,name,password,mIsActive,actorManager_id) VALUES (582,'saman',null,'0',[EMAIL PROTECTED] [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeUpdateSQL: DELETE FROM organization_actorRole WHERE mActor_id=? - > > - Actor actor = new Actor(); actor.setName("Actor"); Role role = new Role(); role.setName("Anyone"); role.putActor(actor); actor.putRole(role); broker.store(actor); broker.store(role); Saman Ghodsian CTO Middle Earth Technologies Ltd. www.metca.com Cell (604)-839-7791 Vancouver, BC Canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sorted list
Saman Ghodsian CTO Middle Earth Technologies Ltd. www.metca.com Cell (604)-839-7791 Vancouver, BC Canada > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 12:34 PM > To: OJB Users List > Subject: Re: Sorted list > > > Hi, > > Saman Ghodsian wrote: > > Hi everyone, > > > > I've been trying to find a way to have a sorted list where > I can do a > > get method on the key, right now I'm using to lists, one > that I have > > implemented based on the java SortedMap list and a vector, > then when > > OJB uses the setList method I go and add all the elements to the > > sorted map, and viceversa Problem is of course performance > > I've been looking in implementing my Sorted List by > implementing the > > ManageableCollection Interface, the question Is if that's > all I would > > need to do? Just implement those methods and have my repository > > collection tag to my own ? > > yes, that should be sufficient. have a look at > org.apache.ojb.broker.util.collections.ManageableHashSet for > an example. It is a HashSet that implements the > ManageableCollection interface. Ok I'll try that way > Are you willing to share your Map class? I'd love to add more user > defined ManageableCollections to the util.collections package. For sure, I'll let you know when I'm done and tested the solution > cheers, > Thomas > > > Anyone has come across this before? Any hints appreciated > > > > Thanks, > > > > > > > > Saman Ghodsian > > CTO > > Middle Earth Technologies Ltd. > > www.metca.com > > Cell (604)-839-7791 > > Vancouver, BC > > Canada > > > > > > > > > - > > 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]
Sorted list
Hi everyone, I've been trying to find a way to have a sorted list where I can do a get method on the key, right now I'm using to lists, one that I have implemented based on the java SortedMap list and a vector, then when OJB uses the setList method I go and add all the elements to the sorted map, and viceversa Problem is of course performance I've been looking in implementing my Sorted List by implementing the ManageableCollection Interface, the question Is if that's all I would need to do? Just implement those methods and have my repository collection tag to my own ? Anyone has come across this before? Any hints appreciated Thanks, Saman Ghodsian CTO Middle Earth Technologies Ltd. www.metca.com Cell (604)-839-7791 Vancouver, BC Canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LongObjectLookup
Hi Thomas, Exactly, What I need is to have a collection of objects sorted by Long, String or Date keys... Thanks for your reply Saman Ghodsian CTO Middle Earth Technologies Ltd. www.metca.com Cell (604)-839-7791 Vancouver, BC Canada -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 2:26 PM To: OJB Users List Subject: Re: LongObjectLookup Hi Saman, Saman Ghodsian wrote: > Hi everyone > I need anyones suggestion on this one... > I'm trying to implement a List indexed by a Long value or a String > value attached to an object I don't know exactly what you want to do. Do you want to implement a Map that maps Long or String values to other persistent entity objects? Or something else? please give us some more details, cheers, Thomas > Does anyone know which is the best way to go about it? > Code samples or hints appreciated.... > > > > > > > Saman Ghodsian > CTO > Middle Earth Technologies Ltd. > www.metca.com > Cell (604)-839-7791 > Vancouver, BC > Canada > > > > > - > 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]
LongObjectLookup
Hi everyone I need anyones suggestion on this one... I'm trying to implement a List indexed by a Long value or a String value attached to an object Does anyone know which is the best way to go about it? Code samples or hints appreciated Saman Ghodsian CTO Middle Earth Technologies Ltd. www.metca.com Cell (604)-839-7791 Vancouver, BC Canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
1:m relation not updating
Hi there, Here is the situation.. Say I have class A and class B 1->m I created the repository.xml Everything works fine when storing A to DB with a couple of B's Tx.lock(a, Transaction.WRITE); Tx.Commit Next step is to load a and add more B's and then save it again. I created the query. And all a and the related B's get loaded ok Now I add a couple more B's And store a Tx.lock(a, Transaction.WRITE); Also tried Tx.lock(a, Transaction.UPGRADE); But the new B's don't get inserted in DB. Any ideas Thanks Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem retrieving class
Found the problem. After sleeping a couple of hours :-/ The issue was that I defined dynamic proxy in my repository.xml so it was retrieving a proxy instead of my own class. Now I have to do some more reading on proxies.. Thanks for the replies Sam -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 1:32 AM To: OJB Users List Subject: Re: Problem retrieving class Good morning Sam, please could you post more info? OJB version? Example code (with select)? class structure of Account? stack trace? We aren't clairvoyants. Maybe your problem blow over after sleeping ;-) regards, Armin - Original Message - From: "Saman Ghodsian" <[EMAIL PROTECTED]> To: "'OJB Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, June 10, 2003 9:57 AM Subject: Problem retrieving class > Hi there, > > It's late and I've been trying to do this for a while so I'll just post > this message hoping I get a reply in the morning > > > I have a class structure, everything works fine when I store the objects > in DB, but after doing a select and trying to cast the object to my type > I get a classCastException > > i.e > > Account acc = (Account) result.get(0); > > > Any ideas? Thanks > > Sam > > > - > 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]
Problem retrieving class
Hi there, It's late and I've been trying to do this for a while so I'll just post this message hoping I get a reply in the morning I have a class structure, everything works fine when I store the objects in DB, but after doing a select and trying to cast the object to my type I get a classCastException i.e Account acc = (Account) result.get(0); Any ideas? Thanks Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]