> On Sun, 15 Aug 2004 14:47:16 -0700, Dick Applebaum
> <[EMAIL PROTECTED]> wrote:
> > Got me thinking that CFML should have the inherent ability to
> > send/receive JMS messages -- something like a cfmessage tag.
>
> JMS is inherently asynchronous. CF is (currently) based on synchronous
> HTTP request / response pairs. That's why Blackstone is introducing
> the event gateway. The event gateway provides a way to handle
> asynchronous events like JMS.
>
> It wouldn't make sense for CF to have a cfmessage tag, except perhaps
> as a convenience for sending messages to a JMS server (we have a
> simple CFC that wraps a simple Java class for doing just that).
I didn't think a cfmessage tag for the sender would be difficult & it
would be a "formalized" way for a CF app to send messages to other j2ee
apps.
I felt that cfmessage would be very useful as a jms receiver --
isolating the user from the complexity.
But, you are right, the typical CF app isn't written to sit and listen
for an asynchronous request,
> Inbound messages have to be received in an asynchronous manner.
> Blackstone's event gateway makes this easy:
> - if a gateway for the type of protocol you want is not already
> provided, write a few lines of Java to interact with it (see my blog
> for just how little Java you need)
> - configure a gateway based on the Java protocol helper, a CFC and a
> configuration file
Because CF already has the concept of a CFC, it does seem a natural
place to implement a jms receiver.
You could (possible) simplify this interface (for the rest of us) with
a cfmessage type=receiver... tag.
> That's it! The Java code
(this is where you code the requestor or listener, right)
> receives events (and can send them to if you
> write it that way) and passes them to the CFC (via the gateway). The
> CFC processes the event and either returns a result (which the Java
> code passes back if appropriate) or calls a gateway helper to send
> results back (see my blog notes on the IRC bot I wrote).
Yeah, I saw that -- I think I understand
> Note that a JMS client can use *any* JMS server if it keeps the
> connection factory / topic factory information in a properties file.
> For example, here is the properties file I use:
>
> # JMS Gateway configuration file:
> # $Id: jmsgateway.cfg,v 1.3 2004/07/23 18:19:04 scorfield Exp $
> durable=yes
> subscriberName=SALESORDER_ADAPTER
>
> topicName=cn=add_salesorder,cn=Topics,cn=MsgHub,ou=EAI,o=Macromedia,c=U
> S
> providerURL=http://xxxx.macromedia.com:yyyy
> #initialContextFactory=jrun.naming.JRunContextFactory
>
> initialContextFactory=fiorano.jms.runtime.naming.FioranoInitialContextF
> actory
> #topicConnectionFactory=jrun.naming.JRunContextFactory
>
> topicConnectionFactory=cn=primaryTCF,cn=TopicConnectionFactories,cn=Msg
> Hub,ou=EAI,o=Macromedia,c=US
>
> The commented out lines are for the JRun JMS server, the uncommented
> lines are for our Fiorano MQ JMS server (a choice that pre-dates the
> Allaire acquisition). I use JRun locally for development and
> debugging, then deploy to Fiorano MQ.
> --
I will give the JRun JMS another shot -- thanks to OpenJMS, I think
understand what I am doing, now!
Dick
OpenJMS uses something like:
<?xml version="1.0"?>
<!-- OpenJMS configuration:
. RMI connectors
. JDBM persistency
. embedded JNDI provider
. embedded RMI registry, running on port 1099
. preconfigured destinations
NOTES: this configuration shows all configuration elements relevant
when using an RMI connector.
-->
<Configuration>
<!-- Optional. This represents the default configuration -->
<ServerConfiguration host="localhost" embeddedJNDI="true" />
<!-- Required when using an RMI connector -->
<Connectors>
<Connector scheme="rmi">
<ConnectionFactories>
<QueueConnectionFactory name="JmsQueueConnectionFactory" />
<TopicConnectionFactory name="JmsTopicConnectionFactory" />
</ConnectionFactories>
</Connector>
</Connectors>
<!-- Required -->
<DatabaseConfiguration>
<JdbmDatabaseConfiguration name="openjms.db" />
</DatabaseConfiguration>
<!-- Required -->
<AdminConfiguration script="${openjms.home}\bin\startup.bat" />
<!-- Optional. If not specified, no destinations will be created -->
<AdministeredDestinations>
<AdministeredTopic name="topic1">
<Subscriber name="sub1" />
<Subscriber name="sub2" />
</AdministeredTopic>
<AdministeredQueue name="queue1" />
<AdministeredQueue name="queue2" />
<AdministeredQueue name="queue3" />
</AdministeredDestinations>
<!-- Optional. If not specified, no users will be created -->
<Users>
<User name="admin" password="openjms" />
</Users>
</Configuration>
> Sean A Corfield -- http://www.corfield.org/blog/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

