Hi,
I have BMP that has find methods as shown below. This is unique number
and it is not my primary key. Say I made search on 'Trade', 'AWCL',
'MAC'.
Ok, I get the right results.
I wait till bean overage period.
No matter what I try to search on, I get last search bean first and one
before last second etc.
On my data base I can see that it called and loaded the right results.
What am I doing wrong??
This is on jboss binary download April 25. - JBoss-2.2.1_Tomcat-3.2.1 .
-->public interface CustomerHome {
public Customer findByCustomerNumber(String customerNumber) throws ..;
}
-->CustomerBeanBMP.java<--
public CustomerPK ejbFindByCustomerNumber(String CustomerNmber) throws
...
{
System.out.println(number);
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rest = null;
String query = "select custid from customer where custnum = ?";
CustomerPK pk = null;
conn = this.getConnection();
stmt = conn.prepareStatement(query);
stmt.setString(1,number);
rest = stmt.executeQuery();
if (!rest.next())
throw new ObjectNotFoundException("the key not found
"+number);
else
pk = new CustomerPK(rest.getInt(1));
return pk;
}
Thanks
.anil
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user