anish jain

Ranch Hand
+ Follow
since Feb 03, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by anish jain

Hi All,

I am creating Junit test cases in Spring.


Here BookingProcessService is an interface and its implementation class is BookingProcessServiceImpl.java.
In spring configuration files, there is no bean id defined for that.
Is there any way I can use the 'bookingProcessService' for invoking the actual method definition written in BookingProcessImp.java in my test methods?
13 years ago
I am new to Spring. What I understand from dependency injection is that it is the way by which an object can be created by container. We don't need to use 'new' operator.

I am not getting the benefits of Depenedency Injection. I read that it hepls us in testing our code.

Can somebody please explain me how it helps in testing with the help of an example
13 years ago
Hi,
I have to make some web service call that returns objects in JSON format instead of XML
I have made some DTO"s as per the JSON.
In my DTO, one getter is returning java.util.Set and rest returning String.

For String fields I am able to get the values from JSON format but for the method returning Set I am not able to get the values.

Could anyone of you please help me?
13 years ago
GWT
Hi,
I am new to web services and I have to develop some restful web services in Java.

Can anyone please send me a good link explaining the restful web services even in layman terms?
13 years ago

Now I want to implement Hibernate using annotations. But while doing so I am getting some errors i.e. NoClassDefFoundError which most probably due to some jars' version compatibility issue.

Could you please tell me what all jars required for this? Please mention the version of the jar required.
If I write t.join(),t is a thread, then it means that currently executing thread stops executing until the thread it joins with,in this case 't', completes.

I want to know when t.join() is called, will the currently executing thread moves back to any blocking/waiting state or in runnable state? Also, is currently executing thread will sure to run once thread 't' completes its execution?

Lanny Gilbert wrote:Here's a good article explaining what WeakHashMap is good for (and when not to use it).

http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html



Thnaks Lanny that was a very useful information shared by you but still it doesn't answer my question

An entry in a WeakHashMap will automatically be removed when its key is no longer in ordinary use.

May I know exactly when the entry from the weakhashmap is removed i.e. how to decide when its key is no longer used? Is there any time period defined?
13 years ago
When we say String s="hello", then "hello" object will be created in heap.

I want to know if this object is created in heap with reference stored in the string literal pool. Is this right? or String literal pool is separate memory area outside heap?
13 years ago
I want to know how to implement Compostion,Aggregation and Association in Java.

I searched many time but never got any satisfactroy answer
13 years ago
I read the difference between Vector and Arraylist is that Vector is synchronized(actually it's methods) and Arraylist is not(actually it's methods).

Could you please give an example to explain this difference?
13 years ago
I searched on net about ConcurrentHashMap but not able to understand it fully.

Could you please share any good link or explain about why to use ConcurrentHashMap and how it works?

13 years ago
I read about weakhashmap and understood that an entry in a WeakHashMap will automatically be removed when its key is no longer in ordinary use.

May I know exactly when the entry from the weakhashmap is removed i.e. how to decide when its key is no longer used?

Is there any time period defined? Also let mw know the use of WeakHashmap?
13 years ago
Hi I am new to hibernate.
I was searching the difference between load() and get() and this is what I got :
First, when the given ID can’t be found, load() throwsan exception org.hibernate.ObjectNotFoundException, whereas get() returns a null object.
Second,load() just returns a proxy by default; the database isn’t hit until the proxy is first invoked. get() hits the database immediately. The load method is useful when you only need a proxy and don’t need to make a database call. You just need a proxy, when in a given session you need to associate an entity before
persisting.

I didn't understand the second point. Here what is meant by proxy? Could you please elaborate it?

Joe Harry wrote:

anish jain wrote:I am new to ORM technolgies..

I have a task where i have to transfer data from one table.

Can anybody help me how to do this in TopLink and in Hibernate?

It's veru urgent. Any help will be highly appreaciated.



Your question is not clear. Being clear in what you want will fetch you help from ranchers.



There are some records present in table A. I want to populate table B with all tha data present in table A.

I want to know how it can be done using Toplink and Hibernate.

Is it clear now?
I am new to ORM technolgies..

I have a task where i have to transfer data from one table.

Can anybody help me how to do this in TopLink and in Hibernate?

It's veru urgent. Any help will be highly appreaciated.