Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connecting Cold Fusion to my Java application

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic