users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: JMS_SPEC-89: Standard API to create and configure a ConnectionFactory

From: Clebert Suconic <clebert.suconic_at_gmail.com>
Date: Mon, 16 Mar 2015 15:46:43 -0400

You would have an interface for that:

;
Lets find a better name for such Driver, JMSDriver


interface JMSDriver
{
    ConnectionFactory newConnectionFactory(String connectionProperties);
}


A tool would be able to use


JMSDriver dirver = Class.forName("MyProvider");


ConnectionFactory factory =
driver.newConnectionFactory(connectionString / URI / something we all
agree upon);




if we found a good a set of standard properties that would work for
everybody it would be great. That may be tricky as for instance we
support TCP, UDP.. etc.



But just having the className and a typed string would be already a
big improvement. Right now admin type guys need to write plugins on
their admins for Oracle HornetQ Apache... etc...






this is exactly the same approach as JDBC.






On Mon, Mar 16, 2015 at 2:46 PM, Nigel Deakin <nigel.deakin_at_oracle.com> wrote:
> On 16/03/2015 13:35, Clebert Suconic wrote:
>>
>> just an idea I think it would make sense:
>>
>> What about having something like a DriverFactory (just to not call it
>> ConnectionFactoryFactory)
>>
>>
> ...
>>
>>
>> DriverFactory factory = new OracleDriverFactory();
>> factory.newConnectionFactory(ConnectionFactory,
>> "jms://user:password_at_localhost:3030?TTL=30000"); // just pretend TTL
>> was an Oracle property.
>
>
> Given that the "driver class" here would be a JMS-provider-specific class,
> what would be the benefit of this compared with simply defining a standard
> constructor:
>
> ConnectionFactory connectionFactory = OracleConnectionFactory(URL);
>
> Or are you suggesting that the "driver factory" would work with any JMS
> provider? In which case it would need a standard way to instantiate the
> connection factory of a particular JMS provider.
>
> Nigel
>



-- 
Clebert Suconic
http://community.jboss.org/people/clebert.suconic@jboss.com
http://clebertsuconic.blogspot.com