RE: [JBoss-user] JBoss 3.2.2 and prepared statement cache

2003-10-28 Thread Martin Vilcans
I don't know whether it's a JBoss bug you've run into, but if you reuse the same prepared statement instead of creating new ones in the loop, I guess you won't experience the problem. You are supposed to reuse prepared statements anyway, something like this: ps =

RE: [JBoss-user] Installing as a windows service

2003-10-15 Thread Martin Vilcans
Use Java Service Wrapper: http://wrapper.sf.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Brian McSweeney Sent: Wednesday, October 15, 2003 11:31 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Installing as a windows service Hi all, I know that

RE: [JBoss-user] commit-option A: CMP fields not updated bug?

2003-10-02 Thread Martin Vilcans
Martin Vilcans wrote: I've got a big problem with commit-option A and CMP beans and it looks like a JBoss bug, but as I haven't found anything about it in the bug tracker or the mailing list, it might be that I'm doing something wrong. The problem is that when I call a CMP setter

Re: [JBoss-user] mbean question

2003-09-25 Thread Martin Vilcans
Change running to an instance variable and set it to false in stopService(). Simply interrupting the thread is not enough as it only interrupts the Thread.sleep call. Check the documentation for Thread.interrupt and InterruptedException for clarification. Declare running as volatile just in

[JBoss-user] commit-option A: CMP fields not updated bug?

2003-09-18 Thread Martin Vilcans
I've got a big problem with commit-option A and CMP beans and it looks like a JBoss bug, but as I haven't found anything about it in the bug tracker or the mailing list, it might be that I'm doing something wrong. The problem is that when I call a CMP setter on a bean with commit-option A, the

[JBoss-user] Single instance entity bean

2003-07-11 Thread Martin Vilcans
Hi! A simple question: How do I create a CMP entity bean with only one instance? I need an entity bean that holds the current date as a week and a day number, stored as two columns in a table with only one row. Since there's only one row in the table, I don't need a primary key. I have created

RE: [JBoss-user] Closing database connections

2003-06-12 Thread Martin Vilcans
This code is no good. It doesn't close the connection and it doesn't close the PreparedStatement. Depending on what toPage does, it might not close the ResultSet either, and even if it does, it's still somewhat ugly to allocate a resource in one place and close it somewhere else. I haven't looked

RE: [JBoss-user] Closing database connections

2003-06-12 Thread Martin Vilcans
Glad to see that I was on the right track. Just one little question. Why do you have two finally blocks in the DAO - can't you close both the statement and the result set in the same finally block? This is because when you close the statement, the result set might not necessarily exists.

RE: [JBoss-user] CMR+EJBQL finder generates invalid SQL

2003-06-10 Thread Martin Vilcans
Vilcans Subject: Re: [JBoss-user] CMR+EJBQL finder generates invalid SQL Hello Martin, please, submit a bug report on it with all this info. If you could also provide a testcase that reproduces this problem that would be great. Thank you, alex Wednesday, June 04, 2003, 6:21:49 PM, Martin

[JBoss-user] CMR+EJBQL finder generates invalid SQL

2003-06-05 Thread Martin Vilcans
it's certainly a possibility. Any ideas? If I remove the CMR relation findByDay() works fine. Martin Vilcans Developer, Jadestone Group AB --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger