Marketplace for Content, Tests and Assessment
 
 

Archive

Posts Tagged ‘java’

Comparing SVN and CVS

August 25th, 2010 Vinay 8 comments

When starting with a new project , first question which would come to your mind is which VCS to chose. Given a  lot of options in market like CVS,  SVN ,  Mercurial  and Microsoft VSS  , you have to look at you requirements.

If you are looking for something popular , easy to use , low cost and working with distributed teams, you should go either with CVS or SVN.

Here is quick comparison of various VCS used . This is a result of survey done in 2008 by finalbuilder.

SVN or CVS

Soucre control surver

Looking at the results, you would surely go with SVN but one should look at why SVN is getting more popular and is taking over CVS.  SVN was created to fix some problems in CVS.   Read more…

Categories: Technology Tags: , ,

When to use saveOrUpdate in hibernate

August 25th, 2010 Vinay No comments

In our earlier post we had covered what exactly saveorUpdate in hibernate does.

Developers that are new to Hibernate constantly calling the saveOrUpdate method whenever a set of changes have been made to a POJO. This isn’t necessary. You only have to associate an instance with the Hibernate Session once within the scope of a transaction. From that point on, you can do whatever you want to your JavaBean instances. Hibernate will persist the final state of your instance when the current transaction is finally committed.

The following piece of code needlessly calls the saveOrUpdate method after instance variables have been updated. This is totally unnecessary, as the User instance was already associated with the Hibernate Session through the original call to saveOrUpdate. Read more…

Prototype scope in Spring beans

July 29th, 2010 Vinay No comments

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…

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

Practice test for Spring Certification

June 24th, 2010 Vinay No comments

ikoko had added 2nd mock practice test for Spring Certification . He had added first test Core Spring 3.0 Certification Mock and has received very good response from users. The users have found value in the $0.99 test .

We hope that you like his Core Spring 3.0 Certification Mock Test 2 . This test covers topics on container, Test, AOP, SpEL, Database, JMS, JMX, Web, MVC, Remoting etc

Looking for your feedback and inputs.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes