SCEA Preparation: Day 2

Design patterns and Installing glassfish server

Design Patterns
They say “Learning technology” and “Learning to design with technology” are different and if you have to accomplish the later you must know design patterns. In the context of present day’s framework era, like Spring, JBoss Seam, plumbing codes have been taken out virtually from the developers. Also the pioneers of these frameworks built it with excellent orchestration of design patterns. So if you know various aspects of Spring/Seam, do you ever need to learn Design Patterns? Why whould you have to learn MVC (Definitely you are not going to write Servlets and JSPs) when there is Spring MVC/Sun-Seam JSF available out there?
Design patterns are the key to understand any frameworks. Even if a new framework incarnates in the market, knowing the design patterns and its application, your learning curve is very very less.
Design Patterns are the ARCHITECT’s LANGUAGE. Hope i would have convinced a bit about design patterns.

Coming back to our SCEA thingy, Design Patterns are at first priority in my SCEA preparation. Following are the 2 excellent books, the first one being indispensable and cannot be missed out.

  1. Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides
  2. Core J2EE Patterns: Best Practices and Design Strategies (2nd Edition) by Deepak Alur, Dan Malks, and John Crupi

I have backed these books from library and started reading it. First book is not language specific (examples given in C++), whereas the second entirely deals with J2EE patterns (most of these patterns (mainly relating to EJB) are now irrelevant, you can skip them safely). I have started reading the first book, finished with Composite View pattern and parallely referring the 2nd book for J2EE (now Java EE) specific things. Following few blogs will be more about design patterns & UML and less about EJB & Webservices as learning the former influences a lot in learning the later.

Online Resource: (If you dont have enough enthusiasm to read a whole book on design patterns)
1. (Code examples are very useful to learn)

Video tutorial:

Installing glassfish server
Practice, Practice and Practice. Repeat this word 1000 times here. We need an application server for practice. Tomcat will do (as an application server) with present advancements in persistence area. Yet we need a traditional application server. Glassfish is what i would suggest. If you love tomcat, you will love Glassfish too. I use Linux (Ubuntu) at home and installed Glassfish without any hassles. Installed it today in Windows after tackling few problems and ran it. Will include the installation steps (both Linux and Windows) here asap.

EOD 2, I am all set to learn Design patterns (finished Composite View pattern) and my Glassfish server is ready to run my examples.


, , ,


SCEA Preparation: Day 1

The wait is over. Two and a half years over and now i am all set to prepare for Sun Certified Enterprise Architect (SCEA 5.0). They say, that we need at least 5 years of experience (not mandatory) to get SCEA certified. What i believe is, in the course of preparation, we will learn and accomplish a lot. I will update this blog honestly with consistency about my preparation. Following are the very high level information about SCEA and what i am now heading to.
SCEA: (Brief Story, will get updated) It certifies you as a better architect. It identifies you as a architect than a programmer. It expects you as a person who can develop a solution to a problem and deliver that as a model which should be implemented by others. It is claimed as the Pinnacle of Sun certifications. Following are the important areas it covers

1. Design Patterns
2. Model Driven Architecture (MDA) and UML 2.0
3. EJB
4. Webservices
5. Security

My very brief preparation agenda
Currently i have accomplished SCJP and SCWCD. Now i am preparing for SCBCD (Sun Certified Business Component Developer for Java EE 1.5) and SCDJWS (Sun Certified Developer for Java WebServices) simultaneously. Well, these two preparations are absolutely helpful for your SCEA. You can ask me, why we need to do SCBCD and SCDJWS when we can directly take SCEA. Remember, SCEA identifies you as an architect whereas SCBCD and SCDJWS identifies you as a programmer. Following a certification ladder like this SCJP -> SCWCD -> SCBCD -> SCDJWS -> SCEA is always good.

, , , , , ,

1 Comment

Installing Glassfish on Ubuntu Linux

Successfully installed Glassfish server on Ubuntu 8.04 for my certification preparation. What haunts is that the 256 MB Laptop cannot uphold the heavy/lite glassfish server. I am thinking to install a more light weight Linux, may be xubuntu for running glassfish server and deploy example apps.

Following is the ultra-quick list of commands that will take you in no time installing Glassfish on Ubuntu 8.04 (Hardy Heron) Linux. Those in bold letters are the commands. Open a terminal and execute these in sequence.

  1. java -version // Check java version. It must be either Java 1.5 or Java 1.6. If not install Java by typing sudo apt-get install sun-java6-jdk. It asks your password, after you enter it, it will install Java 6.
  2. wget // get the link of latest glassfish server jar for linux from
  3. java -Xmx256m -jar glassfish-installer-v2ur2-b04-linux.jar // Click Accept in the license window that opens
  4. cd glassfish
  5. sudo chmod -R +x lib/ant/bin // Enter password
  6. lib/ant/bin/ant -f setup.xml //Run ant script
  7. cd bin //Go to the directory (usually bin) where asadmin command is available. You can find this by simple ls command or through GUI file xplorer
  8. ./asadmin //Run asadmin
  9. asadmin> start-database
  10. asadmin> start-domain domain1
  11. Type http://localhost:4848/ in browser and login as username: admin and password: adminadmin
  12. asadmin> exit // To shutdown the server, type this in the terminal window

