Request for review: always generate java-rmi.cgi

Omair Majid omajid at redhat.com
Wed May 11 17:35:51 UTC 2011


On 05/11/2011 01:03 PM, Kelly O'Hair wrote:
>
> I found this bug:
>    http://bugs.sun.com/view_bug.do?bug_id=4495986
>
> Which seems to imply that maybe this java-rmi.cgi file doesn't belong in the "bin" directory at all?
>
> But it also seems to me that the current:
>    91 ifneq ($(ARCH_DATA_MODEL), 32)
>    92 build: stubs
>    93 else # ARCH_DATA_MODEL
>    94 build: stubs bin
>    95 endif
>
> Should have been:
>    91 ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL), solaris-32)
>    92 build: stubs
>    93 else # ARCH_DATA_MODEL
>    94 build: stubs bin
>    95 endif
>
> Only Solaris does the 32bit and 64bit builds in a way that demonstrated the original issue for 4495986.
>
> So my question is? Well questions are...

I know next-to-nothing about java-rmi.cgi, but after a little bit of 
searching, here is what I came up with.

>
> Q1: What the heck is java-rmi.cgi and what is it used for?
>

It allows RMI calls to be made through firewalls by proxying it through 
a HTTP server:

http://java.sun.com/developer/onlineTraining/rmi/RMI.html#FirewallIssues
http://download.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#firewallOut
http://stackoverflow.com/questions/1137359/how-do-i-tunnel-rmi-using-tomcat

There is a recommendation that a servlet should be used instead when 
possible:
http://download.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#servlet

> Q2: Does it belong somewhere other than the bin directory?
>

I am not sure. It is not supposed to be executed directly by a user. But 
it is an executable file. I think the extension makes it clear that only 
a HTTP server is supposed to execute it.

With that said, don't we care about compatibility? I thought changing 
the location of files (especially those under bin/) was not allowed.

Thanks,
Omair



More information about the build-dev mailing list