RE: [JBoss-user] Informix XA and JBOSS 3.0.4

2003-02-08 Thread Jim Brownfield
I've been able to get the XA drivers up and working under version 2.21JC3 of
the IBM/Informix JDBC drivers and with Larry's help.  I had to write a
custom authentication module in order to be able to use the ODBC
authentication setup (to simplify installation) as opposed to the
users.properties file, and I had to modify Larry's wrapper to fix some other
Informix problems (I couldn't get the SQLH_TYPE and SQLH_FILE parameters to
work).  But it is logging in and accessing the database.

I didn't know about Larry's DB-locks problem, though.  Now I'm worried! :(

-- 
Jim Brownfield
[EMAIL PROTECTED]
Radical System Solutions, Inc. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of 
> Corbin, James
> Sent: Saturday, February 08, 2003 3:57 PM
> To: 'Larry Sanderson '; '[EMAIL PROTECTED] '
> Subject: RE: [JBoss-user] Informix XA and JBOSS 3.0.4
> 
> 
> 
>  I gave up on the XA drivers and moved to the non-xa drivers. 
>  It appears
> that JBOSS tries to set the autocommit flag on a manage 
> connection which
> generates an exception within JBOSS.
> 
> Under JBOSS 3.0.4 I haven't found anyway to set the 
> autocommit to false for
> the database at startup via the informix-service.xml (NON-XA).
> 
> Any ideas Larry?
> 
> J.D.
> 
> -Original Message-
> From: Larry Sanderson
> To: [EMAIL PROTECTED]
> Sent: 2/8/2003 10:43 AM
> Subject: Re: [JBoss-user] Informix XA and JBOSS 3.0.4
> 
> I jumped through a lot of hoops to get Informix XA working on JBoss, 
> including modifying the JBoss TransactionManager, and wrapping 
> Informix's XA drivers.  In the end, everything worked except for one 
> recurring (and very annoying) problem: the database periodically 
> extablished a lock on some data that it would not let go without a DB 
> restart.  None of the informix tools would release the lock.  
> I whipped 
> together some Java XA code that was able to fix some of the problems, 
> but every now and then a DB restart was necessary.  In the 
> end, we ended
> 
> up rolling back to the non-XA drivers.
> 
> I have sent the wrapped drivers to several folks on this alias that 
> asked about them.  I think David Jenks and Jules Gosnell also asked 
> about them at one point, but I never got them out.  I have 
> attached them
> 
> here for the world to see/use/fix.  It should go without 
> saying: "Use at
> 
> your own risk".
> 
> -Larry
> 
> Instructions on use of attached informix.sar:
> 
> You can use this as a replacement for 
> your current db-service.xml.  You will need to modify the 
> META-INF/jboss-service.xml to suite your environment.  Note: 
> you can run
> this 
> archive exploded - it makes it easier to modify the jboss-service.xml
> file. 
>   It has only two external references: Log4j and Informix's current
> drivers.
> 
> If you would prefer to rip the thing apart, the only file you need is
> the 
> IfxXADataSource.java - all the others are tests that expose 
> the various
> bugs in 
> the original XA driver, and a tool to help recover 
> transactions stuck in
> the 
> database.
> 
> Good Luck!
> 
> Corbin, James wrote:
> 
> > Has anyone been able to successfully get a connection to an 
> Informix 
> > database through a configured XA driver? 
> >
> >  
> >
> > I appear to bind to the datasource okay as I do not get any 
> errors at 
> > startup, but whenever I try to programmatically get a connection it 
> > fails. 
> >
> >  
> >
> > This is very annoying.  Please advise.
> >
> >  
> >
> > J.D.
> >
> >This electronic message transmission contains information from the
> Company that may be proprietary, confidential and/or privileged.
> >The information is intended only for the use of the individual(s) or
> entity named above.  If you are not the intended recipient, be
> >aware that any disclosure, copying or distribution or use of the
> contents of this information is prohibited.  If you have received
> >this electronic transmission in error, please notify the sender
> immediately by replying to the address listed in the "From:" field.
> >  
> >
>  <> 
> This electronic message transmission contains information 
> from the Company that may be proprietary, confidential and/or 
> privileged.
> The information is intended only for the use of the 
> individual(s) or entity named above.  If you are not the 
> intended recipient, be
> aware that any disclosure, copying or distribution or use of 
> the contents of this information is prohibited.  If you have received
> this electronic transmission in error, please notify the 
> sender immediately by replying to the address listed in the 
> "From:" field.
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



