Dave mann

Ranch Hand
+ Follow
since Oct 05, 2018
I am a Noob-ish Beginner Self-Taught Java Coder.
Indonesia
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
2
Total given
10
Given in last 30 days
2
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dave mann

Yeah Thanks, Everything looks fine, and it should be done and ready for testing on weekend.
4 days ago
Okay, now I almost finished with the app that I mentioned I am building, which was failed previously on RMI because of lack of understanding the tricky part of the security manager, its now using Sockets, and working as I need it to be. Thnks for the Awesome Answers, but I'll back again on the RMI one as soon as i finished the socket one and set it up running.
6 days ago

Paul Clapham wrote:

Dave mann wrote:I dont know how to properly disable or ( Not to Use ) Security Manager, or how to deactivate it or exclude it from RMI...



So have you tried modifying the policy file to permit the actions it's presently not permitting?



I tried with granting all permissions, but still producing the same error.
1 week ago

Knute Snortum wrote:

Dave mann wrote:...I still stuck in the Security problem though, Now Sockets look easier.


Well, you'll have to deal with SSL if you use sockets too.



I tried make a simple one 2 days ago, and it worked like a charm, an intro to the RMI made its easier to kinda understand the socket programming, though its not the same.
the important part is I haven't encountered any of the similar problem to security problems I faced in RMI.
1 week ago
@Paul,

Yeap, I've came across that link also, the problem is, I dont know how to properly disable or ( Not to Use ) Security Manager, or how to deactivate it or exclude it from RMI, because when the first time I tried this, I didnt even knew about it, I get to realized that it is existed the first time I got the "No security Manager, RMI class Loader disabled" exception message.

So I guess it's a standard feature that is forced to be enabled by Java by default. maybe I am wrong, but thats the only possible conclusion that I can take for now after stumbling on these RMI Sec Manager related threads all over the internet.
1 week ago

Tim Holloway wrote:Well, that's interesting. This is the first I'd heard of being able to run RMI over SSL.

The approach you mentioned will prevent external listeners from snooping over an RMI connection, but you'll also want to incorporate some sort of mechanism to identify which user is which. And ideally to limit who can connect, although there's a lot of "security through obscurity" with RMI/SSL simply because almost nobody would expect to see such a thing.



very nice, but I still stuck in the Security problem though, Now Sockets look easier.
1 week ago

Knute Snortum wrote:I haven't used RMI a lot, but I would imagine that posting to a database would be a restricted activity.  Allowing a remote system to update your database seems like a security risk.



Sorry, I didnt mean by directly accessing database, but once a Client does an RMI call to the RMI Server, the RMI server will access and insert a value into the database before it could then send back the same value to the calling client, the reason the value need to be inserted into database because it will later be accessed by another client on a different JVM on a different PC.
2 weeks ago
I gotta correct that, now Ive made another similar simple RMI server-client pair app, with even same level of method, no database access, now all of these app got the same error, event the previous one that was perfectly working. where can I see the complete documentation or anyone who is in full depth knowledge of this RMI thing ? cases I saw online most of em still confused with this security things.
2 weeks ago
@Tim, thnks for the tips.

I am getting the hang of it.

But now, I have created 2 Pair of Java RMI server-client app.

Pair #1 is super simple, it just invoke methods on the server, and succesfully ran as it should be.

Pair #2 is asimilar, it just one of the remote method is Accessing the mysql db.

and Pair#2 isnt working, first I got UnmarshalException "No Security Manager: RMI Class Loader disabled".
After I added some Security manager line

if(System.getSecurityManager() == null {
  System.setSecurityManager(new SecurityManager());
}

, I got "access denied(127.0.0.1:22070 listen, resolve,)

yeah, you are right, this thing is very Tricky I guess ?

do you think I should upload my codes here ? I am kinda confused.
2 weeks ago

Tim Moores wrote:Well, RMI is a fairly low overhead approach to getting Java code to run on a remote host. If the port issue is no problem, and you have never had to deal with Java web apps (and the related servers like Tomcat), then RMI is probably the simpler approach.

But in general, RMI has fallen out of favor and been replaced with web services, implemented in Java or some other language. Just something to keep in mind going forward.



ah okay, I guess thats why I haven't heard about it before this, I guess I'lll just finish this, and switch to web services after that. Thnks for the head up.
3 weeks ago

Tim Moores wrote:Web services could be implemented in the form of a Java web app, yes. The JAX-RS API (the standard Java API for RESTful web services) makes that fairly easy. "web app" in this context has nothing to do with HTML etc. - which I guess you mean by "web programming".



never touched Java EE yet, only SE or Desktop, I am in the middle in getting my way through the RMI pathway right now, do you think it would be better for me to switch to java web services at this moment or keep on going with the current RMI thingy ?
3 weeks ago
Did you mean web services = web app ?

The thing is, I dont have any better knowledge in web programming, I know a lil bit of PHP but thats it for now, I think my best shot for now is doing it with Java.

3 weeks ago

Paul Clapham wrote:

Dave mann wrote:RMS = Record Management System ? thats what I am getting on search engine, or not ?



Sorry... too much Christmasery has dulled my brain today. RMI is what I should have said.

But I think it would be a good idea at this point to ask -- why do you want to do this particular thing?

(It often happens that people are trying to do something which looks like it's off the wall because they're really trying to do something ordinary but have gone directly down a blind alley.)



Okay, noted.

and I am going to explain intention or goals.

I want to create a 'simple' Queue Management or at least a smaller part of the management system, it will have a PC with a Java program on it which will act as a Server, this java desktop program will have a Main Display showing a number representing a Queue Number.

then there will be 1 or more other Computer in the same LAN network that will act as clients, each Computer will have a separate Java Desktop program, which has a jButton let say called as NextButton, let say Client#1 pressed the jButton on his PC, then this jButton on the Java desktop app will send an instruction or a command for the Java Desktop app on the Server PC to increment the Queue Number showed in the Main Display Displayed by Server PC.

That is the kind of system I am trying to develop or at least figure out in my mind, I have no other people here who understand or ever want to dwell with Java as deep as myself, commonly people here only dwell in VB.net

I hope my explained clearly, I am not fluent in english.
3 weeks ago

Knute Snortum wrote:There may be other ways to do this, but I would use sockets.  Sockets is not a beginning Java concept, so I'll move the thread to the sockets forums and also to Java in General, in case there are other ways to tackle this problem.



thats what I am getting also, seems like Socket programming is the only or most common way, I am into it now, just wondering if maybe someone with experience in that matter could share.

Paul Clapham wrote:If you want a client written in Java to execute a method remotely in a server also written in Java, then RMS is a Java tool which allows you to do that. (Also not a beginning Java concept.)



RMS = Record Management System ? thats what I am getting on search engine, or not ?
3 weeks ago