Monday, February 28, 2011

Beware of helping

When you do help, just make sure you are 100% aware of whom you are helping and what kind of person he is and what kind of habits he is having though you know him from your college days. Otherwise surely you will be in trouble. This happened to me since I shared my room to a ...

My Learnings today

Attended one interview today and learned something about OOPS.

Example for Abstract Class and interface:

Interface is for generalization and Abstract class in for specification. For example if you would like to manage car, bike, lorry etc. They all belong to Vehicle category which is generalization, car has wiper and bike does not have wiper which is specialization.

Tuesday, February 22, 2011

Good technical certification sites

Tried these two sites which are really good technical certification sites.

http://www.ucertify.com
http://www.brainbench.com

Ucertify has very good format for the test. It makes us to learn concepts with intuitive questions.  Brainbench has lot of free tests and relatively its easy to pass brain bench test than ucertify. There are two free practice tests in ucertify that helps you to qualify for the other practice tests and the real test.

Friday, February 18, 2011

Glassfish - Form Based Authentication

One interesing thing I missed out is role name defined in web.xml should be mapped to user group name in glassfish server. I have set role name as admin in web.xml and created an user in glassfish through Admin Console ----> Security ----> Realms ---->  File ---> Manager Users. On creating the user set the groupname as given in web.xml and it works.

Thursday, February 17, 2011

Adding xml entries in Blogs

Today suddenly I am getting xml entries are not getting displayed properly in my blog post. Then found it is because of Compose Settings in Post Options. If you set Compose Settings as Interpret typed HTML, xml entries are not displayed correctly i.e xml to html translation is not happening properly. If I set Compose Settings as Interpret typed HTML, then translation is happening properly.

JBoss - Form Based Authentication

This is how I made Form Based authentication work for JBoss.

web.xml entries:

<security-role>
                <role-name>admin</role-name>
        </security-role>             
   <security-constraint>

    <display-name>User Name/ Password </display-name>

    <web-resource-collection>
        <web-resource-name>Makes User Authentication Necessary for all</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>

    <auth-constraint>
        <role-name>admin</role-name>
    </auth-constraint>

</security-constraint>
 
  <login-config>
           <auth-method>FORM</auth-method>
            <realm-name>file</realm-name>
           <form-login-config>
                        <form-login-page>/WEB-INF/jsp/login.jsp</form-login-page>
                        <form-error-page>/WEB-INF/jsp/error.jsp</form-error-page>
                </form-login-config>
  </login-config>

Then <jbosshome>/server/default/conf/login-config.xml has to be edited to update web-console application-policy. My login-config.xml looks like,

<application-policy name="web-console">
    <authentication>
      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
        flag="required">
        <module-option name="usersProperties">users.properties</module-option>
        <module-option name="rolesProperties">roles.properties</module-option>
      </login-module>
    </authentication>
  </application-policy>

Added users.properties and roles.properties in <jbosshome>/server/default/conf directory. This setup works for me.

Wednesday, February 16, 2011

Morning Dreams History

During my child hood I used to get dreams like fighting with soldiers, fighting with snakes. I get sequence of events and not persons. I normally wake up before identifying the persons with whom I am fighting. But now a days I am getting persons and faces. One day Sachin saying to me that he knows me in the dreams. Hummmmm.. but in reality I am unable to get a ticket for a World Cup India match in Chennai.