I've recently been developing a project that involves sending out events from ColdFusion to LiveCycle 2.6.1 using the Data Management event gateway to Flex 4.0 clients (LiveCycle and ColdFusion are on different Instances, but the same server). To begin with, I used ColdFusion assemblers, DAO's, and models and everything worked fine locally. After deploying this setup to a beta site, I decided that this setup would be very troublesome in terms of configuring clustered instances across multiple servers. I then decided to convert my assemblers, DAO's, and models to Java. The conversion went well and the flex clients see the exact same data as they did with the ColdFusion adapter.
Once I tried to send an update through from my ColdFusion application to a Flex client, I get an error stating that:
"Unable to find the Flex adapter for destination My_Dest in the RMI registry on localhost:1099.The Flex adapter may not be running or the destination may be incorrect."
After seeing this error, downloaded a Java-based RMI inspector to see what was going on. To get a good idea of what was happening when the ColdFusion adapter was being used, I switched my data-management-config file back to the CF adapter. I noticed that the RMI entry was as follows:
Once I gathered this data as the base, I converted back to the Java adapter in my data-management-config file, restarted the servers, and ran the RMI inspector again. Only the "localhost:1099/cfassembler/my_cf_instance" was showing. (This one shows because I have "Enable Remote Adobe LiveCycle Data Management Access" checked in my CF instance's CF Admin -> Flex Integration). Since I don't need this checked anymore, I unchecked it and re-ran the RMI inspector. As it should, the "localhost:1099/cfdataserviceadapter/My_Dest" went away. Since no destination shows up, it means that the Flex adapter isn't registering my "my_Dest" destination with RMI. Since it isn't registered, I can't see it when I try to send a message through the CF Data Management event gateway.
Can anyone help me out here? I certainly may be missing something when it comes to RMI (I don't work with Java very often). Any advice would be greatly appreciated!
Without the ColdFusion based data management destination defined on the LCDS server, the destination will not show up in the RMI registry. It is only the CF adapter code that does this. The 'stock' LCDS adapter does not support invoking via RMI the way the CF version does.
I would recommend you run the LCDS MessageBrokerServlet inside the ColdFusion web application. This will give you two things:
1. You will not have the overhead of RMI between CF and LCDS as they will share the same VM (better performance!).
2. You will be able to use the CF Data Management Gateway to pass messages to Java-based destinations. The APIs the gateway uses should work fine with either CF or Java based Data Management destinations.
The CF/LCDS integration doesn't support what you are trying to do when you run two seperate instances.