Anirudh Bhatnagr

Greenhorn
+ Follow
since Sep 01, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anirudh Bhatnagr

If you want to pass the params from action to render ,you would need to set the Action Response using
Then this is available in the corresponding Render Request.

11 years ago
Thats what the whole concept of Agile Estimation lies..
Obviously any two people will have different speeds of doing work.
Simple dynamics, So if you are going to estimate time, you would need speed and speed varies person to person.

Estimate in size and relative complexity or past experience and assign a weight or story point to it.
Have every one involved in this process, Use planning poker if you feel.

Then break up the user stories into tasks.Perhaps each person can take up tasks and estimate his/her time.
First couple of sprints you can give the levy to the team to find the velocity range then you can plan your sprints further.

Watch this video by Mike Cohn at google :
http://www.youtube.com/watch?v=fb9Rzyi8b90
Its totally relative.
Story points are not units of time they are units of size.Any relationship with time is again subjective.

I would need to break down tasks in each story point,estimate ideal hours of each task, then aggregate them.
Then you can see in a sprint how many hours are available on an average basis and then you can estimate.

slowly in following sprints you would learn the velocity range of your team and then you can put the story points accordingly in your product backlog.
Coercion is so anti-agile.

One need to feel the need of something to actually do it.

I would say TDD is a convenience which we attain by discipline.

Coach the team with the benefits of unit-tests, forcing will totally be a disaster.

Make a playful plan- put rewards- its all about how you coach for Agile mindset.
Sun Docs say :

Multiple Singletons in Two or More Virtual Machines
When copies of the Singleton class run in multiple VMs, an instance is created for each machine. That each VM can hold its own Singleton might seem obvious but, in distributed systems such as those using EJBs, Jini, and RMI, it's not so simple. Since intermediate layers can hide the distributed technologies, to tell where an object is really instantiated may be difficult.

For example, only the EJB container decides how and when to create EJB objects or to recycle existing ones. The EJB may exist in a different VM from the code that calls it. Moreover, a single EJB can be instantiated simultaneously in several VMs. For a stateless session bean, multiple calls to what appears, to your code, to be one instance could actually be calls to different instances on different VMs. Even an entity EJB can be saved through a persistence mechanism between calls, so that you have no idea what instance answers your method calls. (The primary key that is part of the entity bean spec is needed precisely because referential identity is of no use in identifying the bean.)

The EJB containers' ability to spread the identity of a single EJB instance across multiple VMs causes confusion if you try to write a Singleton in the context of an EJB. The instance fields of the Singleton will not be globally unique. Because several VMs are involved for what appears to be the same object, several Singleton objects might be brought into existence.

Systems based on distributed technologies such as EJB, RMI, and Jini should avoid Singletons that hold state. Singletons that do not hold state but simply control access to resources are also not appropriate for EJBs, since resource management is the role of the EJB container. However, in other distributed systems, Singleton objects that control resources may be used on the understanding that they are not unique in the distributed system, just in the particular VM.

Source : http://java.sun.com/developer/technicalArticles/Programming/singletons/
12 years ago
how would you keep the single instance of an object over multiple JVMs?

Make a singleton class object.
Serialize it ?
Wouldn't serialize ignore the static fields used for maintaining singleton behavior of the class?

Am I missing something here?
Is it possible first of all?
12 years ago
So if the class level lock is just another lock on the class object.
Then apart from providing a locking mechanism for static methods what else can be achieved?
abstract factory pattern can use factory method to actulay implement different types of object creation, but it is not necessary.
I would say Abstract Factory Pattern is more into design product creations and how different variants of the product would be created , it is to supply a "kit" to create product and its different variants. It may use prototype/factory method and other builder pattern inside when actualy instantiating the object.
So In Abstract Factory Pattern ,we would provide an interface of product which can be used to create its families without specifying their concrete implementations.

example :

Factory Method :



For Abstract Factory Pattern :




Hope this clarifies, senior ranch members please validate/correct this.

So does a class level lock stop a thread to acquire Object level lock of that class
If I make a method static then the thread executing that method would acquire class level lock , now if another thread tries to access some other method of the same class, would it have to wait until the first thread releases the lock on class.

So my question is : Does a class level lock lock the entire class ?
Hi,

Our project uses Spring Framework and Ext - GWT 2.0.
I see a lot of issues in development, like out of memory errors - when I change client side code and try to refresh.
It takes more time to complile and I feel is more fragile.

Experts please comment on this.

Thanks,
Anirudh
12 years ago
GWT
Hi,

I have wriiten a file upload/download utility using Spring.
The issue I am facing is with FileCopyUtils.copy function,
If I pass a file name with white spaces FileCopyUtils.copy coverts them to underscore.
For example if filename is "hello world.txt"
It would be downloaded as "hello_world.txt"
All though I am putting quotes but still not able to get the desried filename.
Is this a limitation?
Following is the code:



Any help or pointers is appreciated.

Thanks,
Anirudh
13 years ago