Scorpion's Corner
Glassfish Update Tool on MAC OS
There will not be any JAVA_HOME set by default on MAC OS and also it will not be in the standard folder way as in case of Windows / Solaris. The Default Java would be in the /System/Library/Frameworks/JavaVM.framework/Versions/ directory with each version like 1.3, 1.4 installed. Also the directory structure would be
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ ls -la
total 0
drwxr-xr-x 9 root wheel 306 Jun 2 13:31 .
drwxr-xr-x 14 root wheel 476 May 29 17:27 ..
drwxr-xr-x 11 root wheel 374 May 29 17:27 Classes
drwxr-xr-x 35 root wheel 1190 May 29 17:27 Commands
drwxr-xr-x 13 root wheel 442 May 29 17:27 Headers
drwxr-xr-x 12 root wheel 408 Jun 3 19:46 Home
drwxr-xr-x 45 _update_sharing wheel 1530 May 29 19:00 Libraries
drwxr-xr-x 25 root wheel 850 Jun 4 10:07 Resources
drwxr-xr-x 4 root wheel 136 Jun 3 19:47 lib
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$
So the default update tool which comes with glassfish would not work since the same has the command starting with ""$JAVA_HOME"/bin/java -Dcom.sun.updatecenter.home="$UPDATECENTER_HOME" -cp ....."
Execution will throw error ./bin/updatetool: line 13: /bin/java: No such file or directory
We can circumvent this by replacing "$JAVA_HOME"/bin/java " with "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java" since the Java executable will be in the Commands folder of the JAVA_HOME

Posted at 06:07PM Sep 18, 2009 by Narayana Rallabandi in Sun | Comments[0]
Running Open MQ with Java CAPS Server and accessing the same in eManager
For running Open MQ as a seperate process and then hooking the same to the Java CAPS and monitor the same in the eManager you need to do the following things:
- Download the Open MQ for the OS and start the Open MQ. This would start the MQ on the default port 7676.

- Modify the domain.xml of the Java CAPS installation for the JMS to run as "REMOTE" instead of the default "EMBEDDED". We need to make modification in the following element
- <jms-service addresslist-behavior="random" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="REMOTE">
<jms-host admin-password="admin" admin-user-name="admin" host="narayana-rallabandis-macbook.local" name="default_JMS_host" port="7676"/>
</jms-service> - Start the glassfish with Open MQ running as separate process...
- Start eManager
- Go to J2EE Section and add the Glassfish domain that is currently running.. You should able to see the Open MQ in the server section.
Hope this helps !!!..

