Re: [JBoss-user] WARN [...] what they mean...

2003-07-07 Thread Magesh Prabhu


On 7/6/03 5:09 PM, Adrian Brock [EMAIL PROTECTED] wrote:
On Sun, 2003-07-06 at 16:40, Magesh Prabhu wrote:

 I could'nt understand this Adrian, I'm using Oracle 8.1.6 database 
with the following datasource configuration:
 
 datasources
   local-tx-datasource
 jndi-nameOracleDS/jndi-name
 connection-urljdbc:oracle:thin:@193.16.18.126:1521:clipper/connection-url
 driver-classoracle.jdbc.driver.OracleDriver/driver-class
 user-nametest/user-name
 passwordtest/password
 
 exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter/exception-sorter-class-name
   /local-tx-datasource
 /datasources
 
 Could you please give more explanation on your comment.. Should 
my jdbc driver support this prepare() method  My transaction 
is all Container managed and I run on Commit Option 'B'
 

You need the xa datasource for prepare()


When I'm not using an xa datasource why is it expecting for a  prepare(); My app 
does'nt involve any XA datasource. In fact, the configuration above is the only 
datasource configured for my app.



 
  2)  WARN  [WrappedConnection] Closing a statement you left open, 

 please do your own housekeeping
  
 
 You are not closing a statement. Closing a pooled connection
 just returns the connection to the pool.

 
 In all my Entity Beans, I have this following code to clean up 
the resources they use and I've double checked all my beans so that 
they dont leave any connections open.
 
 private void releaseResources(ResultSet rs, Statement stmt, Connection
 conn) {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 
if (stmt != null) {
try {
stmt.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 }

JBoss disagrees with you.

Maybe you have:

Statement stmt = conn.prepareStatement(...);
...
stmt = conn.prepareStatement(...);
...
releaseResources(rs, stmt, conn);

The first statement won't be closed.

Or maybe your releaseResources is not in a finally block.


Thanks for your advice on this, I will double check my app again.



-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





**
This email and its attachments are intended for the above 
named only and may be confidential.  If they have come to 
you in error, you must take no action based on them, nor 
must you copy or show them to anyone; please reply to this 
email and highlight the error.
Security Warning: Please note that this email has been 
created in the knowledge that the internet email is not a 
100% secure communications medium.  We advise that you 
understand and observe this lack of security when emailing us.
Viruses:  Although we have taken steps to ensure that this 
email and attachments are free from any virus, we advise 
that in keeping with good computing practice the recipient 
should ensure they are actually virus free.
If you have received this email in error please notify:
[EMAIL PROTECTED]
**



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] WARN [...] what they mean...

2003-07-07 Thread Adrian Brock
On Mon, 2003-07-07 at 08:33, Magesh Prabhu wrote:
 On 7/6/03 5:09 PM, Adrian Brock [EMAIL PROTECTED] wrote:
 On Sun, 2003-07-06 at 16:40, Magesh Prabhu wrote:
 
 You need the xa datasource for prepare()
 
 
 When I'm not using an xa datasource why is it expecting for a  prepare(); My app 
 does'nt involve any XA datasource. In fact, the configuration above is the only 
 datasource configured for my app.
 

You are using an MDB. You have two resources in the same transaction:
The JMS session and the DB connection. This does two phase commit,
prepare/commit.
 
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] WARN [...] what they mean...

2003-07-07 Thread Danny . Yates
Interesting!

The warning message is pretty annoying (if, for example, you don't
want to/can't shell out for Sybase's Distributed Transaction Manager,
or if you're using the built-in Hypersonic db). Could there be a
config option (presumably as part of the MDB/MDB containter config)
to turn the warning off?

Dan.

-- 
Danny Yates
 


-Original Message-
From: Adrian Brock [mailto:[EMAIL PROTECTED] 
Sent: 07 July 2003 10:27
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] WARN [...] what they mean...


On Mon, 2003-07-07 at 09:45, [EMAIL PROTECTED] wrote:
 Hi Adrian,
 
 Does your statement imply that any work done either directly or
 indirectly by an MDB (such as, for example, accessing Entity Beans)
 requries an XA datasource?
 

I would use should rather than requires.

If you want the acknowledgement of the message receipt to be in sync
with the db commit, yes.
Of course, you can use BMT to separate them into two different
transactions or just ignore the warning about the prepare() on local.

 Rgds,
 
 Dan.
 
 -- 
 Danny Yates
  
 
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


_ 
Notice to recipient: 
The information in this internet e-mail and any attachments is confidential
and may be privileged. It is intended solely for the addressee. If you are
not the intended addressee please notify the sender immediately by
telephone. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. 

When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity. 

If this email originates from the U.K. please note that Bank of America,
N.A., London Branch, Banc of America Securities Limited and Banc of America
Futures Incorporated are regulated by the Financial Services Authority.
_ 




---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] WARN [...] what they mean...

2003-07-07 Thread Sacha Labourey
Simply change log4j configuration to turn off this specific message.

Cheers,


sacha

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 [EMAIL PROTECTED]
 Sent: lundi, 7. juillet 2003 11:37
 To: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] WARN [...] what they mean...
 
 
 Interesting!
 
 The warning message is pretty annoying (if, for example, you don't
 want to/can't shell out for Sybase's Distributed Transaction Manager,
 or if you're using the built-in Hypersonic db). Could there be a
 config option (presumably as part of the MDB/MDB containter config)
 to turn the warning off?
 
 Dan.





---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] WARN [...] what they mean...

2003-07-07 Thread Adrian Brock
On Mon, 2003-07-07 at 10:32, Marek Lange wrote:
 [EMAIL PROTECTED] wrote:
  Hi Adrian,
  
  Does your statement imply that any work done either directly or
  indirectly by an MDB (such as, for example, accessing Entity Beans)
  requries an XA datasource?
 
 I asked the same question some weeks ago and David replied:
 
 I don't know what the Oracle error means, but you do not need an xa
 datasource for jbossmq xa.  In fact the jbossmq xa jdbc connections are set
 to autocommit while in use by jbossmq, as it handles transactions
 independently of the database.
 
 Can someone clarify?
 

You are talking about something else.

That is the jdbc2 persistence manager that is used internally
by the server. It only requires a local transaction (which it
starts itself, suspending/resuming any existing transaction).

This thread is about db connections used by the application
in the same transaction as MDB message delivery. 

 -marek
 
 
 
 ---
 This SF.Net email sponsored by: Free pre-built ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are available now.
 Download today and enter to win an XBOX or Visual Studio .NET.
 http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] WARN [...] what they mean...

2003-07-06 Thread Adrian Brock
On Sun, 2003-07-06 at 15:27, Magesh Prabhu wrote:

 1)  WARN  [TxConnectionManager$LocalXAResource] Prepare called on a local tx. Use of 
 localtransactions on a jta transaction with more than one branch may result in 
 inconsistent data in some cases of failure.
 

It is telling you your local-tx-datasource doesn't have a prepare(),
the commit() could fail leaving your data in an inconsistent state.

 2)  WARN  [WrappedConnection] Closing a statement you left open, please do your own 
 housekeeping
 

You are not closing a statement. Closing a pooled connection
just returns the connection to the pool.

-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] WARN [...] what they mean...

2003-07-06 Thread Magesh Prabhu

On 7/6/03 3:56 PM, Adrian Brock [EMAIL PROTECTED] wrote:
On Sun, 2003-07-06 at 15:27, Magesh Prabhu wrote:

 1)  WARN  [TxConnectionManager$LocalXAResource] Prepare called 
on a local tx. Use of localtransactions on a jta transaction with 
more than one branch may result in inconsistent data in some cases 
of failure.
 

It is telling you your local-tx-datasource doesn't have a prepare(),
the commit() could fail leaving your data in an inconsistent state.

I could'nt understand this Adrian, I'm using Oracle 8.1.6 database with the following 
datasource configuration:

datasources
  local-tx-datasource
jndi-nameOracleDS/jndi-name
connection-urljdbc:oracle:thin:@193.16.18.126:1521:clipper/connection-url
driver-classoracle.jdbc.driver.OracleDriver/driver-class
user-nametest/user-name
passwordtest/password

exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter/exception-sorter-class-name
  /local-tx-datasource
/datasources

Could you please give more explanation on your comment.. Should my jdbc driver support 
this prepare() method  My transaction is all Container managed and I run on Commit 
Option 'B'


 2)  WARN  [WrappedConnection] Closing a statement you left open, 
please do your own housekeeping
 

You are not closing a statement. Closing a pooled connection
just returns the connection to the pool.


In all my Entity Beans, I have this following code to clean up the resources they use 
and I've double checked all my beans so that they dont leave any connections open.

private void releaseResources(ResultSet rs, Statement stmt, Connection conn) {
   if (rs != null) {
   try {
   rs.close();
   } catch (SQLException e) {
   log.fatal(e);
   }
   }

   if (stmt != null) {
   try {
   stmt.close();
   } catch (SQLException e) {
   log.fatal(e);
   }
   }

   if (conn != null) {
   try {
   conn.close();
   } catch (SQLException e) {
   log.fatal(e);
   }
   }
}

Thanks very much for your response,
Magesh





-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





**
This email and its attachments are intended for the above 
named only and may be confidential.  If they have come to 
you in error, you must take no action based on them, nor 
must you copy or show them to anyone; please reply to this 
email and highlight the error.
Security Warning: Please note that this email has been 
created in the knowledge that the internet email is not a 
100% secure communications medium.  We advise that you 
understand and observe this lack of security when emailing us.
Viruses:  Although we have taken steps to ensure that this 
email and attachments are free from any virus, we advise 
that in keeping with good computing practice the recipient 
should ensure they are actually virus free.
If you have received this email in error please notify:
[EMAIL PROTECTED]
**



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] WARN [...] what they mean...

2003-07-06 Thread Adrian Brock
On Sun, 2003-07-06 at 16:40, Magesh Prabhu wrote:

 I could'nt understand this Adrian, I'm using Oracle 8.1.6 database with the 
 following datasource configuration:
 
 datasources
   local-tx-datasource
 jndi-nameOracleDS/jndi-name
 connection-urljdbc:oracle:thin:@193.16.18.126:1521:clipper/connection-url
 driver-classoracle.jdbc.driver.OracleDriver/driver-class
 user-nametest/user-name
 passwordtest/password
 
 exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter/exception-sorter-class-name
   /local-tx-datasource
 /datasources
 
 Could you please give more explanation on your comment.. Should my jdbc driver 
 support this prepare() method  My transaction is all Container managed and I run 
 on Commit Option 'B'
 

You need the xa datasource for prepare()

 
  2)  WARN  [WrappedConnection] Closing a statement you left open, 
 please do your own housekeeping
  
 
 You are not closing a statement. Closing a pooled connection
 just returns the connection to the pool.

 
 In all my Entity Beans, I have this following code to clean up the resources they 
 use and I've double checked all my beans so that they dont leave any connections 
 open.
 
 private void releaseResources(ResultSet rs, Statement stmt, Connection conn) {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 
if (stmt != null) {
try {
stmt.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
log.fatal(e);
}
}
 }

JBoss disagrees with you.

Maybe you have:

Statement stmt = conn.prepareStatement(...);
...
stmt = conn.prepareStatement(...);
...
releaseResources(rs, stmt, conn);

The first statement won't be closed.

Or maybe your releaseResources is not in a finally block.

-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user