Parameters in RMI
RMI supports method calls to remote objects.
- When these calls involve passing parameters or accepting a return value, it depends on whether the parameters are :
I. Primitive data types.
III. Remote objects.
- When the parameter is passed to a method the JVM makes a copy of the value places the copy on the stack and then executes the method.
I. PRIMITIVE PARAMETERS:
a) When a primitive data type is passed as a parameter to a remote method, the RMI system passes it by value.
b) RMI will make a copy of a primitive data type and send it to the remote method. If a method returns a primitive data type, it is also returned to the calling JVM by value.
c) Values are passed between JVMs in a standard, machine-independent format.
d) This allows JVMs running on different platforms to communicate with each other reliably.
II. OBJECT PARAMETERS:
a) When an object is passed to a remote method, the semantics change from the case of the single JVM.
b) RMI sends the object itself, not its reference, between JVMs.
c) It is the object that is passed by value, not the reference to the object.
d) Similarly, when a remote method returns an object, a copy of the whole object is returned to the calling program.
e) Because different JVMs do not share heap memory, RMI must send the referenced object and all objects it references.
f) RMI uses a technology called Object Serialization to transform an object into a linear format that can then be sent over the network wire.
g) Object serialization essentially flattens an object and any objects it references.
h) Serialized objects can be de-serialized in the memory of the remote JVM and made ready for use by a Java program.
III. REMOTE OBJECT PARAMETERS:
a) A client program can obtain a remote reference to a remote object, through the RMI registry program.
b) When a method returns a local reference to an exported remote object, RMI does not return that object.
c) It substitutes another object (remote proxy for that service), in the return stream.
d) When a reference is returned to the server, it is not converted into a local reference.
e) When the object from the server is returned, to the client the proxy object is substituted.
Posted by Vissicomp Technology Pvt Ltd
For more http://www.vissicomp.com
How to create Data Source Name (DSN) In Window
Create a System DSN in Windows
- Click on Start button , Select Control Panel, point to Administrative Tools, and then double-click Data Sources (ODBC).
- Click the System DSN tab
- Click Add.
- Click the database driver that corresponds with the database type to which you are connecting, and then click Finish.
Type the data source name. Make sure to you a name that you will remember. You will need to use this name later.
- Select server name from server dropdown list.
- Click on next button.
- Click the correct database, and then click on next Button
- Click finish button.
Firewall Issue in RMI
- Firewalls are inevitably encountered in any network, that has to operate beyond the sheltering confines of an Intranet.
- They block all the network traffic with certain exceptions defined in the rule-set.
- Since RMI opens a dynamic socket connection, between client and server to facilitate communication, the JRMP traffic is blocked by most protocols.
- On top of TCP/IP RMI uses a wire level protocol – Java Remote Method Protocol (JRMP).
- To get across a firewall, RMI makes use of HTTP tunneling by encapsulating RMI calls, within an HTTP post.
- In the above scenario, when the transport layer tries to establish a connection with the server, it is blocked by the firewall.
- When this happens, the RMI transport layer automatically retries by encapsulating the JRMP call data within an HTTP POST request. The HTTP POST header for the call is in the form:
- If a client is behind a firewall, it is important that you also set the system property http.proxyHost appropriately.
- Since almost all firewalls recognize the HTTP protocol, the specified proxy server should be able to forward the call directly to the port on which the remote server is listening on the outside.
- Once the HTTP-encapsulated JRMP data is received at the server, it is automatically decoded and dispatched by the RMI transport layer.
- The reply is then sent back to client as HTTP-encapsulated data.
- In this case, the RMI transport layer uses one additional level of indirection. This is because the client can no longer send the HTTP-encapsulated JRMP calls to arbitrary ports as the server is also behind a firewall. Instead, the RMI transport layer places JRMP call inside the HTTP packets and send those packets to port 80 of the server. The HTTP POST header is now in the form
- This causes the execution of the CGI script, java-rmi.cgi, which in turn invokes a local JVM, unbundles the HTTP packet, and forwards the call to the server process on the designated port.
- RMI JRMP-based replies from the server are sent back as HTTP REPLY packets to the originating client port where RMI again unbundles the information and sends it to the appropriate RMI stub.
- Of course, for this to work, the java-rmi.cgi script, which is included within the standard JDK 1.1 or Java 2 platform distribution, must be preconfigured with the path of the Java interpreter and located within the web server’s cgi-bin directory.
- It is also equally important for the RMI server to specify the host’s fully-qualified domain name via a system property upon startup to avoid any DNS resolution problems, as:
Posted by Vissicomp Technology Pvt Ltd
For more http://www.visscomp.com
1. What is Linux?
Linux is, in simplest terms, an operating system. It is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions. The operating system (OS) relays instructions from an application to, for instance, the computer’s processor. The processor performs the instructed task, then sends the results back to the application via the operating system.
But something sets Linux apart from these operating systems. The Linux operating system represented a $25 billion ecosystem in 2008. Since its inception in 1991, Linux has grown to become a force in computing, powering everything from the New York Stock Exchange to mobile phones to supercomputers to consumer devices.
As an open operating system, Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. Companies participating in the Linux economy share research and development costs with their partners and competitors. This spreading of development burden amongst individuals and companies has resulted in a large and efficient ecosystem and unheralded software innovation.
Over 1,000 developers, from at least 100 different companies, contribute to every kernel release. In the past two years alone, over 3,200 developers from 200 companies have contributed to the kernel–which is just one small piece of a Linux distribution.
This article will explore the various components of the Linux operating system, how they are created and work together, the communities of Linux, and Linux’s incredible impact on the IT ecosystem.
- Where is Linux?
One of the most noted properties of Linux is where it can be used. Windows and OS X are predominantly found on personal computing devices such as desktop and laptop computers. Other operating systems, such as Symbian, are found on small devices such as phones and PDAs, while mainframes and supercomputers found in major academic and corporate labs use specialized operating systems such as AS/400 and the Cray OS.
Linux, which began its existence as a server OS and Has become useful as a desktop OS, can also be used on all of these devices. ‚ÄúFrom wristwatches to supercomputers,‚Äù is the popular description of Linux’ capabilities.
An abbreviated list of some of the popular electronic devices Linux is used on today includes:
These are just the most recent examples of Linux-based devices available to consumers worldwide. This actual number of items that use Linux numbers in the thousands. The Linux Foundation is building a centralized database that will list all currently offered Linux-based products, as well as archive those devices that pioneered Linux-based electronics.
Posted by Vissicomp Technology Pvt Ltd
- COMPOUND INTEREST
M = P( 1 + i )n
M is the final amount including the principal.
P is the principal amount.
i is the rate of interest per year.
n is the number of years invested.
Applying the Formula
Let’s say that I have $1000.00 to invest for 3 years at rate of 5% compound interest.
M = 1000 (1 + 0.05)3 = $1157.62.
You can see that my $1000.00 is worth $1157.62.
Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle
Surface Area and Perimeter of a Triangle