F O X B R U S H

'NotOnly' Classroom notes on Java SE, EE & ME

Reset mysql root password

Sharing the root password is a suicide, somebody changed the password today :(
Here are the steps to reset it.

Ref: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

I will explain the steps in ubuntu!

 

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

login as the user, who is running mysql

Generally the username would be mysql.

$su
#su - mysql
$

Stop the mysql service

$service mysql stop

Create a new file with the following contents

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

you need to execute this commands using safemode

root@ubuntu250:/var/lib/mysql# mysqld_safe --init-file=mysqlpasswd &

You will see the server is starting as below

[1] 2901
root@ubuntu250:/var/lib/mysql# 120106 21:35:48 mysqld_safe Logging to syslog.
120106 21:35:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

login now with the new password. it should work now.

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 29,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 11 sold-out performances for that many people to see it.

Click here to see the complete report.

A simple RSS Parsing Android application

Adding further more changes to my code given in my earlier post, I am adding the source code as well as the APK file for a simple RSS SAX parser.

This will parse the feed http://foxbrush.wordpress.com/feed and show the content on the screen. More finetuning required, will be added later.

Source file (eclipse project archive) - http://ubuntuone.com/4Id0xEpemi3JwEhIRvwQKd

APK file – http://ubuntuone.com/4SjwRCdQwh6QsoWBd46TAY

Android version required 2.3.1; Tested with my HTC

Feedparser (c) – http://www.ibm.com/developerworks/opensource/library/x-android/

HTTPURLConnection in Android

A Code snippet that reads a URL and print the HTML content on the screen, as raw text.
You may need to refer my earlier post to enable the necessary permissionpackage org.grassfield;

package org.grassfield;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HellodroidActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
URL url = new URL("http://www.google.com");
HttpURLConnection openConnection = (HttpURLConnection) url.openConnection();
InputStream inputStream = openConnection.getInputStream();
StringBuffer sb = new StringBuffer();
int c=-1;
while ((c=inputStream.read())!=-1){
sb.append((char)c);
}
inputStream.close();
TextView textView = new TextView(this);
textView.setText("Google Output ==>"+sb.toString());
setContentView(textView);
} catch (MalformedURLException e) {
e.printStackTrace();
TextView textView = new TextView(this);
textView.setText(e+"");
setContentView(textView);
} catch (IOException e) {
e.printStackTrace();
TextView textView = new TextView(this);
textView.setText(e+"");
setContentView(textView);
}
}
}

UnknownHostException while accessing Internet – Android

I am creating a new HelloWorld application for HTTP URL Connection demo. While accessing www.google.com, I am getting UnknownHostException

Obvious, we need to grant the permission for internet access. Hence add the android.permission.INTERNET permission in the manifest file as given below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.grassfield"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HellodroidActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

</application>

</manifest>

Brasero – Impossible to link plugin pads

I tried to create a Video DVD using my video collection using Brasero, Before starting the DVD Burn, it ejected the drive with the error ‘Impossible to link plugin pads’. Error comes below. Seems to be some conversion stuff. Alternate attempt would be create an image with DeVeDe – then burn the image with Brasero!

Checking session consistency (brasero_burn_check_session_consistency brasero-burn.c:1739)
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_set_output_size_for_current_track
BraseroLocalTrack stopping
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_J5VD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_PAWD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_DJWD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_2XZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_W6ZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_X1ZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_A9ZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_WH0D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_4Q0D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_0Z0D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_BU0D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_820D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_ZB1D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_4EYD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_Y9XD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_XIYD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_GRYD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_D0YD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_2UYD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_Y3YD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_YCZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_DLZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_ZFZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_UOZD6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_E32D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack Output set (AUDIO) image = /tmp/brasero_tmp_WB3D6V.cdr
BraseroLocalTrack called brasero_job_get_session_output_size
BraseroLocalTrack called brasero_job_get_action
BraseroLocalTrack called brasero_job_get_current_track
BraseroLocalTrack no remote URIs
BraseroLocalTrack stopping
BraseroVob called brasero_job_get_action
BraseroVob called brasero_job_get_action
BraseroVob deactivating
BraseroVob called brasero_job_get_action
BraseroVob called brasero_job_get_session_output_size
BraseroVob Output set (AUDIO) image = /tmp/brasero_tmp_EA4D6V.cdr
BraseroVob called brasero_job_get_session_output_size
BraseroVob called brasero_job_get_action
BraseroVob called brasero_job_get_output_type
BraseroVob Got output type (is DVD 1, is SVCD 0)
BraseroVob Creating new pipeline
BraseroVob called brasero_job_get_current_track
BraseroVob called brasero_job_get_audio_output
BraseroVob called brasero_job_tag_lookup
BraseroVob called brasero_job_tag_lookup
BraseroVob Setting ratio 16:9
BraseroVob Linked video bin to muxer == 0
BraseroVob called brasero_job_tag_lookup
BraseroVob Adding AC3 audio stream
BraseroVob Setting AC3 rate to 48000
BraseroVob Setting AC3 bitrate to 448000
BraseroVob Error while linking pads
BraseroVob can't create object : Impossible to link plugin pads 

BraseroVob stopping
Session error : Impossible to link plugin pads (brasero_burn_record brasero-burn.c:2856)

 

Apache – Tomcat connector in Windows

This is another interesting assignment completed today. Though our CRM portal is no so busy, we want to in a robust infra. There are series of new releases available kn the market. JDK 7, Tomcat 7 etc. Previously the application was using tomcat itself as a web server. This is a risky situation since I expose the complete applivation to public. Hence I have installed the apache as web front-end and tomcat 7 as middleware.

