Unix Technical Forum

org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

This is a discussion on org.postgresql.xa.PGXADataSource and compatible=8.2 in query string within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Hi, i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-20-2008, 05:57 PM
Achilleas Mantzios
 
Posts: n/a
Default org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Hi,
i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating from 7.4.x).
I have decided to use XA support, since due to jboss changes Jboss TM -> Jboss TS, some code that used to work
didnt work any more. This is not PostgreSQL issue of course.
One option would be to run Jboss with Jboss TM, which is a deprecated way that will certainly couse future problems.
So i used Jboss TS, but inorder to do that i had to use the org.postgresql.xa.PGXADataSource instead of the classic org.postgresql.Driver
local datasource.
I did so, and it worked!!
The problem is that i dont know of a way to tell the org.postgresql.xa.PGXADataSource to use compatible=8.2, for array usage.
Is there any workaround?
I will post the same to the jboss camp as well.
--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-20-2008, 05:57 PM
Achilleas Mantzios
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Στις Tuesday 20 May 2008 15:27:47 ο/η Achilleas Mantzios έγραψε:
> Hi,
> i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating from 7.4.x).
> I have decided to use XA support, since due to jboss changes Jboss TM -> Jboss TS, some code that used to work
> didnt work any more. This is not PostgreSQL issue of course.
> One option would be to run Jboss with Jboss TM, which is a deprecated waythat will certainly couse future problems.
> So i used Jboss TS, but inorder to do that i had to use the org.postgresql.xa.PGXADataSource instead of the classic org.postgresql.Driver
> local datasource.
> I did so, and it worked!!
> The problem is that i dont know of a way to tell the org.postgresql.xa.PGXADataSource to use compatible=8.2, for array usage.
> Is there any workaround?
> I will post the same to the jboss camp as well.


Does org.postgresql.xa.PGXADataSource support property "URL"?

> --
> Achilleas Mantzios
>




--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-20-2008, 05:57 PM
Achilleas Mantzios
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Στις Tuesday 20 May 2008 16:07:14 ο/η Achilleas Mantzios έγραψε:
> Στις Tuesday 20 May 2008 15:27:47 ο/η Achilleas Mantzios έγραψε:
> > Hi,
> > i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating from 7.4.x).
> > I have decided to use XA support, since due to jboss changes Jboss TM -> Jboss TS, some code that used to work
> > didnt work any more. This is not PostgreSQL issue of course.
> > One option would be to run Jboss with Jboss TM, which is a deprecated way that will certainly couse future problems.
> > So i used Jboss TS, but inorder to do that i had to use the org.postgresql.xa.PGXADataSource instead of the classic org.postgresql.Driver
> > local datasource.
> > I did so, and it worked!!
> > The problem is that i dont know of a way to tell the org.postgresql.xa.PGXADataSource to use compatible=8.2, for array usage.
> > Is there any workaround?
> > I will post the same to the jboss camp as well.

>
> Does org.postgresql.xa.PGXADataSource support property "URL"?

Just browsing the source of
http://cvs.pgfoundry.org/cgi-bin/cvs...-cvsweb-markup
and i cant find anything close to supporting the "compatible" parameter.
Any thoughts?
>
> > --
> > Achilleas Mantzios
> >

>
>
>
> --
> Achilleas Mantzios
>




--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-20-2008, 05:57 PM
Achilleas Mantzios
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Here is the "compatible" parameter-aware patch:

--- org/postgresql/ds/common/BaseDataSource.java.ORIG 2008-05-20 17:08:57.000000000 +0300
+++ org/postgresql/ds/common/BaseDataSource.java 2008-05-20 17:20:41.000000000 +0300
@@ -51,6 +51,7 @@
private int loginTimeout; // in seconds
private boolean ssl = false;
private String sslfactory;
+ private String compatible;

/**
* Gets a connection to the PostgreSQL database. The database is identified by the
@@ -154,6 +155,16 @@
}
}

+ public String getCompatible()
+ {
+ return compatible;
+ }
+
+ public void setCompatible(String compatible)
+ {
+ this.compatible = compatible;
+ }
+
/**
* Gets the name of the PostgreSQL database, running on the server identified
* by the serverName property.
@@ -323,6 +334,7 @@
sb.append("&sslfactory=").append(sslfactory);
}
}
+ if (compatible != null) sb.append("&compatible="+compatible);

return sb.toString();
}


--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-24-2008, 06:11 AM
Kris Jurka
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 inquery string



On Tue, 20 May 2008, Achilleas Mantzios wrote:

> Here is the "compatible" parameter-aware patch:
>


You also need to adjust the code in getReference and read/writeBaseObject
to handle the compatible parameter.

Kris Jurka

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-24-2008, 06:11 AM
Achilleas Mantzios
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Στις Tuesday 20 May 2008 22:40:26 ΞΏ/Ξ· Kris Jurka Ξ*γραψΡ:
>
> On Tue, 20 May 2008, Achilleas Mantzios wrote:
>
> > Here is the "compatible" parameter-aware patch:
> >

>
> You also need to adjust the code in getReference and read/writeBaseObject
> to handle the compatible parameter.

Ok, i attach the new patch.

>
> Kris Jurka
>




--
Achilleas Mantzios


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-24-2008, 06:11 AM
Kris Jurka
 
Posts: n/a
Default Re: org.postgresql.xa.PGXADataSource and compatible=8.2 inquery string



On Wed, 21 May 2008, Achilleas Mantzios wrote:

> Στις Tuesday 20 May 2008 22:40:26 ΞΏ/Ξ· Kris Jurka Ξ*γραψΡ:
>>
>> On Tue, 20 May 2008, Achilleas Mantzios wrote:
>>
>>> Here is the "compatible" parameter-aware patch:
>>>

>>
>> You also need to adjust the code in getReference and read/writeBaseObject
>> to handle the compatible parameter.

> Ok, i attach the new patch.
>


Applied. Thanks.

Kris Jurka
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com