Vincenzo,

I don't have any time to help out this week - but next week I will be able to test on 
postgresql, Oracle, DB2 and mysql if you still need it.

I was thinking of a similar solution to yours, except that I was thinking of adding DB 
Helper classes and configuring the helper class name in the sqlResources file.  If we 
are not expecting any future differences in behaviour between databases then your 
solution is quicker.

Steve

> -----Original Message-----
> From: Vincenzo Gianferrari Pini 
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 18, 2004 8:16 AM
> To: James Developers List
> Subject: RE: Reopened Jira JAMES-247
> 
> 
> 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:[EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to