Skip to content

Support for Oracle AQ "J2EECompliance" mode [DATAJDBC-59] #311

@spring-projects-issues

Description

@spring-projects-issues

Koen Serneels opened DATAJDBC-59 and commented

By default the AQ API returns JMS connections which operate in non "J2EE" compliant mode. One of these side effects is how AQ deals with message priority. Per JMS spec, the priority is defined by a number between 1-9. A higher number means higher priority. By default however, AQ follows its own rules where a higher number is lower priority instead.

This behavior can be influenced by settings a JVM property; oracle.jms.j2eeCompliant to "true", see 11.9 J2EE Compliance. However, the AQ JMS API which is used to create a ConnectionFactory (namely AQjmsFactory) has an overloaded method to pass along a boolean to toggle this as well. This would be much cleaner if we could configure this instead of setting JVM global properties.

As reference: when using the Spring AQ NS configuration, like this: <orcl:aq-jms-connection-factory id="connectionFactory"....> the NS parser: AqJmsConnectionFactoryBeanDefinitionParser eventually uses AqJmsFactoryBeanFactory which does: AQjmsFactory.getConnectionFactory(dataSourceToUse);

The proposition is to add another attribute "jee-compliance" to the element, like this: <orcl:aq-jms-connection-factory id="connectionFactory" jee-compliance="true"....>. This could then be passed along to AqJmsFactoryBeanFactory, which could then use the overloaded method to create a jee compliant connection: AQjmsFactory.getConnectionFactory(dataSourceToUse, BOOLEAN);

Btw; I don't fully understand why j2eecompliant is not default true. It is so that the Oracle AQ API can be used in "raw AQ mode", not requiring the JMS API (and for this the setting makes sense) but 'getConnectionFactory' already returns a JMS ConnectionFactory and hence we are working the "JMS way" already. It seems weird to me that this compliance mode needs to be explicitly enabled in this case. Maybe it makes sense that when this gets implemented the default is "true" anyway


Affects: Ext 1.1 M1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions