[activemq-dev] InformixJDBCAdapter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[activemq-dev] InformixJDBCAdapter

pawel_tucholski
Hi

I’ve implemented the InformixJDBCAdapter for Informix DB and I am
going to add it to the project. But I have a doubt about the schema
of ActiveMQ broker.
In ACTIVEMQ_ACKS table there is the composite key PRIMARY KEY ( SUB,
CONTAINER ). In DefaultStatementProvider both fields (SUB and
CONTAINER) are defined as VARCHAR(250). Because in Informix there is
a restriction on length of indexed value so I have reduced length of
these two fields to 150 characters. Is it ok or it will cause
problems in some circumstances? How to check it to be sure it is ok?

Regards
Pawel Tucholski

The class is below:
public class InformixJDBCAdapter extends BlobJDBCAdapter {

    public static StatementProvider createStatementProvider() {
        DefaultStatementProvider answer = new
DefaultStatementProvider();
        answer.setContainerNameDataType("VARCHAR(150)");
        answer.setSubscriptionIdDataType("VARCHAR(150)");
        answer.setLongDataType("INT8");
        answer.setBinaryDataType("BYTE");
        return answer;
    }
       
        public InformixJDBCAdapter() {
                this(createStatementProvider());
        }
       
        public InformixJDBCAdapter(StatementProvider provider) {
                super(provider);
        }
}


Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] InformixJDBCAdapter

chirino
Hi Pawel,

Just make sure your destination names are < 150 characters.  And make  
sure that the any "clientId:subscpritionname" comes out to be less  
than 150 characters.

Regards,
Hiram

On Aug 18, 2005, at 3:35 AM, [hidden email] wrote:

> Hi
>
> I&#8217;ve implemented the InformixJDBCAdapter for Informix DB and  
> I am
> going to add it to the project. But I have a doubt about the schema
> of ActiveMQ broker.
> In ACTIVEMQ_ACKS table there is the composite key PRIMARY KEY ( SUB,
> CONTAINER ). In DefaultStatementProvider both fields (SUB and
> CONTAINER) are defined as VARCHAR(250). Because in Informix there is
> a restriction on length of indexed value so I have reduced length of
> these two fields to 150 characters. Is it ok or it will cause
> problems in some circumstances? How to check it to be sure it is ok?
>
> Regards
> Pawel Tucholski
>
> The class is below:
> public class InformixJDBCAdapter extends BlobJDBCAdapter {
>
>     public static StatementProvider createStatementProvider() {
>         DefaultStatementProvider answer = new
> DefaultStatementProvider();
>         answer.setContainerNameDataType("VARCHAR(150)");
>         answer.setSubscriptionIdDataType("VARCHAR(150)");
>         answer.setLongDataType("INT8");
>         answer.setBinaryDataType("BYTE");
>         return answer;
>     }
>
>     public InformixJDBCAdapter() {
>         this(createStatementProvider());
>     }
>
>     public InformixJDBCAdapter(StatementProvider provider) {
>         super(provider);
>     }
> }
>
>