Posted at 11:21AM Sep 16, 2009 by Narayana Rallabandi in Sun | Comments[0]
Glassfish Startup problem -- /etc/hosts entry
I had an opensolaris environment on which I was running GlassfishESB. Since I had to connect to a local Network I had to make some changes to the /etc/hosts file and add an entry to the same.
After that I tried to restart Glassfish it did not restart. It failed at the following point
ADM1079: Initialization of AMX MBeans started
It gave the following exception in server.log. I had to modify the hosts file to make the server start again.
[#|2009-04-08T15:57:28.501+0530|SEVERE|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12;com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out];_RequestID=c39a90fc-8790-4b27-aa91-730bf7b8ba85;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12 cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out]|#]
Posted at 08:50PM Apr 08, 2009 by Narayana Rallabandi in Sun | Comments[3]
Java CAPS tip on Open Solaris
I recently installed Java CAPS on Open Solaris 10. I observed that I could not access repository from browser.
I tried to look at the following in the process of debugging:
- install.info in the repository directory
- tried to access localhost:12000
- 127.0.0.1:12000
- <hostname>:12000
- <ipaddress>:12000
but all went in vain.
After a while of debugging I found that I installed punchin which erased the /etc/hosts file entries while installing the punchin client. After the entries are restored manually I could access the repository !
Hope this helps somebody who is having a similar issue.
Posted at 11:10AM Mar 16, 2009 by Narayana Rallabandi in Sun | Comments[1]
VirtualBox
The latest version of VirtualBox is released on Feb 16th. This blog item is right from the same box, I could use Windows Live Writer in Windows XP which is my guest system while the host system is Open Solaris.
The whole experience is truly amazing!!! You can have best of the worlds in each operating systems from single desktop..
Try it out today!
Posted at 04:43PM Feb 27, 2009 by Narayana Rallabandi in Sun | Comments[0]
Day 2: Sun Tech Days - Hyderabad
Today's highlights from my perspective are
- Matt Thompson's presentation on cloud computing -- Matt explained the bits and pieces of cloud computing, Sun's offering in cloud computing stack. The most interesting piece for the development community is how the computing going to transform the way we code. Project Kenai and Project Zembly.
- Chck's presentation on Java FX, which is coherent, ordered and informative
- Simons presentation was very informative on Java performance..
Project Kenai doe's just offer site for pushing in the code like sourceforge, but it offers the full development stage including desktop,offers for choosing OS, build environment, test environment all on the cloud apart from the development tools like Netbeans. This offers the developers to choose the environment they want to develop, test deploy with out paying a penny out of their pocket. Just have Internet connection and create a company with zero cost. Have a distributed team over the net use the Sun's cloud facility to host your idea.
Project Zembly is another innovation from Sun which gives the users the power to create the widgets for social applications and share them with their family, friends and the whole world. The demo by Vidya on stage with Matt proved that simple social application can be developed previewed just on the browser without any other paraphernalia like IDE, runtime to test on the developer's machine. So the Browser happens to be the dev place ..
And when we think of the possibilities which these 2 innovations can bring to the way we think about apart from other things to the software development its awesome!!!!
Out of the stalls from the students, I liked the one from MS Ramaiah college of Bangalore, which have done a POC on Network Management solution available on web services. I spoke to them regarding ideology of Network Virtualization in the Management paradigm.
Apart from that I had few good discussions with the attendees for the yesterday's session on Open-ESB. The questions centered around why should they choose Open-ESB while they have other alternatives also in open source. I would like to post the answers though in some other posts..
Evening entertainment is from Abhi which was simply scintillating and enthralling the crowed. I have some pics for you!
Posted at 10:06PM Feb 19, 2009 by Narayana Rallabandi in Sun | Comments[0]
Sun Tech days Day 1 at Hyderabad
Sun Tech days started today in a gala fashion today at HICC center defying the economic downturn. For Sun Hyderabad is important since the developer participation is resembles JavaOne the biggest developer conference in size, number of tracks its offering apart from hands on labs.
The presence of James Gosling for this event says how much important this event in India is for Sun. James delivered key note spoke on lot of technologies but the most interesting for me are the following in the following order:
- Real time java -- because of the sheer technical challenges it poses like predictability. Just imagine how can you predict the Garbage collection in such a scenario or handling of thread priority ...
- Ubiquitous computing and the power of Java
- Java FX -- bringing the power of rich client experience that's much needed for Java plat form. The small game demo which he showed on his mobile apart from Chuck lee's another small presentation on FX again really were eye catchers...
- Java 7 -- and what's coming there.
The crowd is still fantastic during these times and Sun I believe is very successful in pulling so much.. Kudos to the event organizers.
On a personal note I presented Open - ESB on Enterprise Track. Seemingly went well I 'll be posting the site so that you can download the preso!
The night party started with a wonderful performance from the trio (see below for pics) and ended with a fashion show from Rahul's team which was received with enthusiasm from the crowd.
Glimpse of the crowed during the inaugural session
Father of Java speaking to Hyderabad Sun Tech Days crowed
The wonderful kids Siddhardh (11) on percussion, Raja Reddy on Guitar and Sastry on Casio
Posted at 12:30AM Feb 19, 2009 by Narayana Rallabandi in Sun | Comments[3]
Glassfish Portfolio Announced
Sun announced its Glassfish Portfolio which can be called its middle tier continuum yesterday. You can peek at whats there in that from the link: Sun GlassFish Portfolio - What's Inside
Though its a bit tough with respect what does it mean by each of the globes that are on the page currently, once you go through the details you can see that its almost akin to the previous JES stack. The additions being the ESB since the integration layer was not there previously and the communication server (SIP Servlet based). Apart from that it's integrated web stack contains of popular open-source, Web-tier infrastructure
technologies such as Apache HTTP server, MySQL, memcached, PHP, and
Ruby optimized for the Solaris, OpenSolaris, and Linux platforms.
Some of the enterprise features like profiling with Enterprise Manager which comes with subscriptions (Sun offers for this portfolio flexible subscription-based pricing) .
Give it a try TODAY!!!

Posted at 12:20AM Feb 12, 2009 by Narayana Rallabandi in Sun | Comments[0]
A Week to go for Sun Tech Days at Hyderabad
The biggest tech event out side US for Sun is coming soon from 18th to 20th of February 2009.
For more information about Sun Tech Days and to view tentative agenda topics and registering for the event visit http://www.sercononline.com/suntechdays09/index.htm
Posted at 09:12PM Feb 10, 2009 by Narayana Rallabandi in Sun | Comments[0]
Integration Server Startup time issues
Its observed that when we develop applications on Java CAPS up till 5.1.3 the common size of the ear file happens to be 12 -15 MB. Its also observed that when we have normally applications more than 4 - 5 the domain startup time increases. Generally we can not make any difference to the startup time of the domain.
The following are some of the tips which can possibly be followed to bring down the startup time. You should not curse me if this doesn't work out
.
1. start the appserver in '-server' mode (JVM options). If this flag is not there, your app server JVM will spin trying to compile all the EAR code.
2. keep your Min and Max heap size the same (e.g. 2GB, what ever we have) to get more efficient heap size allocation and save on time.
3. Another thing to look out for is EAR file size... if all ear's have redundant jar's packaged within them, we can separate them and
put in /lib folder and not embedded in each EAR (class loading delay) --
4. Have you tried to deploy one app at a time and what effect it has on the startup time in case any specific app is taking much longer than
others? --- We can have some pointers here as to which application is taking more startup time.
5. Apart from above since these issues with respect to the performance needs to be seen in isolation we need to look at each of the ear with respect to the startup time. Since this can give a closure look at which application is causing the issue we can have a close look.
Why does the deployment take long time ? -- The application server a.k.a. IS is SJSAS 8.1 version. All the applications of the previous versions of the Java CAPS bundle the "rar" or the connector files with each of the ear file. Also the packaged applications used to create the resource connection pools etc. during the deployment time, which takes considerable time.
That said, I would recommend to move to SJSAS 9.1 for deployment since there has been lot of improvement with respect to startup time, resource pool management, cluster profile, performance etc.
I will cover moving to 6.0 in some other post believe me its simple.
Post your experiences with these options or any other options if there are any...
Posted at 11:19PM Dec 17, 2008 by Narayana Rallabandi in Sun | Comments[0]
CEC Update
CEC 2008 is over land I will be bringing back good memories and experiances on with respect to networking with the attendees.
For Sun this event I felt was important from the perspective of "Skill upgrade" of the folks in the services side be it on Sales or Delivery and I believe that this is the right strategy since to remain competitive you need to be competent. Pursuing this direction the following steps are taken
- the sessions are made more technical,
- more observed
- Attendee needs to stick to a single track
- and are evaluated at the end of the session giving in accreditations
- provisioning for free tests encouraging the attendees to get certified
All the sessions went with vigour till the last day though marred to some extent because of announcement RIF on the last day.
During my interaction I felt that there is need for know how with respect to each feature on the following
- What is the product feature
- How is that implemented (And Why That Way if possible)
- Why are we doing some thing in a particular way and the implications of that
I resolved that in my future technical items I will commit to writing in that way since that would be of more use to the people in many ways.
Posted at 07:07PM Nov 15, 2008 by Narayana Rallabandi in Sun | Comments[0]
Attending First CEC
I am attending to Sun's CEC (Customer Engineering Conference) from Nov 10th - 14th 2008. This is my first CEC, since I moved to Professional Services Delivery in June 2008.
From the general session of yesterday its evident that Services is going to play a major part in Sun's offering and there is great emphasis on the quality of serivices that are provided. I am currently enjoying meeting my friends from Monrovia and attending sessions on Java CAPS track. I am getting a lot to learn since I am meeting the folks from the field and talking to them.
I will be posting more on CEC
Posted at 10:42PM Nov 11, 2008 by Narayana Rallabandi in Sun | Comments[0]
Utilizing 64bit JVMs in Java CAPS Integration Server
A very common error that is observed with Java CAPS Integration
Server is "Out of Memory". What can we do about it?
Posted at 10:58PM Sep 16, 2008 by Narayana Rallabandi in Sun | Comments[6]
Common Reasons for Out Of Memory Errors
Out Of Memory error can happen due to following reasons:
- Garbage Collection Issues
- Orphaned Class loaders
- Thread context classloader
- new Thread()
- Dangling thread
- Classes with following references
- static variables
- SQL Driver
- Commons logging
- java.util.logging.Level
- Bean util
- Details
etc..
We can analyze the problem(s) associated with such errors at application level by having GC details and/or heap dump
- -verbose:gc with -XX:+PrintGCDetails for observing GC model for tuning or altering suitable GC for the application
- -XX:+HeapDumpOnOutOfMemoryError
- -Xrunhprof:heap=dump,format=b
- jmap -dump:format=b,file=heap.bin <pid>
Analyze heap dump using Jhat
- jhat -J-mx1024m heap.bin
- http://localhost:7000
- Using built-in or custom queries to narrow down leak suspects
- Identify an object or class in the application
- List reference chains
Posted at 10:58PM Sep 16, 2008 by Narayana Rallabandi in Sun | Comments[0]
Running web application under large concurrent user loads
Whenever we talk about the load/performance
typically it depends on all the tiers on which the application is
working. Hence we need to look at the following things.
- Nature of the Application vs.Hardware on which the application
runs because -- " machine which appears slower in a single-threaded
test will likely be faster in a multi-threaded world."
- Tune the DB/EIS tier,
- Tune the Application Server for the middle tier (where POJOs
& SLSBs run) and also
- Tune the Web/portlet Container where the eVision application
runs.
- Apart from that the application since it can have some really
"messy code" which takes longer time to load the page or loads in
memory data.
Ideally in in such cases we should think of load balancing the Application under
consideration in a cluster. Once you do this there are few other things you need to
look at with respect to the following:
- JVM options of the Application server. A set of properties like Heapsize, Garbage Collection properties etc. depending upon the Application's nature.
- Increase the pool size of the DataBase that is being hit from the connector/JCA perspective with in the Application Server
- Do DB/EIS tuning: Tuning the database performance is not a simple task and it
depends on Application specific requirements, the operating system
and the target hardware. There is no single approach.
The goal is to avoid obvious slowdowns and balance the available
resources (I/O bandwidth, memory and CPU).
- From the Web/portal server perspective.We need to tune the
- WebContainer
- AccessManager (Manages Sign on) - this can have issues if running behind firewall or the network settings.
- Directory Server
- Run some tuning scripts those come by default with the portal
- Thread Pools : The Java Virtual Machine (JVM) can support
many threads of execution
at once. To help performance, both Access Manger and Portal Server or Application Server
maintains
one or more thread pools. Thread pools, allow you to limit the total
number
of threads assigned to a particular task. When a request is passed into the web container from a browser
it will flow
through several thread pools. A thread pool contains an array of WorkerThread
objects. These objects are the individual threads that make up
the pool. The WorkerThread objects will start and stop
as work arrives for them. If there is more work than there are WorkerThreads,
the work will backlog until WorkerThreads free up. Assigning an
insufficient amount of threads in a thread pool can cause a bottleneck
in
the system which is hard to see. Assigning too many threads to a thread
pool
is also undesirable but normally is not critical. These can be managed either using Admin console or any script provided or using any other means given by the vendor.
Posted at 03:01AM Jul 12, 2008 by Narayana Rallabandi in Sun | Comments[0]







