[ openjms-Bugs-891758 ] OpenJMS with Firebird

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #891758, was opened at 2004-02-06 10:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=891758&group_id=54559

Category: persistence
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex M. Schiroky (schiroky)
Assigned to: Jim Alateras (jalateras)
Summary: OpenJMS with Firebird

Initial Comment:
The table "Users" has a column named "password" but 
this is a reserved word for Interbase, so I change the 
name in the create table script for something 
like "passwd" or "passwordx" only to test and the 
OpenJMS have working since it except when some data 
exist in these table. I take a look in your persistence 
layer and found the problem and have a simple solution 
for it.

In the "org.exolab.jms.persistence.Users" class all 
methods use setter's and getter's by index except the 
last "load" method who use them by name, look:

select = connection.prepareStatement("select * from 
users");
set = select.executeQuery();
while (set.next()) {
 	String name = set.getString("username");
 	String password = set.getString("password");
}

To keep the same approach of the other methods and 
works with Firebird, maybe with another one, I apply this 
small change:

select = connection.prepareStatement("select * from 
users");
set = select.executeQuery();
while (set.next()) {
 	String name = set.getString(1);
 	String password = set.getString(2);
}

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=891758&group_id=54559


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.