jrf-user Mailing List for jRelationalFramework
Brought to you by:
joncrlsn
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(1) |
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(12) |
Feb
(22) |
Mar
(31) |
Apr
(47) |
May
(6) |
Jun
(17) |
Jul
(1) |
Aug
(21) |
Sep
(8) |
Oct
(12) |
Nov
(14) |
Dec
(16) |
| 2002 |
Jan
(34) |
Feb
(16) |
Mar
(9) |
Apr
(8) |
May
(8) |
Jun
(22) |
Jul
(5) |
Aug
(8) |
Sep
|
Oct
(13) |
Nov
(14) |
Dec
(1) |
| 2003 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
|
From: Mark E. <me...@pe...> - 2003-04-11 15:28:36
|
I discovered a bug with connection pooling in JRF 1.6/1.7 and have a fix
for the problem. For the benefit of other JRF users still using version
1.X, I'll give an overview of both the bug and my fix.
The problem is that it's possible for a domain instance that extends
AbstractDomain to use a jdbcHelper already in use by some other domain,
resulting in a conflict and an exception. The fix ensures that only one
domain at a time can use a particular jdbcHelper.
Typically each AbstractDomain instance using pooling will grab a
jdbcHelper from a jdbcHelperPool, do a query, and then release the
jdbcHelper back to the pool. The AbstractDomain instance remembers the
jdbcHelper that it last used by storing it in the field variable
i_jdbcHelper, even after releasing it back to the pool. If you perform
another query using the same AbstractDomain instance, the domain will
try to use that same jdbcHelper under certain circumstances rather than
getting one from the pool. But since that jdbcHelper was returned to
the pool after the previous query, it's possible that some other domain
(i.e. process) in a multi-threaded application already grabbed and is
using it while it's being reused by the first domain. This is the
problem.
You can avoid this conflict by setting jdbcHelper to null in
AbstractDomain after each call to getJDBCHelper() in the public
interface routines. This will force the domain to get a jdbcHelper from
the pool for the next query rather than reusing the previous one. So
for example here is the original code for the routine find(Object
pkOrPersistentObject):
return this.find(pkOrPersistentObject,
this.getJDBCHelper());
And here's the new code:
PersistentObject pObj = this.find(pkOrPersistentObject,
this.getJDBCHelper());
i_jdbcHelper = null;
return pObj;
You'll need to make this change in each of the 12 routines declared
public in AbstractDomain that call getJDBCHelper(). Hope this helps,
Mark Ellis
PeopleAnswers
|
|
From: <lis...@ya...> - 2003-03-18 14:49:07
|
Hi, I don't know if it's correct to write for this address, but I have some doubts about Log4j and JRelational Framework 1.6 Well, I need to know the sql command, because I have to write it in a table in the data base and not in the Too many errors encountered; the rest of the message is ignored: dbcHelper.log. I don't know How can I do this, someone could help me? And other problem is about how to initialize de log4j from a jsp page, using Tomcat4? Because my application read the log4j.properties but when, for example, I call a method findForId() nothing happen, the file jdbcHelper.log continues empty. Thanks. Lissane _______________________________________________________________________ Busca Yahoo! O serviço de busca mais completo da Internet. O que você pensar o Yahoo! encontra. http://br.busca.yahoo.com/ |
|
From: Mr. C. R. <c.r...@fi...> - 2002-12-02 16:11:09
|
Hello, again, I have a problem regarding jrf (thus I'm posting here...isn't it? :)) First, I use mysql w/ tomcat. We've (manually) created a custom *Domain and *Persist objects, containing the join of a 6 tables. Also implemented a custom search which returns the sub-list of a search (using "LIMIT start, end" feature of MySQL). The problem is that I want to retrieve the COUNT(*) for this search...in another words I want to compute the results size of the QUERY, but retrieve only a subset. Please, could someone give me a hint ? Thanks in advance! Cristian. -- ===================== Sincerely, c.r. Phone: +40745133096 alias: cristian at qdrei.de "I program, therefore I exist." ===================== |
|
From: Tom M. <tm...@li...> - 2002-11-26 15:55:12
|
Alix I'm not one of the developers, but I'm an "early adopter" of 2.0. I needed BLOBs, which aren't available in pre 2.0 JRF, and like you, I'm familiar with JRF from a previous project, so this seemed the way to go. There have been a few bugs, but the developers are responding to them rapidly. I looked over the simpleORM site, not really long enough to do a thorough comparison, but I personally like the XML definitions in JRF 2.0. You define your schema in a pretty straightforward XML schema, and then the generation programs build both your database and your objects. You get either an SQL script which you can execute, or the generators send JDBC "create table" statements right to your database. I especially like this kind of "one definition" mode when I'm getting a new design on its feet and have to go back and tweak things. Makes for very rapid development. -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX "Rachel Chew (LME)" wrote: > Hi Guys > Last year our team successfully implemented a web site using JRF on MySql, and am after a break, I find myself in the same position, this time looking at JRF on SAP DB. > > Can anyone (developers?) give me an indication of when version 2.0 beta is likely to become production quality, or any comments on its current stability and performance. > > regards > Alix Jermyn > > PS look at http://www.simpleORM.org for an interesting alternative framework for simple apps - I don't know if this is production quality yet, but it is simple to use. > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > jrf-user mailing list > jrf...@li... > https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Rachel C. (LME) <Rac...@lm...> - 2002-11-23 21:04:20
|
Hi Guys Last year our team successfully implemented a web site using JRF on MySql, and am after a break, I find myself in the same position, this time looking at JRF on SAP DB. Can anyone (developers?) give me an indication of when version 2.0 beta is likely to become production quality, or any comments on its current stability and performance. regards Alix Jermyn PS look at http://www.simpleORM.org for an interesting alternative framework for simple apps - I don't know if this is production quality yet, but it is simple to use. |
|
From: Cinq - G. P. de O. <g.p...@ci...> - 2002-11-22 10:44:18
|
Yes.
I tested some cases, I began with a empty table:
-insert a row: null blob field. (using domain.save)
-insert a row: blob field containing a gif file. (using domain.save)
-use domain.findWhere("BLOB_FIELD IS NULL") to get only the row containing
the null blob.
-use domain.findWhere("BLOB_FIELD IS NOT NULL") to get only the row
containing the blob with a gif file (I saved it to a file).
Update the row(domain.find followed by a domain.save) changing the null blob
to the blob containing a gif file.
I also updated the row containing the non-null blob to a null blob.
All of my tests worked.
Glaucio
----- Original Message -----
From: "Jay" <je...@vm...>
To: "JRF user list" <jrf...@li...>
Sent: Wednesday, November 20, 2002 6:46 PM
Subject: [jrf-user] Nullable blobs
>
> Your fix looks correct to me. I will check in your fix before the end
> of the week. Have you tested saving blobs (e.g. when value is not
> null)?
>
> James Evans
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> Battle your brains against the best in the Thawte Crypto
> Challenge. Be the first to crack the code - register now:
> http://www.gothawte.com/rd521.html
> _______________________________________________
> jrf-user mailing list
> jrf...@li...
> https://lists.sourceforge.net/lists/listinfo/jrf-user
|
|
From: Jay <je...@vm...> - 2002-11-20 21:46:21
|
Your fix looks correct to me. I will check in your fix before the end of the week. Have you tested saving blobs (e.g. when value is not null)? James Evans |
|
From: Thom C. <TCa...@ps...> - 2002-11-20 21:15:33
|
We had a similar problem on Oracle. A solution that worked for us was to set the default value for the blob field to be "empty_blob()", which is distinctly different from <null>, and everything was happy. I do not know if this is a common function available in other databases, so yours would definitely be a more universal approach. Thom >>> "Cinq - Glaucio Polzin de Oliveira" <g.p...@ci...> 11/19/2002 9:29:12 PM >>> Hi, I was using Blobs with JRF and MySql. I had problems when my blob column was nullable (new NullableColumnOption() in my setup method). When it is null and I tried to save it, I got a NullPointerException. It happened because the method getColumnValueFrom in the net.sf.jrf.column.columnspecs.BlobColumnSpec class was not testing if the BlobWrapper is null or not: BlobWrapper b = (BlobWrapper) value; b.storeData(stmt, position, super.i_sqlType); when b is null, I get a NullPointerException. I've found a very simple solution: verify if b is not null: BlobWrapper b = (BlobWrapper) value; if (b != null) b.storeData(stmt, position, super.i_sqlType); else stmt.setNull(position, null, super.i_sqlType); I did the same thing when this is selected from the database in the getColumnValueFrom from the same class: Blob value = jrfResultSet.getBlob(this.getColumnIdx()); return (value == null ? null : new BlobWrapper(value)); Am I wrong? Did someone have this problem? I am using the 'IBM Websphere Studio Application Developer' to program. Thanks Glaucio __________________________________ Cinq Technologies - http://www.cinq.com.br ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ jrf-user mailing list jrf...@li... https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Cinq - G. P. de O. <g.p...@ci...> - 2002-11-20 01:29:31
|
<P>Hi,</P> <P>I was using Blobs with JRF and MySql. I had problems when my blob column was nullable (new NullableColumnOption() in my setup method).<BR>When it is null and I tried to save it, I got a NullPointerException. It happened because the method getColumnValueFrom in the net.sf.jrf.column.columnspecs.BlobColumnSpec class was not testing if the BlobWrapper is null or not:</P> <P>BlobWrapper b = (BlobWrapper) value;<BR>b.storeData(stmt, position, super.i_sqlType);</P> <P>when b is null, I get a NullPointerException.</P> <P><BR>I've found a very simple solution: verify if b is not null:</P> <P>BlobWrapper b = (BlobWrapper) value;<BR>if (b != null)<BR> b.storeData(stmt, position, super.i_sqlType);<BR>else<BR> stmt.setNull(position, null, super.i_sqlType);</P> <P><BR>I did the same thing when this is selected from the database in the getColumnValueFrom from the same class:</P> <P>Blob value = jrfResultSet.getBlob(this.getColumnIdx());<BR>return (value == null ? null : new BlobWrapper(value));</P> <P><BR>Am I wrong? Did someone have this problem?</P> <P>I am using the 'IBM Websphere Studio Application Developer' to program.</P> <P>Thanks</P> <P><BR>Glaucio</P><br> <br> __________________________________<br> Cinq Technologies - http://www.cinq.com.br<br> |
|
From: Tom M. <tm...@li...> - 2002-11-18 22:24:26
|
I tried your patch. It did seem to get the insertOnly field set properly. The
update SQL gets created properly, omitting the field. However, when I trace
through the framework, invariably, the date_created gets updated along with the
other fields! I'm stumped.
So have you tested for results Darren? Is it working for you? What version of
JRF and what database are you using? I'm using JRF 2.0b4 and mySQL 4.0.3.
Jay, if you're reading the mail, do you have any suggestions?
Thanks
--
Tom Miller
Miller Associates, Inc.
tm...@li...
641.469.3535 Phone
413.581.6326 FAX
Darren Senel wrote:
> FYI,
>
> The TimeStampColumnSpecDbGen.setInsertOnly() does not seem to work. We
> had to do a
> code modification to UpdateSQLBuilder.java to correct the issue (we did
> this on Friday
> last week and so have not submitted this change to the message board
> yet).
>
> The problem lies in the fact that the UpdateSQLBuilder does not take
> any notice of the
> TimeStampColumnSpecDbGen.setInsertOnly() value when building update
> statements.
>
> For anyone that is interested our updated code is shown below (this was
> a quick fix and
> may not be the best solution).....
>
> private String buildSQL(boolean prepared,
> PersistentObject aPO,
> String tableName,
> List columnSpecs)
> {
> ColumnSpec aColumnSpec = null;
> ColumnSpec pkColumnSpec = null;
> ColumnSpec lockingColumnSpec = null;
>
> checkPolicy();
>
> StringBuffer sqlBuffer = new StringBuffer();
> sqlBuffer.append(" UPDATE ");
> sqlBuffer.append(tableName);
> sqlBuffer.append(" SET ");
> int count = 0;
> // Create an assignment expression for each column
> boolean isInsertOnly = false;
> Iterator iterator = columnSpecs.iterator();
> while (iterator.hasNext())
> {
> isInsertOnly = false;
> aColumnSpec = (ColumnSpec) iterator.next();
> if (aColumnSpec.isPrimaryKey())
> {
> pkColumnSpec = aColumnSpec;// save for later
> }
> else
> {// not a primary key
> if (aColumnSpec instanceof TimestampColumnSpecDbGen)
> {
> isInsertOnly =
> ((TimestampColumnSpecDbGen)aColumnSpec).isInsertOnly();
> }
>
> if (!isInsertOnly)
> {
>
> if (count > 0)
> {// BUG Fix -- PK may not be the first column in the
> list.
> sqlBuffer.append(", ");
> }
> count++;
>
> sqlBuffer.append(
> aColumnSpec.getColumnName());
> sqlBuffer.append(" = ");
> if (aColumnSpec.isOptimisticLock())
> {
> lockingColumnSpec = aColumnSpec;// save for later
> if (aColumnSpec instanceof
> TimestampColumnSpecDbGen)
> {
>
> sqlBuffer.append(i_dbPolicy.timestampFunction());
> }
> else
> {// Assume it's an IntegerColumnSpec
>
> if (prepared)
> {
> sqlBuffer.append("?");
> }
> else
> {
> Integer oldVersion = (Integer)
> aColumnSpec.getValueFrom(aPO);
>
> sqlBuffer.append(aColumnSpec.formatForSql(getNewOptimIntColumn(oldVersion),
> i_dbPolicy));
> }
> }
> }
> else
> {// it's not an optimistic lock
>
> // If this is a time stamp column that is only
> // stamped on insert, it is NEVER part of an update
> statement,
> // so skip it.
> if (aColumnSpec instanceof
> TimestampColumnSpecDbGen)
> {
> TimestampColumnSpecDbGen tc =
> (TimestampColumnSpecDbGen) aColumnSpec;
> if (tc.isInsertOnly())
> {
> continue;
> }
> }
> if (prepared)
> {
>
> sqlBuffer.append(aColumnSpec.getPreparedSqlValueString(false,
> i_dbPolicy,
> i_domain.getSequenceName(),
> i_domain.getTableName()));
> }
> else
> {
> sqlBuffer.append(
> aColumnSpec.getSqlValueFrom(aPO,
> i_dbPolicy));
> }
> }
> }
> }// else not a primary key
> }// while
> // Create the WHERE clause
> sqlBuffer.append(" WHERE ");
> if (prepared)
> {
> if (pkColumnSpec == null)
> {
> throw new RuntimeException(
> "CRITICAL error: " + tableName + " has no primary
> key column spec." + sqlBuffer.toString());
> }
>
> sqlBuffer.append(pkColumnSpec.buildPreparedWhereClause(tableName));
> }
> else
> {
> sqlBuffer.append(
> pkColumnSpec.buildWhereClause(aPO,
> ColumnSpec.EQUALS,
> tableName,
> i_dbPolicy));
> }
> // Append to WHERE statement if we have an optimistic lock.
> if (lockingColumnSpec != null)
> {
> // If object was changed (probably by someone else) since
> last being
> // read, this will prevent the update from occurring.
> sqlBuffer.append(" AND ");
> sqlBuffer.append(
>
> lockingColumnSpec.getFullyQualifiedColumnName(tableName));
> sqlBuffer.append(" = ");
> if (prepared)
> {
> sqlBuffer.append(" ? ");
> }
> else
> {
> sqlBuffer.append(
> lockingColumnSpec.getSqlValueFrom(aPO,
> i_dbPolicy));
> }
> }
> return sqlBuffer.toString();
> }// buildSQL(PersistentObject)
>
> >>> Tom Miller <tm...@li...> 11/15/02 11:11PM >>>
> I would like to know the relationship between
> AbstractColumnSpec.writeOnce() in the JRFBaseSchema.dtd used to
> generate
> database objects and SQL, and
> TimeStampColumnSpecDbGen.setInsertOnly().
>
> It appears that these are intended to do the same thing, that is,
> write
> a column only on insert, such as a date created Timestamp (which is
> what
> I want to do).
>
> writeOnce is a boolean in
> net.sf.jrf.domain.PersistentObjectDynaProperty, so I assume it only
> applies if one is using Dynabeans. It does not seem to do anything on
> standard domains.
>
> I think what may be missing is an insertOnly attribute for Column in
> JRFBaseSchema, and then the code in BaseGenerator to supply
> setInsertOnly for the column in the generated domain. Or is there some
> other explanation?
|
|
From: Darren S. <DS...@ps...> - 2002-11-18 14:39:19
|
FYI,
The TimeStampColumnSpecDbGen.setInsertOnly() does not seem to work. We
had to do a
code modification to UpdateSQLBuilder.java to correct the issue (we did
this on Friday
last week and so have not submitted this change to the message board
yet).
The problem lies in the fact that the UpdateSQLBuilder does not take
any notice of the
TimeStampColumnSpecDbGen.setInsertOnly() value when building update
statements.
For anyone that is interested our updated code is shown below (this was
a quick fix and
may not be the best solution).....
private String buildSQL(boolean prepared,
PersistentObject aPO,
String tableName,
List columnSpecs)
{
ColumnSpec aColumnSpec = null;
ColumnSpec pkColumnSpec = null;
ColumnSpec lockingColumnSpec = null;
checkPolicy();
StringBuffer sqlBuffer = new StringBuffer();
sqlBuffer.append(" UPDATE ");
sqlBuffer.append(tableName);
sqlBuffer.append(" SET ");
int count = 0;
// Create an assignment expression for each column
boolean isInsertOnly = false;
Iterator iterator = columnSpecs.iterator();
while (iterator.hasNext())
{
isInsertOnly = false;
aColumnSpec = (ColumnSpec) iterator.next();
if (aColumnSpec.isPrimaryKey())
{
pkColumnSpec = aColumnSpec;// save for later
}
else
{// not a primary key
if (aColumnSpec instanceof TimestampColumnSpecDbGen)
{
isInsertOnly =
((TimestampColumnSpecDbGen)aColumnSpec).isInsertOnly();
}
if (!isInsertOnly)
{
if (count > 0)
{// BUG Fix -- PK may not be the first column in the
list.
sqlBuffer.append(", ");
}
count++;
sqlBuffer.append(
aColumnSpec.getColumnName());
sqlBuffer.append(" = ");
if (aColumnSpec.isOptimisticLock())
{
lockingColumnSpec = aColumnSpec;// save for later
if (aColumnSpec instanceof
TimestampColumnSpecDbGen)
{
sqlBuffer.append(i_dbPolicy.timestampFunction());
}
else
{// Assume it's an IntegerColumnSpec
if (prepared)
{
sqlBuffer.append("?");
}
else
{
Integer oldVersion = (Integer)
aColumnSpec.getValueFrom(aPO);
sqlBuffer.append(aColumnSpec.formatForSql(getNewOptimIntColumn(oldVersion),
i_dbPolicy));
}
}
}
else
{// it's not an optimistic lock
// If this is a time stamp column that is only
// stamped on insert, it is NEVER part of an update
statement,
// so skip it.
if (aColumnSpec instanceof
TimestampColumnSpecDbGen)
{
TimestampColumnSpecDbGen tc =
(TimestampColumnSpecDbGen) aColumnSpec;
if (tc.isInsertOnly())
{
continue;
}
}
if (prepared)
{
sqlBuffer.append(aColumnSpec.getPreparedSqlValueString(false,
i_dbPolicy,
i_domain.getSequenceName(),
i_domain.getTableName()));
}
else
{
sqlBuffer.append(
aColumnSpec.getSqlValueFrom(aPO,
i_dbPolicy));
}
}
}
}// else not a primary key
}// while
// Create the WHERE clause
sqlBuffer.append(" WHERE ");
if (prepared)
{
if (pkColumnSpec == null)
{
throw new RuntimeException(
"CRITICAL error: " + tableName + " has no primary
key column spec." + sqlBuffer.toString());
}
sqlBuffer.append(pkColumnSpec.buildPreparedWhereClause(tableName));
}
else
{
sqlBuffer.append(
pkColumnSpec.buildWhereClause(aPO,
ColumnSpec.EQUALS,
tableName,
i_dbPolicy));
}
// Append to WHERE statement if we have an optimistic lock.
if (lockingColumnSpec != null)
{
// If object was changed (probably by someone else) since
last being
// read, this will prevent the update from occurring.
sqlBuffer.append(" AND ");
sqlBuffer.append(
lockingColumnSpec.getFullyQualifiedColumnName(tableName));
sqlBuffer.append(" = ");
if (prepared)
{
sqlBuffer.append(" ? ");
}
else
{
sqlBuffer.append(
lockingColumnSpec.getSqlValueFrom(aPO,
i_dbPolicy));
}
}
return sqlBuffer.toString();
}// buildSQL(PersistentObject)
>>> Tom Miller <tm...@li...> 11/15/02 11:11PM >>>
I would like to know the relationship between
AbstractColumnSpec.writeOnce() in the JRFBaseSchema.dtd used to
generate
database objects and SQL, and
TimeStampColumnSpecDbGen.setInsertOnly().
It appears that these are intended to do the same thing, that is,
write
a column only on insert, such as a date created Timestamp (which is
what
I want to do).
writeOnce is a boolean in
net.sf.jrf.domain.PersistentObjectDynaProperty, so I assume it only
applies if one is using Dynabeans. It does not seem to do anything on
standard domains.
I think what may be missing is an insertOnly attribute for Column in
JRFBaseSchema, and then the code in BaseGenerator to supply
setInsertOnly for the column in the generated domain. Or is there some
other explanation?
--
Tom Miller
Miller Associates, Inc.
tm...@li...
641.469.3535 Phone
413.581.6326 FAX
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
jrf-user mailing list
jrf...@li...
https://lists.sourceforge.net/lists/listinfo/jrf-user
|
|
From: Tom M. <tm...@li...> - 2002-11-16 04:11:33
|
I would like to know the relationship between AbstractColumnSpec.writeOnce() in the JRFBaseSchema.dtd used to generate database objects and SQL, and TimeStampColumnSpecDbGen.setInsertOnly(). It appears that these are intended to do the same thing, that is, write a column only on insert, such as a date created Timestamp (which is what I want to do). writeOnce is a boolean in net.sf.jrf.domain.PersistentObjectDynaProperty, so I assume it only applies if one is using Dynabeans. It does not seem to do anything on standard domains. I think what may be missing is an insertOnly attribute for Column in JRFBaseSchema, and then the code in BaseGenerator to supply setInsertOnly for the column in the generated domain. Or is there some other explanation? -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |
|
From: Tom M. <tm...@li...> - 2002-11-12 14:42:38
|
This fix did not compile, as getAutoCommit() is not a method of "c" a JRFConnection. getAutoCommit() is a method of SimplePooledConnection. What to do? I have learned the mySQL defaults to autocommit being on. That can be turned off with a SQL statement, but is that the thing to do, or some other fix? Thanks Tom Miller Jay wrote: > I will eventually check the JDBC specification to see if it is > appropriate for a driver to throw an exception for calling commit on an > auto-commit connection. > > Please change the following at line 132 in JRFWriteTransaction.java: > > Replace: > > if (!c.isConnectionOpen()) > > with > if (!c.isConnectionOpen() || !c.getAutoCommit()) > > This will stop commit() from being called. > If this fix works, let me know and I will check in the change. > > Thank you, > J Evans > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > jrf-user mailing list > jrf...@li... > https://lists.sourceforge.net/lists/listinfo/jrf-user -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |
|
From: Tom M. <tm...@li...> - 2002-11-06 23:23:22
|
Jay Thanks a lot, this got me going. I'm jazzed, I like this way of developing a schema. I have a question about a key in the example properties file for GenerateDatabase. What does "INITIALLY DEFERRED" mean? Does it mean that at present there is not a mechanism for further specifying sql for foreign keys? AdditionalForeignKeyInfo=INITIALLY DEFERRED -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX Jay wrote: > Thank you for your comments on GenerateDatabase. Your message pointed > out to me that I neglected to add the storage key elements to > JRFBaseSchema.dtd (I am not currently using > table/index/sequence-specific > storage parameters for my applications) and neglected to provide > complete documentation in > GenerateDatabase.java. This morning I have attempted to correct these > shortcomings and checked in new versions of JRFBaseSchema.dtd and > GenerateDatabase.java to CVS. Run an anonymous CVS checkout > of jrf2 to see the changes. > > Specifically, these changes were made: > > JRFBaseSchema.dtd: > > 1. Better comments for interfaces. > 2. Comments added for indexes. > 3. Added tableStorageKey and sequenceStorageKey. > > GenerateDatabase.java: > > 1. Added allowScriptComments to allow a generation of > an SQL create script without slash-star comments. > 2. Use 'tableStorageKey' for table storage element, thus matching > DTD. > 3. Javadoc overhaul. > > A complete example still needs to be provided in the test > area for running GenerateDatabase. This task will eventually be > done. > > Thanks again for your interest. Please feel free to offer any other > comments for improving this program. > > J Evans > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > jrf-user mailing list > jrf...@li... > https://lists.sourceforge.net/lists/listinfo/jrf-user -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |
|
From: Jay <je...@vm...> - 2002-11-06 14:43:08
|
I will eventually check the JDBC specification to see if it is appropriate for a driver to throw an exception for calling commit on an auto-commit connection. Please change the following at line 132 in JRFWriteTransaction.java: Replace: if (!c.isConnectionOpen()) with if (!c.isConnectionOpen() || !c.getAutoCommit()) This will stop commit() from being called. If this fix works, let me know and I will check in the change. Thank you, J Evans |
|
From: Jay <je...@vm...> - 2002-11-06 14:33:08
|
Thank you for your comments on GenerateDatabase. Your message pointed
out to me that I neglected to add the storage key elements to
JRFBaseSchema.dtd (I am not currently using
table/index/sequence-specific
storage parameters for my applications) and neglected to provide
complete documentation in
GenerateDatabase.java. This morning I have attempted to correct these
shortcomings and checked in new versions of JRFBaseSchema.dtd and
GenerateDatabase.java to CVS. Run an anonymous CVS checkout
of jrf2 to see the changes.
Specifically, these changes were made:
JRFBaseSchema.dtd:
1. Better comments for interfaces.
2. Comments added for indexes.
3. Added tableStorageKey and sequenceStorageKey.
GenerateDatabase.java:
1. Added allowScriptComments to allow a generation of
an SQL create script without slash-star comments.
2. Use 'tableStorageKey' for table storage element, thus matching
DTD.
3. Javadoc overhaul.
A complete example still needs to be provided in the test
area for running GenerateDatabase. This task will eventually be
done.
Thanks again for your interest. Please feel free to offer any other
comments for improving this program.
J Evans
|
|
From: Tom M. <tm...@li...> - 2002-11-04 18:36:42
|
I've had good luck with the BaseGenerator in 2.0b4. Thanks for a great utility! Is GenerateDatabase using the DbStorage dtd working in 2.0b4? I've been reading the javadoc, source code and dtd, but I think I need to see an example of a brief but working xml file. Does anyone have one? I'm unclear on some of the terminology used with GenerateDatabase and DbStorage. What is meant by a "database storage parameter"? I'm sure this is not really difficult, but an example would be worth a thousand words. I really like the concepts and facilities in these code generation tools. I'll be very grateful for any help. -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |
|
From: Tom M. <tm...@li...> - 2002-10-31 22:40:34
|
Aha, found a clue myself, but I still don't understand what's going on. In my jrf.properties file I have commitAndRollbackSupported and INNODB turned off. But in net.sf.jrf.sql.DataSourceProperties, commitAndRollbackSupported defaults to true where the boolean is defined and in the constructor itself. When I default it to false, my update works. Does this mean that the code is set up to be using commitAndRollbackSupported, overriding whatever may be in the jrf.properties file? Can mysql be made to use commitAndRollback by using INNODB? So, not sure what's going on here. Would appreciate any insight. Thanks Tom Miller Tom Miller wrote: > Hello list > > Just installed 2.0beta4 on Windoze, everything compiles fine. > > I'm running mysql, not supporting commitAndRollbackSupported and not > using INNODB. I keep getting the following on a simple update: > > Can't call commit when autocommit=true > at > net.sf.jrf.sql.JRFWriteTransaction$TransactionCompleter.run(JRFWriteTransaction.java:175) > > at > net.sf.jrf.sql.JRFWriteTransaction.runComplete(JRFWriteTransaction.java:94) > > at > net.sf.jrf.sql.JRFWriteTransaction.endTransaction(JRFWriteTransaction.java:87) > > at net.sf.jrf.domain.AbstractDomain.update(AbstractDomain.java:4055) > at net.sf.jrf.domain.AbstractDomain.save(AbstractDomain.java:3983) > at com.mai.sdocs.TestSdocs.saveDoc(TestSdocs.java:130) > at com.mai.sdocs.TestSdocs.main(TestSdocs.java:41) > > Any clues? > > Thanks in advance. > -- > Tom Miller > Miller Associates, Inc. > tm...@li... > 641.469.3535 Phone > 413.581.6326 FAX |
|
From: Tom M. <tm...@li...> - 2002-10-31 22:28:05
|
Hello list Just installed 2.0beta4 on Windoze, everything compiles fine. I'm running mysql, not supporting commitAndRollbackSupported and not using INNODB. I keep getting the following on a simple update: Can't call commit when autocommit=true at net.sf.jrf.sql.JRFWriteTransaction$TransactionCompleter.run(JRFWriteTransaction.java:175) at net.sf.jrf.sql.JRFWriteTransaction.runComplete(JRFWriteTransaction.java:94) at net.sf.jrf.sql.JRFWriteTransaction.endTransaction(JRFWriteTransaction.java:87) at net.sf.jrf.domain.AbstractDomain.update(AbstractDomain.java:4055) at net.sf.jrf.domain.AbstractDomain.save(AbstractDomain.java:3983) at com.mai.sdocs.TestSdocs.saveDoc(TestSdocs.java:130) at com.mai.sdocs.TestSdocs.main(TestSdocs.java:41) Any clues? Thanks in advance. -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |
|
From: Bradley M. H. <bh...@ar...> - 2002-10-28 20:09:54
|
Sorry, it's Monday. I didn't think to examine the stack trace. After = examining the stack trace, I found the problem. The default value I was = passing was "DEFAULT_TO_ZERO". I should have been passing "new = BigDecimal(BigInteger.ZERO)" as the default value. I'm all set now. = Again I apologize for my lack of investigation. Brad Handy -----Original Message----- From: Erik Tennant [mailto:ete...@ca...] Sent: Monday, October 28, 2002 2:47 PM To: Bradley M. Handy; jrf...@li... Subject: Re: [jrf-user] Informix Money Datatype Can you show a copy of the stack trace you get using the = BigDecimalColumnSpec? At 11:46 AM 10/28/2002, Bradley M. Handy wrote: >I'm having a problem with the Informix "Money" datatype. According to = the >JDBC driver documentation from Informix, the "money" datatype is = supposed >to be returned as a java.math.BigDecimal. However, when I use >com.is.jrf.BigDecimalColumnSpec as the column spec I get a >ClassCastException, because JRF is interpreting it as an Integer = instead. > >I've run some tests and have determined it is not Informix's driver, = which >was my first thought. I've created a work around class for this, but I >was wondering if anyone had any thoughts as to what the problem might = be >whether it's on my end our JRF's end. > >I'm using JRF 1.7. > >Bradley M. Handy >Programmer/Analyst >Spring Arbor University > >mailto:bh...@ar... > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >jrf-user mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Erik T. <ete...@ca...> - 2002-10-28 19:49:45
|
Can you show a copy of the stack trace you get using the BigDecimalColumnSpec? At 11:46 AM 10/28/2002, Bradley M. Handy wrote: >I'm having a problem with the Informix "Money" datatype. According to the >JDBC driver documentation from Informix, the "money" datatype is supposed >to be returned as a java.math.BigDecimal. However, when I use >com.is.jrf.BigDecimalColumnSpec as the column spec I get a >ClassCastException, because JRF is interpreting it as an Integer instead. > >I've run some tests and have determined it is not Informix's driver, which >was my first thought. I've created a work around class for this, but I >was wondering if anyone had any thoughts as to what the problem might be >whether it's on my end our JRF's end. > >I'm using JRF 1.7. > >Bradley M. Handy >Programmer/Analyst >Spring Arbor University > >mailto:bh...@ar... > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >jrf-user mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Bradley M. H. <bh...@ar...> - 2002-10-28 17:46:49
|
I'm having a problem with the Informix "Money" datatype. According to = the JDBC driver documentation from Informix, the "money" datatype is = supposed to be returned as a java.math.BigDecimal. However, when I use = com.is.jrf.BigDecimalColumnSpec as the column spec I get a = ClassCastException, because JRF is interpreting it as an Integer = instead. I've run some tests and have determined it is not Informix's driver, = which was my first thought. I've created a work around class for this, = but I was wondering if anyone had any thoughts as to what the problem = might be whether it's on my end our JRF's end. I'm using JRF 1.7. Bradley M. Handy Programmer/Analyst Spring Arbor University mailto:bh...@ar... |
|
From: Erik T. <ete...@ca...> - 2002-10-22 17:08:03
|
Sorry, that was only part of what I meant to say.. Check in DomainTEST.java, under test920TestBlob, to see an example of blob usage. Also, you can peruse the file for things like BlobHandler to get a feel for what it's doing. At 11:57 AM 10/22/2002, Erik Tennant wrote: >I haven't really used blobs in an application from Jrf 2.0, but there is >an example under source/test/TestBlob.java (and TestBlobDomain.java). If >that isn't enough to get you started maybe someone else who has used them >could provide some more information. > >-Erik > > >At 11:44 AM 10/22/2002, Tom Miller wrote: >>Can anyone supply a snippet or steps for saving a domain object >>containing a BLOB column in 2.0? I'm unclear about how to use the >>storeData() method of BlobWrapper. >> >>Thanks in advance! >>-- >>Tom Miller >>Miller Associates, Inc. >>tm...@li... >>641.469.3535 Phone >>413.581.6326 FAX >> >> >> >> >>------------------------------------------------------- >>This sf.net emial is sponsored by: Influence the future >>of Java(TM) technology. Join the Java Community >>Process(SM) (JCP(SM)) program now. >>http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote >>_______________________________________________ >>jrf-user mailing list >>jrf...@li... >>https://lists.sourceforge.net/lists/listinfo/jrf-user > > > >------------------------------------------------------- >This sf.net emial is sponsored by: Influence the future of Java(TM) >technology. Join the Java Community Process(SM) (JCP(SM)) program now. >http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote >_______________________________________________ >jrf-user mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Erik T. <ete...@ca...> - 2002-10-22 17:00:07
|
I haven't really used blobs in an application from Jrf 2.0, but there is an example under source/test/TestBlob.java (and TestBlobDomain.java). If that isn't enough to get you started maybe someone else who has used them could provide some more information. -Erik At 11:44 AM 10/22/2002, Tom Miller wrote: >Can anyone supply a snippet or steps for saving a domain object >containing a BLOB column in 2.0? I'm unclear about how to use the >storeData() method of BlobWrapper. > >Thanks in advance! >-- >Tom Miller >Miller Associates, Inc. >tm...@li... >641.469.3535 Phone >413.581.6326 FAX > > > > >------------------------------------------------------- >This sf.net emial is sponsored by: Influence the future >of Java(TM) technology. Join the Java Community >Process(SM) (JCP(SM)) program now. >http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote >_______________________________________________ >jrf-user mailing list >jrf...@li... >https://lists.sourceforge.net/lists/listinfo/jrf-user |
|
From: Tom M. <tm...@li...> - 2002-10-22 16:45:01
|
Can anyone supply a snippet or steps for saving a domain object containing a BLOB column in 2.0? I'm unclear about how to use the storeData() method of BlobWrapper. Thanks in advance! -- Tom Miller Miller Associates, Inc. tm...@li... 641.469.3535 Phone 413.581.6326 FAX |