After getting the feel of basic programming model of Java RMI, i tried to dig further into the model to see more practical tricks used in RMI architecture which makes it more practical.
few things to look into:
1. RMI Threading
2. RMI Callback
3. RMI (Blocking or Non-blocking)
4. RMI Serialization
5. RMI Classloader
6. RMI Synchronization
This are the four key issues i should raise today.
1. RMI threading.
each client request is initiated in a separate thread but server is just a single object.
It means whenever client makes a remote call, a new thread will be created on server which will be representing that client but only a single instance of server module would be running.
*****Problem Here*******
How to resolve this: Make your server multithreaded or launch the application using web services which will automatically make it multithreaded.
2. RMI serialization
stub and skeleton will automatically serialize the results back to caller.
Object are serialized and send back as pass by value mode.
Wednesday, December 31, 2008
Tuesday, December 30, 2008
Wednesday, December 24, 2008
Article on runtime.exec() function
Excellent article. Much better understanding and concepts now.
Will keep reading it time to time..
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
Will keep reading it time to time..
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
Monday, December 22, 2008
Sunday, December 21, 2008
Saturday, December 20, 2008
Wonderful explanation of java runtime.exec()
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
Gud gud gud
Gud gud gud
Wednesday, December 17, 2008
Monday, December 15, 2008
multithreading
http://www.ajug.org/archive/ajug-members/10310/msg00045.html
servlet multithreading....
servlet multithreading....
Thursday, December 11, 2008
java common error and common causes...
http://blogs.sun.com/sundararajan/entry/java_class_ic_errors
my postgresql errors...
fixes:
put \encoding latin-1 at the start of create_databse.sql file of juddi distro
put pg_set_client_encoding($connection_resource, "Latin1")
remove ${prefix} from all the lines.
changes client_encoding value from /etc/postgresql-8.3/
Thanks
Saurabh
http://blogs.sun.com/sundararajan/entry/java_class_ic_errors
my postgresql errors...
fixes:
put \encoding latin-1 at the start of create_databse.sql file of juddi distro
put pg_set_client_encoding($connection_resource, "Latin1")
remove ${prefix} from all the lines.
changes client_encoding value from /etc/postgresql-8.3/
Thanks
Saurabh
Tuesday, December 9, 2008
Sunday, December 7, 2008
679 cd /var/lib/tomcat5.5/
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130
679 cd /var/lib/tomcat5.5/
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130
unsatisfied link error .... this commands are snapshot of my history of some terminals.
sudo ln -s one was the main command to resolve unsatisfied link error in tomcat....
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130
679 cd /var/lib/tomcat5.5/
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130
unsatisfied link error .... this commands are snapshot of my history of some terminals.
sudo ln -s one was the main command to resolve unsatisfied link error in tomcat....
Friday, December 5, 2008
Thursday, December 4, 2008
315 cd ../../cache/tomcat5.5/
316 ls
317 cd Catalina/
318 ls
319 cd localhost/wo
320 cd localhost/
321 ls
322 rm -rf Jerboa
323 ls
324 /etc/init.d/tomcat5.5 stat
325 /etc/init.d/tomcat5.5 start
326 ls
327 cd
328 exit
329 clear
330 ls /var/lib/tomcat5.5/
331 ls /var/lib/tomcat5.5/conf
332 cd /var/lib/tomcat5.5/conf
333 /etc/init.d/tomcat5.5 stop
334 ls
335 nano catalina.policy
336 nano catalina.properties
337 nano context.xml
338 nano policy.d/04webapps.policy
339 nano server-minimal.xml
340 nano tomcat-users.xml
341 nano web.xml
342 /etc/init.d/tomcat5.5 stop
343 /etc/init.d/tomcat5.5 start
344 find / -name "catalina.out"
345 less /var/log/tomcat5.5/catalina.2008-12-04.log
346 tail -f /var/log/tomcat5.5/catalina.2008-12-04.log
347 less /var/log/tomcat5.5/catalina.2008-12-04.log
348 history
look at these commands
316 ls
317 cd Catalina/
318 ls
319 cd localhost/wo
320 cd localhost/
321 ls
322 rm -rf Jerboa
323 ls
324 /etc/init.d/tomcat5.5 stat
325 /etc/init.d/tomcat5.5 start
326 ls
327 cd
328 exit
329 clear
330 ls /var/lib/tomcat5.5/
331 ls /var/lib/tomcat5.5/conf
332 cd /var/lib/tomcat5.5/conf
333 /etc/init.d/tomcat5.5 stop
334 ls
335 nano catalina.policy
336 nano catalina.properties
337 nano context.xml
338 nano policy.d/04webapps.policy
339 nano server-minimal.xml
340 nano tomcat-users.xml
341 nano web.xml
342 /etc/init.d/tomcat5.5 stop
343 /etc/init.d/tomcat5.5 start
344 find / -name "catalina.out"
345 less /var/log/tomcat5.5/catalina.2008-12-04.log
346 tail -f /var/log/tomcat5.5/catalina.2008-12-04.log
347 less /var/log/tomcat5.5/catalina.2008-12-04.log
348 history
look at these commands
Wednesday, December 3, 2008
read in details sometime... related to tomcat..
http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=4
Monday, December 1, 2008
PlanetLab java installation
http://www.ece.ubc.ca/~samera/TA/411/project/jre-installation.html
This is script which can be used to install basic utilities and s/w modules on PlanetLab.
#!/bin/bash
sudo yum clean all
sudo yum update
sudo yum -y install less
sudo yum -y install flex
sudo yum -y install bison
sudo yum -y install bc
sudo yum -y install rpm-build
sudo yum -y install ftp
sudo yum -y install cvs
sudo yum -y install gcc
sudo yum -y install automake
sudo yum -y install autoconf
sudo yum -y install libpcap
sudo yum -y install make
sudo yum -y install wget
exit 0
# Download the jre.tar.gz(http://www.ece.ubc.ca/~samera/TA/411/project/jre.tar.gz) file.
# Copy the file to the remote machine using scp command.
# Unzip and extract the file to your home directory.
# Add the following lines to you .bash_profile file, where
# PATH=/home/SLICE_NAME/jre1.6.0_07/bin:$PATH
# export PATH
# Where:
# SLICE_NAME is your slice name (for example usf_scatter)
This is script which can be used to install basic utilities and s/w modules on PlanetLab.
#!/bin/bash
sudo yum clean all
sudo yum update
sudo yum -y install less
sudo yum -y install flex
sudo yum -y install bison
sudo yum -y install bc
sudo yum -y install rpm-build
sudo yum -y install ftp
sudo yum -y install cvs
sudo yum -y install gcc
sudo yum -y install automake
sudo yum -y install autoconf
sudo yum -y install libpcap
sudo yum -y install make
sudo yum -y install wget
exit 0
# Download the jre.tar.gz(http://www.ece.ubc.ca/~samera/TA/411/project/jre.tar.gz) file.
# Copy the file to the remote machine using scp command.
# Unzip and extract the file to your home directory.
# Add the following lines to you .bash_profile file, where
# PATH=/home/SLICE_NAME/jre1.6.0_07/bin:$PATH
# export PATH
# Where:
# SLICE_NAME is your slice name (for example usf_scatter)
Subscribe to:
Posts (Atom)