Wednesday, August 19, 2009

Adobe Flash not working with Firefox-3.5 in Ubunutu 9.04

I was trying to use Balsamiq through latest Firefox installed in Ubuntu 9.04, but it didn't work. I was getting the following blank page:



While searching for solution, I found the following commands here, which fixed the problem with flash player and Balsamiq worked successfully then.
From terminal, execute the following commands:
wget http://queleimporta.com/downloads/flash10_en.sh
sudo sh ./flash10_en.sh





After running the above commands successfully, I can see Balsamiq mockup pop-up window...

Friday, July 10, 2009

BlogCamp2 Pune

When I reached BlogCamp @ 09:45 AM, I was expecting lots of geeks to be present there. But to my disappointment, there were not many present :-( . Other disappointment was, no T-shirts offered at registration counter :-( . One new thing(at least for me) at the counter was, instead of the email id, they asked for my Twitter id - @moresach (I had one, but never used!).

Tarun, one of the organizers of Blogcamp2, started with an introduction to BlogCamp @ 10:10 AM, with a nice PPT having picture on almost every slide (I think, A picture speaks a thousand words). As it was an unconferencing conference he asked us to introduce ourselves. Luckily, I was introducing myself, someone clicked my picture and to my surprise, the same picture was published in next day's TimesOfIndia. After quite a bit of effort, today I could finally find the photographer and got this picture!

I really liked the enthusiasm of the attendees, especially the Mumbai bloggers were really energetic.

Sessions at Blogcamp:

@MeetuKabra

The first session at BlogCamp was really interactive. Meetu blogs on movie reviews & her topic was “Marketing your Blog”. She wasn’t new to blogging, but certainly did n0t have much expertise in marketing her blog that effectively. Other bloggers from the audience gave many useful inputs. Meetu appreciated all of those inputs & accepted quite a few of them. I really liked this session, as it was more of discussion than typical presentation.

@Farrad

He was the youngest blogger of the blogcamp, he is just 15. And most of us were surprised that his blog gets around 38,000 hits a month!

@Scientist

This was one of the most knowledge rich, however monotonous session. No one asked a single question during or after the session. Maybe everyone was feeling sleepy with there stomach full.

@Abhishek Thakkar,

He became the center of attraction at the end of BlogCamp! Whoever was sleeping in earlier session(at least I was) was shaken & woke up with Abhiskek’s standup act in lobby.

Have you read "Five Point Someone" by Chetan Bhagat? I was feeling like Chetan is standing in front of me & narrating his story. Yes, Abhishek is also an ex IITan. In the lobby, when he was sharing his experiences on various kinds of blogging, no one wanted to step away. He reiterated, "All of my blogs are in Cryo state now. And there is no point in visiting them at this moment. But they can revive anytime." I couldn't stop myself from checking out his extraordinary blogs & I could find them immediately through my iPhone. After some time, all of us moved to the conference room and enjoyed Abhishek's stories for almost an hour (I can't recollect from where I grabbed these pictures now)


Others:
Besides the above sessions, there were few more good sessions as well. Ankesh talked about "How to make money from blogging". Navin gave us many useful tips on blogging and also explained how bloggers can learn from the Newspapers.

Annkur had a lot of debate in his session on beginners mistakes. He also discussed, How he is moving from quantity to quality of blog.

I missed one parallel session which was going on at the time of Annkur's session: "How to migrate to WordPress", so you can see, I am still on Blogger!

It wasn't a great finish, I left the place as soon as Thakkar finished his entertainment! However it was worth visiting the camp. I am following most of them on twitter now along with few more ppl I found I would love to follow. That's one of the important take away for me from this Camp.

Looking forward to attend the upcoming BarCamp(waiting for the date to be announced)!!!

Thursday, July 02, 2009

Thunderbird - Lightning does not work in Ubuntu 9.04

I am back on Ubuntu :-( (newer version though) converted to Mac look. First thing TODO in new platform is, get all your emails back to work. So I installed Thunderbird migrated all my old mails & calendar data to new client. However the calendar isn't showing all my old data now.

Calendar plugin I used was lighting, which doesn't work simply copying everything, faced this issue while Thunderbird Migration from Ubuntu to Windows. So uninstalled lightning & installed it again, but this time it didn't work as last time.

The solution to get out of the this issue is install this lib:

sudo apt-get install libstdc++5

This worked for couple of my other colleagues too.

Sunday, April 05, 2009

Weblogic issues not with jBoss

I’ve worked with Weblogic & jBoss both the application server for quite some time now. While working on weblogic I’ve faced some issues, below are couple of them which are not issues with jBoss:

1. CacheFullException.

2. Stuck Thread.


CacheFullException:

Cause of Exception: This issue would occur when number of Entity beans cached in memory goes beyond the default size or the size configured in weblogic.xml.

Solution: There is one attribute which can be set in weblogic.xml, to set maximum number of beans can be held in memory. If this attribute not configured explicitly, the default value is 1000. This is only a work around for CacheFullException. Why I am saying ‘only work around’ is because, you are only delaying the problem but not really resolving it with setting. If the usage of the application goes high, the value you have set would not be sufficient eventually.

After long struggle the solution we have implemented is, set the attribute value to some reasonable value & have your code ensure it does not load more beans than configured.


The places you would generally need to load beans in large size is, either when you need to show them on screen or need to do some heavy processing. The idea behind our implementation was to do a processing in batching.


Stuck Thread:

Cause of Exception: This error would occur if a processing thread is taking too long (longer than configured) then server would throw this exception.

Solution: In my opinion you should relook at your code, find the process which is taking too long & break down that process into logical chunks. In weblogic by default there are only 15 threads available for your application. In fact all 15 threads are not available, but few of them are reserved for application server.

The savior issues I faced with stuck thread was, after getting several stuck thread errors weblogic became handicapped, could not proceed further until the stuck threads were released. The quick ‘work around’ you can do for this issue is, through configuration increase the number of threads available for your application. By doing so at least the server would not stop its processing.


jBoss experience:

When I worked with jBoss earlier, I did not face any of the above issues with this server. jBoss handles the cache of beans efficiently, it can handle as many beans as your application needs without any complains. Also jboss handles the thread pool efficiently, you don’t need to do any explicit setting for it.

Monday, February 23, 2009

CVS repository checkout from branch by date

Is your Product in production now?
Do you have separate branch on the repository for production code base?
Haven't you tagged the version of the production branch when you released & deployed to production?
Do you want to checkout from production branch(assumed you know the date), but the branch has code changes after production release?

I had same situation last week. If your answer to all the above questions
is Yes, here solution :

cvs checkout -D$DATE -r$TAG $MODULE

Where:
$DATE is the latest date you want to checkout.
$TAG - Branch or tag name from where you would like to checkout.
$MODULE - The module name in your repository.

Prerequisite:
You need to have cvs client installed on your system. I used this
Tortise CVS client, which use CVSNT(cvs client) internally.

Friday, January 23, 2009

XSLT Performance optimization

Are you looking for optimizing performance of your application which uses XSLT?

Here is one thing I have done in XSLT code couple of time, which improved the performance at least by 200%!!!

Avoid using the Expression: "//" for selecting the node in the document. Rather use the absolute(I used this) or relative path.

One thing I should make clear is, I had about 8-10 xml's on which I was applying the stylesheet. So when xslt processor encounter '//', the processor start finding the path(after '//') from current location no matter where the given path is. That was the reason the application performance was degraded. When I took away the overhead from processor to find the path, & given the absolute path to the processor it worked smoothly.

My mantra for performance optimization is, first find out the culprit which is consuming all the resources & taking so much time. Once you find the problem area, you should work in that area. So it might be in your case '//' is not the culprit, but a simple
embedded javascript having a for loop!

Thursday, January 15, 2009

Weblogic - Time out user session

We were trying to configure the setting, so that it will kill the session of the logged in User after certain time & force the user to re-login in application in weblogic.

After doing googling, we found there are two options to achieve the same :

1. Configuration in weblogic.xml file:
Set the TimeoutSecs parameter in session-descriptor in weblogic.xml.
This sets the time, in seconds, that WebLogic Server waits before timing out a session. However this value can be overridden by session-timeout element in web.xml(#2 below).

<session-descriptor>
    <session-param>
        <param-name>TimeoutSecs</param-name>
        <param-value>300</param-value>
    </session-param>
</session-descriptor>

2.Configuring timeout in web.xml, session-timeout under session-config. The number of minutes after which the Web application expire.

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

On first go, we tried both the setting separately. However it wasn't working for some strange reason as expected. Later we figured that there is one more configuration which is stopping this setting to work as expected.

The authentication method (in dev environment) was BASIC!!! Once changed the authentication to FORM & tried all worked smoothly.

Here is what we had in web.xml:
<login-config>
   <auth-method>BASIC</auth-method>
   <form-login-config>
     <form-login-page>/hubmp/Login.jsp</form-login-page>
     <form-error-page>/hubmp/Login.jsp?loginfailed=1</form-error-page>
   </form-login-config>
</login-config>

Then we changed to BASIC to FORM:
<login-config>
   <auth-method>FORM</auth-method>
   <form-login-config>
     <form-login-page>/hubmp/Login.jsp</form-login-page>
     <form-error-page>/hubmp/Login.jsp?loginfailed=1</form-error-page>
   </form-login-config>
</login-config>