Here is the procedure:

mod_proxy_ajp would be the easiest to use if you are using Apache 2.2. It is part of the Apache distribution so you don’t need to install any additional software.

In your httpd.conf you need to make sure that mod_proxy and mod_proxy_ajp are loaded:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Then you can use the ProxyPass and ProxyPassReverse directives as follows:

ProxyPass /portal ajp://localhost:8009/portal
ProxyPassReverse /portal ajp://localhost:8009/portal

As simple as that.

Android tablet war – a review

For the past few months, I tried many times to purchase a tablet for my personal needs. Unfortunately no attemt was fruitful because I am not quiet convinced with the models I have seen.
Motorola xoom, samsung galaxy tab, acer iconia, HTC flyer etc etc. In addition, Indian market is heat because of low end tablets (midlets) like Beetel magiq, techberry techpad etc.

Motorola Xoom

Motorola Xoom

First of all let me tell you my requirement – lot of text typing (emails, wordpress, facebook, and instant messaging), youtube every night! Mostly productivity gadget. If you compare the highend models which I told above, almost all of them have android as such (with their own apps for the name sake). You will decide based on the processor, memory, and other hardware related specs like HDMI port, tv out etc. Low end models – you should be happy with what they give.

Samsung galaxy tab 10.1

Samsung galaxy tab 10.1

In the high end models, I have evaluated samsung galaxy tab, motorola xoom and HTC Flyer. Galaxy tab almost = moto xoom, but moto has a HDMI out and extendible SD card option. So still I give less marks to the Ipad competitor – samsung galaxy tab 10.1. But HTC Flyer has many drawbacks as below.
* Android v2.3 – others v3.0 or v3.1
* 7 inch screen – others 10.x inches
* costly – others are cheaper.

But still I will vote for Flyer because of the HTC Scribe technology – because of its unique way of sophistication to handwriting. I am damn sure, this will be very helpful when you get into half-a-day or full day customer visits or meetings. HTC starts working on this scribing, I hope they will make this as good as HTC sense. This is what the way phone or tablet vendors need to impress their customer. Better hardware and recent version of android alone won’t win your customer hearts.

HTC Flyer

HTC Flyer

Here is a video that can explain you the HTC scribe!

Another decision by Apple at the war-end makes me to postpone the purchase of a high end tablet (also I can’t afford that much amount now :D ) the new release from Apple has a powerful CPU to compare with others for more computing. I am sure this will add unavoidable traffic in the market. I expect all the vendors will try to copy or cross this limit. So you can find better android tablets in the near future.

Let me conclude this post with a note on low end model – techberry techpad. It costs around 8500 INR, Chinese make and distributed by a Chennai based distributor of Techberry mobiles. I have purchased this tab as a interim solution till I find my dream tablet. The drawbacks of this model are
1. Low end processor – the tablet is sluggish than the other low end model Beetel Magiq
2. Not fully google – Not that much google friendly like other devices. Coundn’t map google and get alerts at real time.
3. Android market is missing and all the links are android market is failing. It has a Chinese application manager called appstore which is a ‘dhrabai’. The popular applications like meebo, google talk, plus… everything needed to be downloaded as .apk files and install it.
4. No bluetooth
5. No inbuilt 3G. You need USB modem

Techberry Techpad

Techberry Techpad

But still one convincing reason I got with this is its support to USB. USB keyboard and USB mouse is given with this midlet which makes my text typing so easier. I don’t know why high end models are not giving much support to this – or they sell these items for extra cost. I am damn sure, no one can type much with the onscreen virtual keyboard. I really got excited when I saw my USB mouse too started working. The keyboard comes with a leather like casing, which makes the carrying much simpler.

(I din’t talk about IPAD – Somehow I hesitate myself to be tied to a particular technology or particular vendor!!!)

There are many innovations coming up! See this! Solar Powered Android Tablet by Bharat Electronics – Priced at $72 http://todayontech.com/solar-powered-android-tablet-bel/

Have a wonderful week ahead!

Illegal attempt to associate a collection with two open sessions

Illegal attempt to associate a collection with two open sessions

When we are working with collections with spring and hibernate, you may end up with this exception while saving an object. Googling says this is a feature/bug of hibernate – hibernate is not versioning the collections as it does for other objects. Don’t know what it is in detail, but I should solve this right now. The suggested solution is to have  single session. The following the code that saves my object.

public class BaseDAO extends HibernateDaoSupport implements IBaseDAO {
.....
/* (non-Javadoc)
	 * @see com.eginnovations.license.dao.IBaseDAO#save(java.lang.Object)
	 */
	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly=false)
	public Object save(Object entity){
		Session session = super.getSession();
		Serializable save = session.save(entity);
		logger.debug("save:"+save.getClass()+" "+save+" "+entity);
		return save;
	}

..............
}

New session are getting opened in super.getsession() and session.save().

The problem is I have not implemented OpenSessionInViewFilter till now, so I don’t have the option to have the single session. So here is the entries added to the deployment descriptor web.xml.

	<filter>
		<filter-name>openSessionInViewFilter</filter-name>
		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
		<init-param>
			<param-name>singleSession</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>

And this is the filter mapping.

<filter-mapping>
		<filter-name>openSessionInViewFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>

Go ahead!

mRemote – a cute multi protocol application for remote desktops

mremote

mremote

A nice application I found long back. simple, less in size, support Microsoft terminal server, VNC, SSH etc

Follow

Get every new post delivered to your Inbox.