Unix Domain Socket - Question about work around

Since Unix Domain Sockets are platform dependent and Java is platform independent, it does not support it.

However, I am sure some of you have worked with them and found some good work around.

Elsewhere Jtux was suggested as a possible fix. However, I have not seen any good testimonials to it working. Also, if there are any security issues with this software. The website is here: http://www.basepath.com/aup/jtux/

Does anyone have any other suggest?

Thanks.

[491 byte] By [jjhusa01a] at [2007-11-27 2:10:44]
# 1
You could always roll your own.
jschella at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 2
I assumed I would have to eventually make something. I will most likely have to use something with the JNI.I was hoping for a simpler method if it already existed.Message was edited by: jjhusa01
jjhusa01a at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 3
You could just create an app (like in C) and proxy requests via regular sockets).
jschella at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 4
I wish I could. However, I am adding security to current Java Applications currently being used. So I do not have much of a choice.
jjhusa01a at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 5
Which side has to create those sockets? If the C part, you can try to open the files in the Java process as plain files. Maybe that works, maybe not.
BIJ001a at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 6

> I wish I could. However, I am adding security to

> current Java Applications currently being used. So I

> do not have much of a choice.

Huh?

Either you are modifying the current app or not.

If you are modifying it then you have to make some changes. And using a proxy would be one change. You control the proxy and your java app can control as well (although it doesn't have to.)

If you aren't modifying the current app then there is no solution.

jschella at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 7
I am modifying a current app. I must use the Unix Domain Sockets. I have no choice in the matters. It's for security reasons that they must be left in place.
jjhusa01a at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 8

> I am modifying a current app. I must use the Unix

> Domain Sockets. I have no choice in the matters. It's

> for security reasons that they must be left in place.

I can only guess that you do not understand my suggestion.

The proxy does a domain socket to regular socket - just a pass through. You write this in C/C++.

In your java app, as one option, you use Runtime.exec() to start the proxy. Then you use a java socket to connect to it. You can pass options to the proxy to control the socket behavior on both ends.

In terms of usage there are a number of variations on the above.

jschella at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...
# 9
Sorry, I did misunderstand your question. I think that has a lot to do with my lack of real experience in network programming.Thank you for your reply. I will take a look at that.
jjhusa01a at 2007-7-12 2:03:13 > top of Java-index,Core,Core APIs...