You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Vincenzo Gianferrari Pini <vi...@praxis.it> on 2004/05/18 09:24:24 UTC

Reopened Jira JAMES-247

Yesterday, experimenting RC3, I had to reopen the JAMES-247 Jira entry, upgrading it to "blocking".

For some reason (could somebody look at this ???) no email was sent by Jira (or at least I didn't receive it), so I'm sending this one, commenting the problem.

I'm inserting the following comments to Jira too.

The problem is that the fix applied to fix JAMES-247 (using getBlob instead of getBytes for both message_body and message_attributes) doesn't work with MSSQL (that issues an exception), because the field type is "image".
I tried with other field types without success, and will look more carefully, but I'm afraid that we will have to insert in the code some special check to see if those fields are compatible with getBlob. It would be ugly though :-( Ideas are welcome.

Anyhow we can't release 2.2.0RC3 as the final release without fixing it. Current James sites using MSSQL with full db support or even just dbfile with attributes would be broken.

Vincenzo


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Reopened Jira JAMES-247

Posted by Serge Knystautas <se...@lokitech.com>.
Vincenzo Gianferrari Pini wrote:
> Yesterday, experimenting RC3, I had to reopen the JAMES-247 Jira entry, upgrading it to "blocking".

I'll look into why a notice didn't get through.  Thanks for catching this.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: Reopened Jira JAMES-247

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
I wrote and tested code that allows to specify in sqlResources.xml whether blobs should/can be used or not with a database product, and behaves accordingly.

As I was there, I wrote it in a generalized way, so that it could be used in the future in similar cases.

Here follows an xml snippet from sqlResources.xml (just below <dbMatchers>):

<!--
	With the following section it is possible to associate several name/value pairs
	of options to a database product.
	Here a "useBlob" option name is set, but others could be used in the future.
	Option names:
        "useBlob" - a string representing a boolean telling whether a getBlob(int) statement
			is supportedvby a database product, and then will be used to get message body
			and attributes. The default value is "false".
-->
<dbOptions>
    <dbOption db="mssql" name="useBlob" value="false"/>
    <dbOption db="oracle" name="useBlob" value="true"/>
    <dbOption db="mysql" name="useBlob" value="true"/>
    <dbOption db="postgresql" name="useBlob" value="false"/>
    <dbOption db="sapdb" name="useBlob" value="true"/>
    <dbOption db="hypersonic" name="useBlob" value="true"/>
    <dbOption db="db2" name="useBlob" value="true"/>
</dbOptions>

It works fine with mssql; If you agree tomorrow I can commit everything to cvs and other people should test it (anyhow, if tried also setting "true" for mssql and it starts using blobls and breaks, so the mechanism should be all ok).

I put "false" also for postgresql, but someone should tell me. Perhaps the best back compatibility would be to put "true" only for oracle and db2.

If you don't like the solution let me know, and suggest another one :-)

Vincenzo

> -----Original Message-----
> From: Vincenzo Gianferrari Pini
> [mailto:vincenzo.gianferraripini@praxis.it]
> Sent: martedì 18 maggio 2004 9.24
> To: James server-dev list
> Subject: Reopened Jira JAMES-247
> 
> 
> Yesterday, experimenting RC3, I had to reopen the JAMES-247 Jira entry, upgrading it to "blocking".
> 
> For some reason (could somebody look at this ???) no email was sent by Jira (or at least I didn't receive it), so I'm 
> sending this one, commenting the problem.
> 
> I'm inserting the following comments to Jira too.
> 
> The problem is that the fix applied to fix JAMES-247 (using getBlob instead of getBytes for both message_body and 
> message_attributes) doesn't work with MSSQL (that issues an exception), because the field type is "image".
> I tried with other field types without success, and will look more carefully, but I'm afraid that we will have to insert 
> in the code some special check to see if those fields are compatible with getBlob. It would be ugly though :-( Ideas are welcome.
> 
> Anyhow we can't release 2.2.0RC3 as the final release without fixing it. Current James sites using MSSQL with full db 
> support or even just dbfile with attributes would be broken.
> 
> Vincenzo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org