Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Archive for July, 2010

Prototype scope in Spring beans

July 29th, 2010 Vinay 1 comment

When you specify a bean as prototype in xml file or through annotation

<bean
id=”myBeanInstance”
class=”com.xyx.PrototypeBeanExample”
scope=”prototype”
autowire=”byName”>

</bean>

it means that every time a request for this bean is made, a new instance is created. If you want to see the illustration

Prototype bean in Spring

Prototype is meant for beans which hold some state.

The  bean lifecycle also changes in prototype bean. From Spring’s doc

Spring does not manage the complete lifecycle of a prototype bean: the container instantiates, configures, decorates and otherwise assembles a prototype object, hands it to the client and then has no further knowledge of that prototype instance

Categories: Programming / tutorials Tags: ,

JDBC performance tuning with fetch size

July 25th, 2010 amit 2 comments

Problem: For a Oracle (backend) – Java (frontend) system, a query  returning about 500 K rows was running very slow and is taking about 45 mins.  Oracle database is hosted on server (A), has a separate application server (B), and client can access database from client machine (C), using SQLPLUS.  Query is running slow from the clients machine (C) and from the java front end (B).

Basic Checks on dbase:

Make sure to check following with respects to the tables / database in question:

  • Latest Database statistics exists for the tables in question.
  • Indexes
  • Degree of Parallelism at Table Level:
  • Optimizer mode

Database configuration parameters  – sga_max_size,  pga_aggregate_target , memory_target, processes Read more…

Integrating hibernate search with a Spring and JPA Application

July 19th, 2010 smitha 1 comment

In this post we will talk about how to integrate hibernate Search into your existing Spring, JPA and Hibernate application and some of the challenges we faced.

We  have a web application using Hibernate (with JPA ) and Spring. This application relies on Spring for transaction, bean initialization / injection etc. EntityManager, transaction are configured in application.xml file. When integrating Hibernate search in such an application one might face problems. In this post I am sharing some problems I faced during integration and the solutions for same.

Entitymanager configuration in my application.xml

Spring configuration:
<bean id=”propertyConfigurer”>
<property name=”location” value=”classpath:myproperties.properties”/>
</bean>

Read more…

Supply Chain Management Certification practice test

July 16th, 2010 Vinay No comments

Raheel is the guru of Suppy chain management test. He has created  Supply Chain Management Certification practice test for our readers. The test consists of 62 questions.  4 questions are free . The test which usually sells for around $14 , has been priced for $5.99 for a brief period of time. The tests comes with money back guarantee.

Take the test and give your feedback.

Reading data from CSV or excel file in JMeter

July 14th, 2010 Vinay 9 comments

Apache JMeter is one of the best open source load testing tools available in market. We had covered Load Testing Using Apache Jmeter in our previous post.

In this post I will go into some more details as how you can read data from csv or text file for Jmeter. This is helpful when you are doing a load test and need unique user id or any other parameter.

CSV Data Set Config settings in Jmeter console

CSV data set in jmeter

CSV data set in jmeter

This file will reside in bin directory of your Jmeter directory.

userid is the variable you will be using in your url for eg

http://www.abc.com/welcome.jsp&userid=${userid}

How your Myfile.csv file will look like ?

1234
1245
1257

and so on

if you want multiple parameters,  you can have comma separated values like

1234,88
1245,99
1257,44

Want to learn programming in Scala ?

July 13th, 2010 Vinay No comments

Java programmers, interested in learning about Scala ? If you have missed our earlier posts on scala

Twitter has been written in which programming language

Why did twitter dumped Ruby on Rails

For new England residents a chance to learn Scala with Venkat Subramaniam who will be presenting on Programming Scala on Aug 12 2010  at  NEJUG.

Venue : Sun Microsystems, Burlington , MA

Dr. Venkat Subramaniam, founder of Agile Developer, Inc., has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia. Venkat helps his clients effectively apply and succeed with agile practices on their software projects, and speaks frequently at international conferences and user groups. He is author of “.NET Gotchas,” coauthor of 2007 Jolt Productivity Award winning “Practices of an Agile Developer,” author of “Programming Groovy: Dynamic Productivity for the Java Developer” and “Programming Scala: Tackle Multi-Core Complexity on the Java Virtual Machine” (Pragmatic Bookshelf).

Categories: Tech news Tags: ,

How good are Spring certification practice tests at Skill-Guru ?

July 7th, 2010 Vinay No comments

In our previous posts we had mentioned that Ikoko has added 2 mock test of 50 questions each at Skill-Guru

Spring certification mock test 1

Spring certification mock test 2

These tests are priced at $0.99 each . So how good are the tests ?

Follow this discussion on javaranch to see what real users who have been through Spring certification are saying about the test

Failed Core Spring certification

java.lang.SecurityException – igner information does not match signer information of other classes in the same package

July 6th, 2010 Vinay 6 comments

If you encounter this exception

Caused by: java.lang.SecurityException: class “com.sun.faces.util.FacesLogger”’s signer information does not match signer information of other classes in the same package

at java.lang.ClassLoader.checkCerts(ClassLoader.java:775
then it caused by by 2 jars in your lib path with different versions. For eg for above exception , there were two versions of jsf jars in our lib folder.

Categories: Programming / tutorials Tags:
Get Adobe Flash playerPlugin by wpburn.com wordpress themes