JNDI and connection pooling
Hi, I am using version 0.9.8 and have set up JNDI and connection pooling in my repository.xml file. The problem is that it seems the connection pooling is not working. Each time it gets a new connection. It works fine when I don't use JNDI. I was wondering if anyone has had any issues with this before and could recommend what I should do. Peter jdbc-connection-descriptor platform=MsSQLServer jdbc-level=2.0 jndi-datasource-name=java:comp/env/jdbc/Analytics6 connection-pool maxActive=25 maxIdle=10 maxWait=-1 minEvictableIdleTimeMillis=1 numTestPerEvictionRun=10 timeBetweenEvictionRunsMillis=1 whenExhaustedAction=1 testOnBorrow=true testWhileIdle=true testOnReturn=true validationQuery=select count(1) from OJB_HL_SEQ / /jdbc-connection-descriptor
Inverse fk lookup
Is is possible to a inverse foreign key look on a reference descriptor. I have a dealer(Parent) table and a dealerPreference (child)table where the dealerid is the fk on the dealerPreference table. I want to set it up so that when I get a dealer object I automatically get a dealerPreference object. What would be the best way of going about this? Peter
RE: Inverse fk lookup
What if it is a 1:1 mapping where I only have one dealerpreference for each dealer. I don't really want to get a collection. Is there any way to get back just one object. Thanks for all of your help. Peter -Original Message- From: Thomas Cornet [mailto:[EMAIL PROTECTED] Sent: Tue 7/22/2003 10:35 AM To: OJB Users List Cc: Subject: Re: Inverse fk lookup The best way is to declare in your 'Dealer' class a collection of 'DealerPreferences'. The repository would look like this class-descriptor name=Dealer ... collection-descriptor name=preferences element-class-ref=DealerPreference inverse-foreignkey field-ref=dealer_preference_FK_to_dealer/ /collection-descriptor /class-descriptor and your 'Dealer' must know have a new attribute : private List preferences; Plus getter/Setter and so on... You know have in your 'Dealer' object a list with all 'DealerPreferences' which reference the Dealer. Thomas At 17:26 22/07/2003, you wrote: Is is possible to a inverse foreign key look on a reference descriptor. I have a dealer(Parent) table and a dealerPreference (child)table where the dealerid is the fk on the dealerPreference table. I want to set it up so that when I get a dealer object I automatically get a dealerPreference object. What would be the best way of going about this? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Identity_Insert mssql
We were not able to fix it. We had to modify the OJB code to check to see if the first field is an auto-increment field and if it was, then we would turn Identity insert on. That requires that you make sure that if you are going to use Identity insert that it be the first field. Not a great fix, but it seems to be working right now. It is a hack, but we don't have time to deal with it. Hope this helps. Peter -Original Message- From: Brian Chaplin [mailto:[EMAIL PROTECTED] Sent: Thu 6/5/2003 9:52 PM To: [EMAIL PROTECTED] Cc: Subject: Re: Identity_Insert mssql Did you ever solve this? I'm having the same issue with Sybase 11.9.3 identity columns. Peter Costa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am stuck with it for right now. So I take it there is no easy way around this other than removing the Identities. If anyone has any suggestions it would be much appreciated. I am pretty much stuck right now. Thank you. Peter -Original Message- From: Ryan Vanderwerf [mailto:[EMAIL PROTECTED] Sent: Wed 4/9/2003 5:27 PM To: OJB Users List Cc: Subject: RE: Identity_Insert mssql Personally I'd remove use of identities where you can, and use the SequenceManangerStoredProcedureImpl class, it will use a stored procedure instead which is multi-app server safe (and tested on mssql). It's in current cvs, I'm guessing it will be in next rc3 release. That identity stuff isn't worth it, if you are stuck with them then my condolences ;) Ryan -Original Message- From: Peter Costa [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2003 3:51 PM To: [EMAIL PROTECTED] Subject: Identity_Insert mssql We are using OJB and mssql. We are having problems with tables that have an identity field on the which allows for auto-incrementing. I have been told that it was fixed in 1.0, but when we tried it we still had issues. Does anyone know about this issue? Do I need to change something in one of the xml files? Any help would be appreciated. Thank you. Peter - 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]