Following is the screenshot of Glassfish server admin console. It comes with default derby database and very much intuitive. This will be of great aid to practice our EJB and Webservice examples and i am going to use it to the maximum to leverage maximum.

, , ,


Registered Linux User #482988

Registered myself as a linux user in
Registered my machine too.
And here is the logo

Leave a comment

Wish you a Happy New Year 2009!

I wish everyone in this world a very Happy New Year 2009!
Let this year 2009 brings happiness, joy and peace.
Let the God bless our planet earth with all enriching nature and peace!
My resolutions are many for this year but not limited to

  • To complete SCEA and help more people on the way.
  • To watch more English movies without subtitle
  • To read more books
  • To develop better relationships and keeping up their promises
  • To not to get angry and keeping cool myself at all times
  • To develop and incubate a project to get something tangible out of my knowledge
  • To participate in forums, conference and open source development
  • To make new friends
  • To donate more i did in 2008

Hope i achieve all of those listed above and others in this 2009.

Leave a comment

How do i read a list of files that starts with a pattern?

I have been working with files quite a long time now and i got a requirement from my friend to read a list of files that starts with a specific pattern. For example, you must return a list of all files that starts with ‘2008-12-‘ in a directory. Thanks to for it gave me a very good start from here. That program deals with reading a list of files that starts with an underscore “_”. Following is the program to read a list of files that starts with a specific pattern and here in this example you can pass the “pattern” as an argument.

public void readFiles()
	String pattern = "2008-12-";
	String startingDirectory = "C:/";
	String[] listOfFilesToParse =
String[] getListOfFilesMatchingPattern(String aDirectory,String pattern)
    class StartingWithFilter implements FilenameFilter
	private String pattern;
	public StartingWithFilter(){
		pattern = "";
	public StartingWithFilter(String s){
		pattern = s;
	public boolean accept(File dir, String s)
        	if ( s.startsWith(pattern) ) return true;
        	return false;
    return new
             list( new StartingWithFilter(pattern) );

Hope that Helps 🙂

Leave a comment

Installed Ubuntu 7.04 and connected to Internet

Brought my virus attacked PC back to life by installing Ubuntu 7.04 (Fiesty Fawn).
Days ago
Earlier, I had many complaints reg. the speed of my laptop having only 256 MB RAM. I consciously chose the number of applications populating my task bar to cope up with my laptop’s speed. Yet the XP installed machine became slower and slower and one day i recognized that my PC is full of virus. The funniest part of it came when i typed “”, the browser(Google Chrome) closed and an alert popped up saying “Orkut banned me!”, LOL 🙂
I had lot of programs, my mini-project and stuffs like that in my pc to be recovered. I packaged all those important files, removed jars (which i download again from net) and uploaded in gmail. I suspect, since a keylogger virus is in my machine, my gmail password may be stolen. Anyway, i was through with the upload and then i asked my friend to change all my google account passwords and other important passwords from his pc.
Sometime back, similar virus invasion happened to my desktop computer and i installed Fedora, but there was a problem in screen resolution. Yes, i accept adopting linux is not that much easy at first, it takes time to learn things, yet you must be patient. I can say, that linux is best for newbies if they are offered with an internet connection.
Now, i have to install some linux distro in my laptop. As i surfed through the cd bag, my hands found ubuntu cds (5.x and 7.04). First of all, i was afraid of 7.04 since i thought my 256 MB RAM will not be sufficient enough to install this. I just put it in my cd drive and reboot the machine. Minutes gone, it never turned up, at last a message said that there is a problem in starting GNOME. No thought of giving up, i put the 5.x version, it was through and i successfully formatted my system, installed the core system and yikes! the installation of additional packages went into a toss. Its because the cd is bit old and with few scratches.
Now, with this half baked installation, i can only login in text mode. 😦
Installing Ubuntu 7.04
Never giving up again, i now put my 7.04 again. To my surprise, it booted up well, live cd thing did the magic and i am into GUI. Waugh! There was an icon in the desktop saying ‘install’. I clicked it and the installation was fine enough. I reboot the machine without cd and its worked fine. i logged into GUI without any hassle.
Problem in connecting to internet
As i told earlier, if you are new to linux, you must be gifted with internet connection to make your life easier in linux world. When i opened Firefox and fired a request to it turned out with “server could not be found”. We have an adsl router at home with my brother’s laptop and mine in the network.
i just borrowed my brother’s laptop and sought help over the forums. Spent 2 hard days with it, at last i fixed the problem with my brother’s help. I did the following in succession and i don’t know what made it work.
1.Deleted iftab file from /etc and reboot the machine
2.sudo ifconfig eth0 up, then did ping and it worked!
3.sudo ifconfig eth0 up
4.sudo ifconfig eth0 ( is the ip i assigned to my machine)
5.Now pinged, brother’s laptop in the same network), ping – all worked successfully and i am writing this post from Ubuntu.
Meanwhile, ensure whether you have plugged the ethernet cable into your machine, coz, i wasted some 2 hours troubleshooting my pc without ethernet cable plugged in. LOL. :> Also some switching off/on the router helps in other cases.