wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes Connecting Cold Fusion to my Java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Connecting Cold Fusion to my Java application" Watch "Connecting Cold Fusion to my Java application" New topic
Author

Connecting Cold Fusion to my Java application

Ron Olson
Greenhorn

Joined: Nov 22, 2000
Posts: 14
I have a Cold Fusion server and a Java application (not running within Cold Fusion), both running on one NT computer. Now I want to pass a 500 byte message from Cold Fusion to my Java application.
Is RMI a reasonable way to pass the message from Cold Fusion (Cold Fusion can run its own JVM) to my application? Are there other good alternatives I should consider? Does the answer change if in the future this becomes spread across two computers?
Thanks,
Ron
Alan Watts
Greenhorn

Joined: May 14, 2001
Posts: 28

Ron,
I am curious to know how you went with this eventually. I have a similar problem.
Cheers
Alan

Originally posted by Ron Olson:
I have a Cold Fusion server and a Java application (not running within Cold Fusion), both running on one NT computer. Now I want to pass a 500 byte message from Cold Fusion to my Java application.
Is RMI a reasonable way to pass the message from Cold Fusion (Cold Fusion can run its own JVM) to my application? Are there other good alternatives I should consider? Does the answer change if in the future this becomes spread across two computers?
Thanks,
Ron

Ron Olson
Greenhorn

Joined: Nov 22, 2000
Posts: 14
Alan,
What I needed to do was have Cold Fusion receive a couple thousand bytes via http, and pass that data to my Java application. Since I needed to get the data into the file system anyway, I let Cold Fusion write the file and just pass the file name over to the Java application. In my application I had a FIFOQueue class, which I implemented by extending LinkedList. It was an object of that class that I made visible to Cold Fusion by using RMI to tie together the separate JVM's. That approach worked fine, although I never went out of my way to try to stress it.
In the end, I decided that I wanted my queues to have persistence in case something went awry at an inopportune time. I also didn't want my Java application to necessarily be running when data came in over HTTP. So, I now let Cold Fusion write not only the data file, but also write the queue entry to a database. Then, the Java application picks up queued entries from the database. So, RMI is now out of the picture, and both the data file and the queue entry are 'safe stored' at the earliest possible time.
Ron
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting Cold Fusion to my Java application
 
Similar Threads
query a resultset like CFQUERY
Preparing Multipart mime for HTTP
Applet that writes to Cold Fusion script
J2ee vs. cold fusion
Find Tomcat location