jrf-devel Mailing List for jRelationalFramework
Brought to you by:
joncrlsn
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(39) |
Feb
(8) |
Mar
(9) |
Apr
(1) |
May
(3) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jonathan C. <jon...@ya...> - 2002-08-16 13:48:51
|
FYI - This is an interesting concept. According to the web site it currently only supports PostgreSQL 7.1+, but that must be out of date because he talks about hsqldb, and m$sql in the e-mail. --- Adrian Geissel <age...@us...> wrote: > To: jon...@ya... > Subject: Introducing ZsqlML > From: Adrian Geissel <age...@us...> > Date: Wed, 14 Aug 2002 03:53:20 -0700 > > Hi Jonathan, > > I've just come acros your project. While I have not had > time > (yet) to go through it in detail, I believe that there is > some > shared interest between JRF and my project, ZsqlML. > > My project centers on abstracting RDBMS structure using > the ZsqlML XML markup language, and then from that point > provides a few XSLT transformations to simplify RDBMS > usage: > > 1) SQL script generation (multiple platfrom support - > currently > pgsql, hsqldb, mssql[draft]) > 2) PDF documentation generation - in progress > 3) Java wrapper class generation > > It is the third element that appears to overlap. Perhaps > there > is an opportunity to merge these elements? > > The project homepage is on > > http://sf.net/projects/zsqlml > > Regards > Adrian > ===== Jonathan Carlson jon...@us... Minneapolis, Minnesota __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com |
|
From: Jonathan C. <jon...@ya...> - 2002-06-19 21:31:59
|
According to Jay, the 2.0 stuff is in CVS fine now. I haven't had time to check it out yet. Erik is working on getting a beta zip file ready to announce to the user list soon and I'm working on changing the web pages a bit for the new release. If there is anyone who might be interested in helping out on the HTML piece of it, let me know. Jonathan ===== Jonathan Carlson jon...@us... Minneapolis, Minnesota __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |
|
From: David W. <da...@su...> - 2002-05-23 18:20:56
|
Jonathan, Great news. > 3) Jay will verify that he has write access to CVS. Sourceforge have recently upgraded their site docs for cvs, well recommended. > As Soon As Possible: > 1)We're looking for someone to help create some user > documentation to help new jRF users. The 1.x documentation > could be a springboard for the new stuff. If someone would > like to use some XML format for the 2.0 documentation, that > would be really cool. I'm not very familiar with docbook > or such but would like to encourage its use. Yes docbook would be good. I also know little about it. Thankyou Dave |
|
From: Jonathan C. <jon...@ya...> - 2002-05-23 18:13:13
|
Here are a list of things to be done for 2.0 (beta2?) Today or Tomorrow: 1) Erik and I (at least I) will do a quick check of Jay's distribution per Jay's request. 2) I will run a code formatter on the code. 3) Jay will verify that he has write access to CVS. 4) I will check the code into CVS. 5) Erik will temporarily post a zip file of the beta distribution on his web site. 6) Erik will send a news release to jrf-user, jrf-devel, and the jrf project page at sourceforge. Next week: 1) We'll need a general jRF welcome page that links to both 1.x and 2.x documentation so they are separated. I'll try to do this. The 2.x documentation will be a bit sparse. As Soon As Possible: 1)We're looking for someone to help create some user documentation to help new jRF users. The 1.x documentation could be a springboard for the new stuff. If someone would like to use some XML format for the 2.0 documentation, that would be really cool. I'm not very familiar with docbook or such but would like to encourage its use. 2) As we come to a consensus on it we'll do a real release of version 2.0. Jonathan ===== __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com |
|
From: David W. <da...@su...> - 2002-05-21 08:37:22
|
Please, please, please can we get version 2 checked into cvs. We know that several people have been doing serious work on it but how can anyone help finish it, test it, debug it without the code being available. I don't care if it won't even compile, we will happily submit patches to get it to that point. But we need the code! We know there are lots of changes and we are really increasing our work rate on a project using jrf, I do need to be able to start to plan the impact of jrf 2 and I want to be able to migrate to it sooner rather than later. Back in January it was only a couple of weeks away. If nobody has time then please send us the code and give me or Mandip cvs access, we will do this for you. I don't care whether this is a new module or whether we branch the existing module into a maintenance branch and a main development branch. But I repeat please, please, please get that code out where we can help. My grateful thanks for your work which I hope to soon be able to see, use and help you with. Dave |
|
From: Mandip S. S. <ma...@su...> - 2002-04-10 10:22:30
|
Hi All Been working on getting all the tests to pass for PostgreSQL database and came up with an interesting issue... If we create a Domain that uses timestamp optimistic locking then the timestamp string in the db will look like: '2002-04-08 17:48:30.123456+01' However when we retrieve a PersistentObject from the table and hence read the timestamp column value (using rs.getTimestamp(columnName)) the timestamp string is stored as '2002-04-08 17:48:30.123'. If we now modify our PersistentObject and try to save it back to the db with a statement like: UPDATE Domain f1=..., f2=..., f3=..., WHERE id=... AND timestampColumnName='2002-04-08 17:48:30.123' Then the statement will obviously fail and we get an ObjectHasChangedException even though the row actually hasn't been updated since we last read from it. So the issue here being how do we get round the problem of different timestamp representations in the db and within the framework? To get round this problem I've changed the statement to: UPDATE Domain f1=..., f2=..., f3=..., WHERE id=... AND timestampColumnName LIKE '2002-04-08 17:48:30.123%' What do you guys think of the above change? Are there any other suggestions? Is this something we might have to put into the DatabasePolicy? Regards Mandip |
|
From: David W. <da...@su...> - 2002-03-28 17:11:31
|
Erik Tennant wrote: > I don't mind seeing the whole file, if you can post those. But we need > each file on the list- there were more than 2. All in the attached zip file. One is a diff of all the modified files and the other is the new database policy file. Many thanks Dave |
|
From: Erik T. <ete...@ca...> - 2002-03-28 16:59:39
|
I don't mind seeing the whole file, if you can post those. But we need each file on the list- there were more than 2. Thanks, Erik At 10:53 AM 3/28/2002, David Warnock wrote: >Erik Tennant wrote: >>We need the files before we can look at them. I don't think Mandip >>uploaded his files when he posted the patch. > >Oops. I don't have the 2 patches separated to hand so I guess Mandip will >put them up on Tuesday. > >Sorry. > >Dave |
|
From: David W. <da...@su...> - 2002-03-28 16:55:56
|
Erik Tennant wrote: > We need the files before we can look at them. I don't think Mandip > uploaded his files when he posted the patch. Oops. I don't have the 2 patches separated to hand so I guess Mandip will put them up on Tuesday. Sorry. Dave |
|
From: Erik T. <ete...@ca...> - 2002-03-28 16:39:25
|
We need the files before we can look at them. I don't think Mandip uploaded his files when he posted the patch. -Erik At 05:48 AM 3/28/2002, David Warnock wrote: >Has anyone been able to look at the patch submitted by Mandip yet? > >What is the status of this? > >Mandip is back at work on Tuesday after a short holiday and I would like >to know where we stand with this. > >Thanks > >Dave |
|
From: David W. <da...@su...> - 2002-03-28 11:51:25
|
Has anyone been able to look at the patch submitted by Mandip yet? What is the status of this? Mandip is back at work on Tuesday after a short holiday and I would like to know where we stand with this. Thanks Dave |
|
From: Mandip S. S. <ma...@su...> - 2002-03-14 12:19:19
|
Hi Erik Sorry for the delay in getting back to you, have been snowed under lately. There are a couple of topics I need to discuss. Firstly there was the issue of me doing a checkout and not being able to run the tests. In particular when I first run the DomainTEST class I get 22 errors and when I run the test there after I get 10 failures and 7 errors. We've tried a co on David's machine which is running the same version of java and ant, and everything works fine, so I'm not really sure what could be causing the problem. Secondly there is the work I've been doing on making JRF use a Firebird database (and also a PostgreSQL database). I'm happy to report that the work is now finished and I have submitted a patch and also the new FirebirdDatabasePolicy. 22 out of 24 tests in DomainTEST run successfully for the Firebird database and 21 out of 24 run successfully for the PostgreSQL database. The tests 'test030UpdateSequencedKey' and 'test500TimestampOptimisticlocking' fail on the Firebird database due to the fact that the standard Timestamp is only accurate to the nearest seecond. This can be overcome by using the 'getExactTimestamp()' UDF but I haven't had time to look into this yet. The same problem occurs with the PostgreSQL database. Below is a list of the classes I have modified and a brief description of what has been done. 1) source/com/is/jrf/AbstractColumnSpec.java Added a 'String tableName' parameter to the ColumnDefinitionString method because the Firebird database didn't like the NULL token as a default value. The default value can now be specified in the DatabasePolicy. 2) source/com/is/jrf/AbstractDomain.java Changed the createTable method which was creating a new sequence even for a subtype table. Changed the dropTable method so that it now goes to the DatabasePolicy and deletes any generator/sequence associated with the table before actually dropping it. Changed the endTransaction method so that it goes to the DatabasePolicy checks whether the JDBCHelper should be closed. This is true for all databases except Firebird. 3) source/com/is/jrf/ColumnSpec.java This was changed as a consequence of 1). 4) source/com/is/jrf/CompoundPrimaryKeyColumnSpec.java This was changed as a consequence of 1). 5) source/com/is/jrf/CreateTableSQLBuilder.java This was changed as a consequence of 1). 6) source/com/is/jrf/DatabasePolicy.java This was changed to an abstract class for greater flexibility. 7) source/com/is/jrf/HypersonicDatabasePolicy.java This was changed as a consequence of 6). 8) source/com/is/jrf/InstantDBDatabasePolicy.java This was changed as a consequence of 6). 9) source/com/is/jrf/MySQLDatabasePolicy.java This was changed as a consequence of 6). 10) source/com/is/jrf/OracleDatabasePolicy.java This was changed as a consequence of 6). 11) source/com/is/jrf/PostgreSQLDatabasePolicy.java Added the dropTable method to delete any associated sequence. 12) source/com/is/jrf/SQLServerSybaseDatabasePolicy.java This was changed as a consequence of 6). 13) source/test/DomainTEST.java This was changed because creating and dropping tables for every test crashed the Firebird database. Note, this is only a temporary solution. I'm sure you guys will come up with a better way. 14) source/test/EmployeeDomain.java Added a retJDBCHelper method. 15) source/test/ManufacturerDomain.java Added a retJDBCHelper method. 16) source/test/PartDomain.java Added a retJDBCHelper method. 17) source/test/PersonDomain.java Added a retJDBCHelper method. 18) jrf.properties Now includes commented example info to connect to a Firebird database. I would be grateful if you guys could look over the changes and get back to me about anything you don't like or think could be done a better way. Regards Mandip |
|
From: Erik T. <ete...@ca...> - 2002-03-01 22:08:16
|
I just did a clean checkout and ran the tests against HSQL and Oracle, and both worked fine.. Can you send me the test ouput from bld/testoutput? Also, thanks for catching the differences in jrf.properties. I will change the default properties back and re-commit. -Erik At 10:58 AM 3/1/2002, Mandip S. Sangha wrote: >Hi Erik > >Just about to submit my patch file and noticed that after doing a cvs >checkout, it compiles okay but most of the tests in DomainTEST fail. The >jrf.properties file has changed from: > ># Example for the free, open-source, java HypersonicSQL RDBMS that is ># included with this distribution. ># (http://hsql.oron.ch). ># Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB ># >driverJar=lib/hsql.jar >useANSIJoins=true >reuseStatement=false >databasePolicy=com.is.jrf.HypersonicDatabasePolicy >driver=org.hsql.jdbcDriver >url=jdbc:HypersonicSQL:test-hsql >user=sa >password= > >to: > ># Example for the free, open-source, java HypersonicSQL RDBMS that is ># included with this distribution. ># (http://hsql.oron.ch). ># Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB ># >driverJar=jar >useANSIJoins=true >reuseStatement=false >databasePolicy=policy >driver=driver >url=url >user=user >password=pass > >Even after the properties are changed back there are still ten tests that >fail. I'm using 'ant test -Dtest=DomainTEST'. I checked out jrf a few weeks >ago and everything ran fine. If I'm doing something wrong please can you >tell me otherwise if any code needs to be changed please can you do so, so >that I can create my diff file from the new code. > >Many thanks >Mandip |
|
From: Erik T. <ete...@ca...> - 2002-03-01 21:08:26
|
I'll look into it and get back to you. I ran the tests on the files I had before checking them in. Maybe I just left something off that should have gone into cvs. -Erik At 10:58 AM 3/1/2002, Mandip S. Sangha wrote: >Hi Erik > >Just about to submit my patch file and noticed that after doing a cvs >checkout, it compiles okay but most of the tests in DomainTEST fail. The >jrf.properties file has changed from: > ># Example for the free, open-source, java HypersonicSQL RDBMS that is ># included with this distribution. ># (http://hsql.oron.ch). ># Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB ># >driverJar=lib/hsql.jar >useANSIJoins=true >reuseStatement=false >databasePolicy=com.is.jrf.HypersonicDatabasePolicy >driver=org.hsql.jdbcDriver >url=jdbc:HypersonicSQL:test-hsql >user=sa >password= > >to: > ># Example for the free, open-source, java HypersonicSQL RDBMS that is ># included with this distribution. ># (http://hsql.oron.ch). ># Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB ># >driverJar=jar >useANSIJoins=true >reuseStatement=false >databasePolicy=policy >driver=driver >url=url >user=user >password=pass > >Even after the properties are changed back there are still ten tests that >fail. I'm using 'ant test -Dtest=DomainTEST'. I checked out jrf a few weeks >ago and everything ran fine. If I'm doing something wrong please can you >tell me otherwise if any code needs to be changed please can you do so, so >that I can create my diff file from the new code. > >Many thanks >Mandip > >_______________________________________________ >jrf-devel mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-devel |
|
From: Mandip S. S. <ma...@su...> - 2002-03-01 16:56:31
|
Hi Erik Just about to submit my patch file and noticed that after doing a cvs checkout, it compiles okay but most of the tests in DomainTEST fail. The jrf.properties file has changed from: # Example for the free, open-source, java HypersonicSQL RDBMS that is # included with this distribution. # (http://hsql.oron.ch). # Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB # driverJar=lib/hsql.jar useANSIJoins=true reuseStatement=false databasePolicy=com.is.jrf.HypersonicDatabasePolicy driver=org.hsql.jdbcDriver url=jdbc:HypersonicSQL:test-hsql user=sa password= to: # Example for the free, open-source, java HypersonicSQL RDBMS that is # included with this distribution. # (http://hsql.oron.ch). # Note: Hypersonic DOES support multiple ANSI joins, unlike InstantDB # driverJar=jar useANSIJoins=true reuseStatement=false databasePolicy=policy driver=driver url=url user=user password=pass Even after the properties are changed back there are still ten tests that fail. I'm using 'ant test -Dtest=DomainTEST'. I checked out jrf a few weeks ago and everything ran fine. If I'm doing something wrong please can you tell me otherwise if any code needs to be changed please can you do so, so that I can create my diff file from the new code. Many thanks Mandip |
|
From: Mandip S. S. <ma...@su...> - 2002-02-20 17:45:50
|
Hi Erik Myself and David have deleted the patches since they are no longer releva= nt. =A0 However I am preparing several other patches of which I will give you fur= ther=20 details in due course. Regards Mandip > Which patch are you interested in? I believe some of them have already = been > applied, and I fixed the build.xml issue, and the ExampleTest name. > Although the ExampleTest is only a temporary fix. We are going to have = to > rename it to something else. Evidently cvs is not completely case > sensitive, as it won't allow you to remove a file, and then add a file = back > with the same name, only different case. (i..e I removed ExampleTest, a= nd > tried to add ExampleTEST). If we had shell access to the cvs repositor= y we > could easily fix the problem, but sourceforge doesn't allow that. > > -Erik > > >Erik, > > > >>Yes, I did get CVS access working properly. I have made a few update= s, > >>if you do a cvs update you will see them. The main changes were in > >>AbstractDomain where I added a findByExample method. I also added a > >>couple options to the sourcegen class. > > > >Cool, any chance you could apply some of the patches sitting on > > Sourceforge? > > > >>Jonathan, I was just thinking, we should probably have the jrf-devel > >>mailing list get a copy of the e-mail that is sent out when cvs is > >>updated. That would help collaboration across the board, I think. Le= t me > >>know and I'll make the change. > > > >+1 from me. > > > >Dave > > > > > >_______________________________________________ > >jrf-devel mailing list > >jrf...@li... > >https://lists.sourceforge.net/lists/listinfo/jrf-devel > > _______________________________________________ > jrf-devel mailing list > jrf...@li... > https://lists.sourceforge.net/lists/listinfo/jrf-devel |
|
From: Erik T. <ete...@ca...> - 2002-02-20 16:50:07
|
Which patch are you interested in? I believe some of them have already been applied, and I fixed the build.xml issue, and the ExampleTest name. Although the ExampleTest is only a temporary fix. We are going to have to rename it to something else. Evidently cvs is not completely case sensitive, as it won't allow you to remove a file, and then add a file back with the same name, only different case. (i..e I removed ExampleTest, and tried to add ExampleTEST). If we had shell access to the cvs repository we could easily fix the problem, but sourceforge doesn't allow that. -Erik >Erik, > >>Yes, I did get CVS access working properly. I have made a few updates, >>if you do a cvs update you will see them. The main changes were in >>AbstractDomain where I added a findByExample method. I also added a >>couple options to the sourcegen class. > >Cool, any chance you could apply some of the patches sitting on Sourceforge? > >>Jonathan, I was just thinking, we should probably have the jrf-devel >>mailing list get a copy of the e-mail that is sent out when cvs is >>updated. That would help collaboration across the board, I think. Let me >>know and I'll make the change. > >+1 from me. > >Dave > > >_______________________________________________ >jrf-devel mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-devel |
|
From: David W. <da...@su...> - 2002-02-18 19:20:11
|
Erik, > Yes, I did get CVS access working properly. I have made a few updates, > if you do a cvs update you will see them. The main changes were in > AbstractDomain where I added a findByExample method. I also added a > couple options to the sourcegen class. Cool, any chance you could apply some of the patches sitting on Sourceforge? > Jonathan, I was just thinking, we should probably have the jrf-devel > mailing list get a copy of the e-mail that is sent out when cvs is > updated. That would help collaboration across the board, I think. Let > me know and I'll make the change. +1 from me. Dave |
|
From: Erik T. <ete...@ca...> - 2002-02-18 18:45:39
|
Yes, I did get CVS access working properly. I have made a few updates, if you do a cvs update you will see them. The main changes were in AbstractDomain where I added a findByExample method. I also added a couple options to the sourcegen class. Jonathan, I was just thinking, we should probably have the jrf-devel mailing list get a copy of the e-mail that is sent out when cvs is updated. That would help collaboration across the board, I think. Let me know and I'll make the change. -Erik At 05:50 AM 2/18/2002, David Warnock wrote: >Hi Jonathan and everyone else, > >Mandip is finishing the changes to DatabasePolicy as discussed earlier in >the month. > >In another message you said > > >>>> >I've been trying to get CVS access for Erik Tennant so he can make some >changes to the v1 source tree. He may be willing to merge Mandip's stuff >at the same time. If not, I'd be interested in finding someone who is >interested in helping to keep up the V1 source tree. ><<<< > >Q1. Any progress on CVS access for Erik? > >Q2. We (Sundayta as a company, which for JRF at the moment means Mandip or >myself, with 3 other programmers as users). Would be interested in helping >to keep v1 at least until v2 is stable and has all the bits we need in it. > >So, how do you want to proceed with getting the changes Mandip has into v1 >(I guess heading for a new RC in the next week or so). > >We can submit patches but obviously direct CVS access would be easier for us. > >Regards > >Dave > > > >_______________________________________________ >jrf-devel mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-devel |
|
From: David W. <da...@su...> - 2002-02-18 11:49:52
|
Hi Jonathan and everyone else, Mandip is finishing the changes to DatabasePolicy as discussed earlier in the month. In another message you said >>>> I've been trying to get CVS access for Erik Tennant so he can make some changes to the v1 source tree. He may be willing to merge Mandip's stuff at the same time. If not, I'd be interested in finding someone who is interested in helping to keep up the V1 source tree. <<<< Q1. Any progress on CVS access for Erik? Q2. We (Sundayta as a company, which for JRF at the moment means Mandip or myself, with 3 other programmers as users). Would be interested in helping to keep v1 at least until v2 is stable and has all the bits we need in it. So, how do you want to proceed with getting the changes Mandip has into v1 (I guess heading for a new RC in the next week or so). We can submit patches but obviously direct CVS access would be easier for us. Regards Dave |
|
From: Mandip S. S. <ma...@su...> - 2002-02-06 16:35:15
|
Hi Jonathan
I have been using JRF to connect to a Firebird database using the JDBC type 4
driver. There are several areas I would like to discuss and they are as
follows:
1) FirebirdDatabasePolicy.
I have completed the FirebirdDatabasePolicy and found one issue:- Firebird
uses generators as opposed to sequence objects which are fairly similar apart
from the fact that generators are global to the database where they are
declared. This means that when you drop a table that has an associated
generator this generator will not be deleted. At the moment I am manually
deleting generators before dropping tables with the following code:
delete from rdb$generators where rdb$generator_name='GEN_CapitalisedTableName'
I think it would be nice if we could automate this process. Could this be
coded into the DatabasePolicy or would we need to look further into JRF?
Once we decide what needs to be done I would be happy to code the changes
myself.
2) Transactions.
When I began using the FirebirdDatabasePolicy I found that I could not even
create a table and would get the following error:
ERROR com.is.jrf.DatabaseException :: com.is.jrf.DatabaseException is
wrapping java.sql.SQLException: javax.resource.ResourceException: no local
transaction active: can't commit: Exception occurred while ending transaction
in JDBCHelper:
javax.resource.ResourceException: no local transaction active: can't commit
java.sql.SQLException: javax.resource.ResourceException: no local transaction
active: can't commit
at org.firebirdsql.jdbc.FBConnection.commit(Unknown Source)
at com.is.util.sql.JDBCHelper.commit(Unknown Source)
at com.is.util.sql.JDBCHelper.close(Unknown Source)
at com.is.jrf.AbstractDomain.endTransaction(Unknown Source)
at com.is.jrf.AbstractDomain.createTable(Unknown Source)
at com.is.jrf.AbstractDomain.createTable(Unknown Source)
at test.DomainTEST.<init>(Unknown Source)
After inspecting the code I found that the AbstractDomain.endTransaction()
method contains two calls:
aJDBCHelper.endTransaction();
aJDBCHelper.close();
The problem seems to arise from the fact that both methods try to commit and
the first passes okay but as is obvious from the above error the second
doesn't. To overcome this problem I set the i_shouldCommitOnClose parameter
to false with the following code:
boolean commitOnClose = false;
JDBCHelper jdbchelper = (JDBCHelper)i_personDomain.retJDBCHelper();
jdbchelper.setShouldCommitOnClose(commitOnClose);
But then I found that when I tried to do any sort of find operation I got
this error:
ERROR com.is.jrf.AbstractDomain :: RuntimeException in
AbstractDomai#executeSQLQuery.
java.lang.IllegalStateException: Can't destroy managed connection with
active transaction
at org.firebirdsql.jca.FBManagedConnection.destroy(Unknown Source)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.connectionClosed(Unknown
Source)
at org.firebirdsql.jca.FBManagedConnection.notify(Unknown Source)
at org.firebirdsql.jca.FBManagedConnection.close(Unknown Source)
at org.firebirdsql.jdbc.FBConnection.close(Unknown Source)
at com.is.util.sql.JDBCHelper.close(Unknown Source)
at com.is.jrf.AbstractDomain.executeSQLQuery(Unknown Source)
at com.is.jrf.AbstractDomain.findCustom(Unknown Source)
at com.is.jrf.AbstractDomain.find(Unknown Source)
at com.is.jrf.AbstractDomain.findWhere(Unknown Source)
at com.is.jrf.AbstractDomain.finalFind(Unknown Source)
at com.is.jrf.AbstractDomain.find(Unknown Source)
at com.is.jrf.AbstractDomain.find(Unknown Source)
at test.DomainTEST.test030UpdateSequencedKey(Unknown Source)
I then had to set i_shouldCommitOnClose back to true. Although this solved
the problem I am now constantly having to change the value of
i_shouldCommitOnClose when I go from an operation that explicitly begins and
ends a transaction (save, createtable...) to one that doesn't (find,
findAll...) and vice-versa. I would really appreciate you looking into this
problem.
3) Default Column Values.
Refering to the columnDefinitionString(DatabasePolicy) method in the
AbstractColumnSpec class, Firebird requires that a primary key must be
defined with a NOT NULL token whereas the above method does not place a such
a token for a primary key. Also Firebird doesn't seem to like the NULL
token, so that when a column value is supposed to default to null you have to
make sure the NULL token is NOT specified and then Firebird will assume the
column value will default to null. The method now looks like this:
public String columnDefinitionString(DatabasePolicy dbPolicy) {
StringBuffer buffer = new StringBuffer();
buffer.append(i_columnName);
buffer.append(" ");
buffer.append(getSQLColumnType(dbPolicy));
if (this.isRequired()){
buffer.append(" NOT NULL");
}
if (this.isSequencedPrimaryKey()) {
if (dbPolicy.autoIncrementIdentifier() == null) {
buffer.append(" NOT NULL");
}
else {
buffer.append(" ");
buffer.append(dbPolicy.autoIncrementIdentifier());
}
}
return buffer.toString();
}
The method in the above state might not work for other databases because they
might require NULL tokens, so would it be possible to code this change into
the DatabasePolicy or would we need to look further into JRF. Again I would
be happy to code any changes.
4) Booleans Stored As Numeric Values.
Having created a table with a boolean column (actually stored as data type
NUMERIC(1)), I tried to do an insert and got the following error:
ERROR com.is.jrf.DatabaseException :: com.is.jrf.DatabaseException is
wrapping java.sql.SQLException: can't interpret value as boolean: 0: SELECT
Person.PersonId, Person.Name, Person.Age, Person.Wealthy, Person.LastUpdated
FROM Person WHERE Person.PersonId=1:
can't interpret value as boolean: 0
java.sql.SQLException: can't interpret value as boolean: 0
at org.firebirdsql.jdbc.FBResultSet.getBoolean(Unknown Source)
at org.firebirdsql.jdbc.FBResultSet.getBoolean(Unknown Source)
at com.is.util.sql.JDBCHelper.getBoolean(Unknown Source)
at com.is.jrf.BooleanColumnSpec.getColumnValueFrom(Unknown Source)
at
com.is.jrf.AbstractColumnSpec.copyColumnValueToPersistentObject(Unknown
Source)
at com.is.jrf.AbstractDomain.convertToPersistentObject(Unknown Source)
at com.is.jrf.AbstractDomain$1.handleRow(Unknown Source)
at com.is.jrf.AbstractDomain.executeSQLQuery(Unknown Source)
at com.is.jrf.AbstractDomain.findCustom(Unknown Source)
at com.is.jrf.AbstractDomain.find(Unknown Source)
at com.is.jrf.AbstractDomain.findWhere(Unknown Source)
at com.is.jrf.AbstractDomain.finalFind(Unknown Source)
at com.is.jrf.AbstractDomain.save(Unknown Source)
at com.is.jrf.AbstractDomain.save(Unknown Source)
at test.DomainTEST.test010InsertSequencedKey(Unknown Source)
This was caused by the JDBCHelper.getBoolean(String column) method making the
following call:
Boolean returnValue = new Boolean(i_resultSet.getBoolean(column));
I have changed this method so that rather than cast the numeric value as a
boolean straightaway, the code inspects the numeric value and returns the
corresponding boolean as follows:
public Boolean getBoolean(String column)
throws SQLException {
i_columnName = column;
Boolean returnValue = null;
int intValue = i_resultSet.getInt(column);
if (intValue == 0) {
returnValue = Boolean.FALSE;
}
else if (intValue == 1) {
returnValue = Boolean.TRUE;
}
i_columnName = "";
return returnValue;
}
I would be happy to upload this, however I would like your opinion on this
matter first and whether the other getBoolean() methods need to be changed
aswell.
Finally, I'm using Firebird v1.0 RC2, also I have uploaded the
FirebirdDatabasePolicy, so you can replicate the above problems if required
Regards
Mandip
|
|
From: Jonathan C. <jon...@ya...> - 2002-02-05 15:03:14
|
Somehow yesterday I sent this to users.sf.net instead of lists.sf.net... Jonathan -------- Original Message -------- Version 2 will probably be a separate CVS module. Jay Evans is wrapping it up. It looks pretty impressive. I'm just waiting for a zip file from him that we can have inserted into CVS. We'll keep the version 1 source tree out there for people that don't want to mess with converting their package names and such (we're switching them to net.sf.jrf). Many of the classes in v2 will also have different sub-package names because the jrf package just got too large. I've been trying to get CVS access for Erik Tennant so he can make some changes to the v1 source tree. He may be willing to merge Mandip's stuff at the same time. If not, I'd be interested in finding someone who is interested in helping to keep up the V1 source tree. Jonathan David Warnock wrote: > Hi, > > Is there any news of version 2 hitting cvs? > > One reason for me asking is that Mandip has got support for Firebird > pretty much done and it has a few changes to jrf required beyond the > database policy. > > Another reason is because we are about to start a new project and I > want to make decisions about the tools. > > Thanks > > Dave > > > _______________________________________________ > jrf-devel mailing list > jrf...@li... > https://lists.sourceforge.net/lists/listinfo/jrf-devel > -- Jonathan Carlson jon...@us... Minneapolis, Minnesota _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: David W. <da...@su...> - 2002-02-04 18:45:04
|
Hi, Is there any news of version 2 hitting cvs? One reason for me asking is that Mandip has got support for Firebird pretty much done and it has a few changes to jrf required beyond the database policy. Another reason is because we are about to start a new project and I want to make decisions about the tools. Thanks Dave |
|
From: Jonathan C. <jon...@ya...> - 2002-01-17 18:34:43
|
Erik, Thanks for the feedback. > I think there could be a need to act differently based on which type of exception is thrown. I'm leaving all the individual error declarations on the getConnection() method, so if someone wants to get those errors he/she can call that first. I always try to leave a back-door workaround for the odd cases where someone would want to do things differently. Otherwise, the user can also index the message from the SQLException to look for "InstantiationException" or "ClassNotFoundException" to handle the different exceptions differently. I think though, that 95% of the time an exception is an exception (i.e. developers don't handle them differently based on what kind, they just care that there was a serious error) > Also, I would consider removing the 'final' constraints within JDBCHelper. OK > Refactor the validateConnection method Actually, I refactored it into a different hierarchy of classes so people can implement their own ConnectionStrategy class without having to submit changes to JDBCHelper. The main/preferred constructor for JDBCHelper will have a ConnectionStrategy argument. I'd like to get rid of all the different constructors, but we should probably keep them for backward compatibility. Jonathan _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: Erik T. <ete...@ca...> - 2002-01-17 17:01:40
|
Hi Jonathan, I don't really have a strong opinion as to the Exceptions in the throws clause. I think there could be a need to act differently based on which type of exception is thrown, for example if I do a getConnection() and I catch a ClassNotFound exception, my program would be able to provide a message indicating there is a classpath issue. However, I see it's awkward having so many Exceptions thrown, and makes it a little more difficult to use.. so I could see benefits either way. I do have to say that I have been largely impressed with the design of JRF, I think you made some wise choices. Here are a couple ideas for you to consider in your refactoring of JDBCHelper: -Make most, if not all, the private members/methods protected. I don't see a reason JDBCHelper shouldn't be subclassed should someone need to create custom functionality. Also, I would consider removing the 'final' constraints within JDBCHelper. -Refactor the validateConnection method so that each method of obtaining a connection is it's own method (i.e. JNDI lookup, driver instantiation, pool). I actually just ran into an issue this week around this. If you try to retrieve a connection from a weblogic connection pool that doesn't have any connections available, Weblogic throws a weblogic.common.ResourceException instead of just blocking and waiting for a connection. So I need to write code around the connection lookup that will retry a pre-determined amount of times and then fail with an exception if it's still unable to get a connection. With the above refactoring ideas I mentioned, creating these kinds of custom features would be a little easier. -Erik >I want to get some opinions from you. Maybe you have noticed that many of >the JDBCHelper methods have a huge list of exceptions thrown. I am >considering wrapping any non-SQLExceptions in an SQLException (after >logging them, of course). > >It's always bothered me to have such a huge list in the "throws" clauses >of those method signatures. Especially since some of those exceptions >aren't even applicable when accessing the connection via a DataSource >(which only throws SQLException when returning a Connection). > >Any opinions or thoughts? > >Jonathan > >P.S. I'm working on refactoring JDBCHelper. I'll wait to merge with CVS >until after Jay gets his stuff into CVS. > > >_________________________________________________________ >Do You Yahoo!? >Get your free @yahoo.com address at http://mail.yahoo.com > > >_______________________________________________ >jrf-devel mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-devel |