[erlang-questions] best ways to discover jinterface mailbox from erlang?
mabrek
mabrek@REDACTED
Tue Dec 20 13:38:36 CET 2011
On Tue, Dec 20, 2011 at 4:02 PM, Robert Raschke <rtrlists@REDACTED> wrote:
> On Tue, Dec 20, 2011 at 9:27 AM, mabrek <mabrek@REDACTED> wrote:
>>
>> We have one application written in Java and need call it's methods
>> from Erlang. We use global to discover erlang services but jinterface
>> mailbox can't be registered in such way. Gproc doesn't seem to work
>> with jinterface either. It looks like it's possible to register
>> jinterface mailbox via pg2, haven't tried it yet.
>>
>> What is the best way to make jinterface mailbox discoverable from erlang?
>
> I don't think there is any way other than explicit information exchange to
> find the name of a Jinterface Mbox.
>
> If you are starting the Java Node from within Erlang, then you could simply
> pass in the name for your Mbox and use it.
>
> Another way would be for the Java Node code to explicitly register the Mbox
> name using RPC
> (http://www.erlang.org/doc/apps/jinterface/jinterface_users_guide.html#id61657)
> to whatever registration mechanism you're using on the Erlang side.
Yes, I'm going to follow this way (register pid of java mbox by rpc to
erlang node). The problem is that existing registration solutions that
I know don't work with non-erlang nodes.
Gproc registers calling process (temporary in case of rpc), global
allows only one pid per name (we need several java instances of
service), pg2 tries to monitor pid, fails for jinterface.
Regards,
Anton Lebedevich
More information about the erlang-questions
mailing list