--

RE: [JBoss-user] Informix XA and JBOSS 3.0.4

2003-02-08 Thread Corbin, James

 I gave up on the XA drivers and moved to the non-xa drivers.  It appears
that JBOSS tries to set the autocommit flag on a manage connection which
generates an exception within JBOSS.

Under JBOSS 3.0.4 I haven't found anyway to set the autocommit to false for
the database at startup via the informix-service.xml (NON-XA).

Any ideas Larry?

J.D.

-Original Message-
From: Larry Sanderson
To: [EMAIL PROTECTED]
Sent: 2/8/2003 10:43 AM
Subject: Re: [JBoss-user] Informix XA and JBOSS 3.0.4

I jumped through a lot of hoops to get Informix XA working on JBoss, 
including modifying the JBoss TransactionManager, and wrapping 
Informix's XA drivers.  In the end, everything worked except for one 
recurring (and very annoying) problem: the database periodically 
extablished a lock on some data that it would not let go without a DB 
restart.  None of the informix tools would release the lock.  I whipped 
together some Java XA code that was able to fix some of the problems, 
but every now and then a DB restart was necessary.  In the end, we ended

up rolling back to the non-XA drivers.

I have sent the wrapped drivers to several folks on this alias that 
asked about them.  I think David Jenks and Jules Gosnell also asked 
about them at one point, but I never got them out.  I have attached them

here for the world to see/use/fix.  It should go without saying: "Use at

your own risk".

-Larry

Instructions on use of attached informix.sar:

You can use this as a replacement for 
your current db-service.xml.  You will need to modify the 
META-INF/jboss-service.xml to suite your environment.  Note: you can run
this 
archive exploded - it makes it easier to modify the jboss-service.xml
file. 
  It has only two external references: Log4j and Informix's current
drivers.

If you would prefer to rip the thing apart, the only file you need is
the 
IfxXADataSource.java - all the others are tests that expose the various
bugs in 
the original XA driver, and a tool to help recover transactions stuck in
the 
database.

Good Luck!

Corbin, James wrote:

> Has anyone been able to successfully get a connection to an Informix 
> database through a configured XA driver? 
>
>  
>
> I appear to bind to the datasource okay as I do not get any errors at 
> startup, but whenever I try to programmatically get a connection it 
> fails. 
>
>  
>
> This is very annoying.  Please advise.
>
>  
>
> J.D.
>
>This electronic message transmission contains information from the
Company that may be proprietary, confidential and/or privileged.
>The information is intended only for the use of the individual(s) or
entity named above.  If you are not the intended recipient, be
>aware that any disclosure, copying or distribution or use of the
contents of this information is prohibited.  If you have received
>this electronic transmission in error, please notify the sender
immediately by replying to the address listed in the "From:" field.
>  
>
 <> 
This electronic message transmission contains information from the Company that may be 
proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named 
above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this 
information is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by 
replying to the address listed in the "From:" field.



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss Generating Some Bad SQL

2003-02-08 Thread Dain Sundstrom
We have the same problem with Oracle.  I personally think this is a bug 
with both of the databases.  I see no reason why the query processor 
can't figure out the correct way to form a internal query object; we 
can.

I'll ask Jeremy if he wants to work this out in in 3.2.  Otherwise 
you'll have to wait for 4.0.

-dain

On Friday, February 7, 2003, at 09:03 PM, Rod Macpherson wrote:

PostgreSQL does not allow an aggregated field reference to appear in 
the
where clause.

SELECT DISTINCT t0_s.rec_num ... WHERE ... t0_s.rec_num=t1 ...

Guess DISTINCT by itself is considered an aggregate rather than a
pre-aggregate filter. Possible solutions: a) fix PostgreSQL so that it 
does
not treat DISTINCT as a bona fide aggregate in an of itself;  b) fix
PostgreSQL so that it does not impose the "aggregated column cannot 
appear
in where clause" limitation; c) remote DISTINCT from your query since
rec_num ottabee unique anyway.


- Original Message -
From: "Hunter Hillegas" <[EMAIL PROTECTED]>
To: "JBoss User" <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 1:11 PM
Subject: [JBoss-user] JBoss Generating Some Bad SQL


I am running my dev environment on JBoss 3.2 RC1...

I am using JBossQL to override a query.

My JBossQL statement is as follows:

SELECT DISTINCT OBJECT(s) FROM SampleRequestBean s, IN (s.lineItems) 
li
WHERE li.fulfillmentStatus = 'Shipped' AND li.followupDate <= ?1 AND
(li.customerProspectFeedback IS NULL OR li.customerProspectFeedback = 
'')
ORDER BY s.dateOfRequest DESC

This generates this SQL:

SELECT DISTINCT t0_s.rec_num FROM sample_request t0_s,
sample_request_line_item t1_li WHERE (t1_li.fulfillment_status = 
'Shipped'
AND t1_li.followup_date <= '2003-02-04 20:00:00.0+00' AND
(t1_li.customer_prospect_feedback IS NULL OR
t1_li.customer_prospect_feedback = '')) AND
(t0_s.rec_num=t1_li.parentRequest) ORDER BY t0_s.date_of_request DESC

My database (PostgreSQL 7.2 and 7.3) complains as such:

ERROR:  For SELECT DISTINCT, ORDER BY expressions must appear in 
target
list


So... Any suggestion on how I can tweak this to get the correct SQL 
out of
JBossCMP? Gracias!

Hunter



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Informix XA and JBOSS 3.0.4

2003-02-08 Thread Larry Sanderson
I jumped through a lot of hoops to get Informix XA working on JBoss, 
including modifying the JBoss TransactionManager, and wrapping 
Informix's XA drivers.  In the end, everything worked except for one 
recurring (and very annoying) problem: the database periodically 
extablished a lock on some data that it would not let go without a DB 
restart.  None of the informix tools would release the lock.  I whipped 
together some Java XA code that was able to fix some of the problems, 
but every now and then a DB restart was necessary.  In the end, we ended 
up rolling back to the non-XA drivers.

I have sent the wrapped drivers to several folks on this alias that 
asked about them.  I think David Jenks and Jules Gosnell also asked 
about them at one point, but I never got them out.  I have attached them 
here for the world to see/use/fix.  It should go without saying: "Use at 
your own risk".

-Larry

Instructions on use of attached informix.sar:

You can use this as a replacement for 
your current db-service.xml.  You will need to modify the 
META-INF/jboss-service.xml to suite your environment.  Note: you can run this 
archive exploded - it makes it easier to modify the jboss-service.xml file. 
 It has only two external references: Log4j and Informix's current drivers.

If you would prefer to rip the thing apart, the only file you need is the 
IfxXADataSource.java - all the others are tests that expose the various bugs in 
the original XA driver, and a tool to help recover transactions stuck in the 
database.

Good Luck!

Corbin, James wrote:

Has anyone been able to successfully get a connection to an Informix 
database through a configured XA driver? 

 

I appear to bind to the datasource okay as I do not get any errors at 
startup, but whenever I try to programmatically get a connection it 
fails. 

 

This is very annoying.  Please advise.

 

J.D.

This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by replying to the address listed in the "From:" field.
 



informix.sar
Description: Binary data