Win a copy of Head First Android this week in the Android forum!

Abdul Salam

Greenhorn
+ Follow
since Feb 25, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abdul Salam

By rules an interface can extend other interfaces.
Let us say "myInterface" extends "java.rmi.Remote"(for no genuine reason) and it has a method which does not throw RemoteException.
"myImpl" is the implementation class.I don't want to use "myImpl" remotely,so it does not extend "UnicastRemoteObject".Now if I compile and run "myImpl" ,it should work.
For this reason it does not warn you at compile time.
But with "rmic" your intention to use "myInterface" remotely is clearer.So rmic issues a warning about invalid interface.
19 years ago
Is there any reliable way of deleting a directory
and it's contents from java (recursively).
I have tried

It also did not work.My OS is win 2000 server.
Thx in advance.
19 years ago
Rob,
What you have said is correct.But I think you missed a term 'Data Hiding'(Sure you have mentioned the concept).
19 years ago
One thing to keep in mind is 'Prepared statements'
are not intended to escape characters.They serve a different purpose.
Hi,
It seems that you are trying to run some examples without learning RMI or even java.You should spend some more time learning java basics.
If you want some help for that you can mail me.
19 years ago
Hi,
Please try Sun J2ME WTK available at sun website.
19 years ago
One of the considerations when you move your RMI application to internet is the presence of "firewall" between the client and server.
This could lead to one or more of the following cases to be considered.
[list ]
  • Method invocations will be slower,because RMI uses http to communicate through firewall proxy.
  • the client cannot export it's own remote object

  • outside a firewall.So server cannot invoke Remote methods on the client.
  • Consider whether the server will support RMI clients behind firewalls that can forward to arbitrary ports,If not take the appropriate steps.
  • It is always better to specify the 'java.rmi.server.hostname' property explicitly as it's not guarateed to be detected by the JVM under all circumstances.
  • [/list]
    Hope this helps
    19 years ago
    Michael,
    This is a humble suggestion about the name of the remote service.
    QUOTING YOUR WORDS.
    "We would rather use a lookup service, or name-for-service translator, and relax our need to know these things at compile-time. Furthermore, a well-named lookup might do a better job of suggesting a service's uses. When we want a service, the argument goes, we usually know what capability we're looking for (like Processor), but we don't always know the exact implementation name it goes by (Workhorse)."

    It's about implementing the service name as a public static final String variable(say SERVICE_NAME)inside the remote interface(service).As RMI requires the remote interface present on client side
    lookup can rely on service.SERVICE_NAME

    19 years ago
    Serialization refers to storing the 'state' of an 'object'(not class) to some persistant storage(database,file etc).
    Look at the following simple code.This does not show you how to do serialization,but is to explain the concept.


    ...Now create a 'Pen' object with ink color blue.

    I want to store the data of myPen(here value 'blue' associated with property 'inkColor')to some permenant storage,and use this data to recreate 'myPen' object at a later time(Even after a machine power failure).
    This is what serialisation is all about.

    Recreate myPen now.

    We will get a pen object with it's ink color 'blue'.The value 'blue' is retained from the persistant storage.This is different from executing the following code again,which creates another object.

    Hope this helps.
    19 years ago