nitin pai

Ranch Hand
+ Follow
since May 30, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 nitin pai

Hi,

Till Friday I was working on my RAD but today it is refusing to start up. When I try to start up RAD it basically shows me a dialog box as shown in the attachment and halts there. If I click OK nothing happens.

I checked task manager to see if any other instance was alive. But it wasnt. Please help. I dont intend to resintall my RAD at this point of time...

Thanks!
10 years ago
apologies for not mentioning the behavior which I am getting..

What is happening now is that sometimes the selected option remains selected and the searched item also gets selected, so the user gets to see that two items in the list are selected and this, is not the expected behavior. I want that whatever the user types, should select only one entry or rather the first entry which matches exactly with the characters he has typed in.....
Hi,

I wanted to have a real time search facility for the items in a list box i.e As the user keeps typing in character the matching item would get selected. The code below worked fine when I had set multiple=false in the list box. But due to new requirements I had to change it to multiple=multiple. After the change the below code acts weird, even though I have included a small change in the script, to deselect the earlier selected item.
Please help.





In my DAO, I try to catch a generic Spring exception i.e DataAccessException for all type of DB problems. Then I wrap the message from it into my custom business exception.

But still, when I try to add a record with an existing primary key the application throws a stack trace of org.hibernate.exception.ConstraintViolationException without proceeding into the catch block of DataAccessException.

I even tried catching the most generic form i.e Exception. Here too, the application fails and throws the same stack trace. How can I catch this exception without failing the application.

I am using hibernate 3 with spring 2. The code which I am referring to is:



and the stack trace on this execution is:

I am using Hibernate3 and Spring 2. There are 2 entities Employee and Dept as follows:







My Dao contains:




When the createEmployee() is called from my Test class, a new record gets created in Employee as well as Dept table, but however the composite foreign key inside Employee is populated with NULL (i.e proj_cd and dept_name). I am sure some mapping needs to be done but could not figure out where.

Should we also put in foreign keys inside our mapped POJO's?
I have a entity Dept within Employee entity. The Dept entity is set to lazy loading.

Any idea on how to do a emp.getDept() in the web tier when the DAO has long closed the session after the Employee was fetched?

Update: I am using Hibernate3 with Spring 2.0
[ November 25, 2008: Message edited by: nitin pai ]
Hearty Thanks for the compliments to all.

Nikhil - I have 2.5 total career experience and my next plan is ummm... well.. i am not so sure really. SCEA is in dreams but currently I want to learn some good frameworks. I am really keen to learn Wicket and Groovy.

Deepak - You don't need to read EJB 2.x for SCBCD 5. Please check the SCBCD 5 links for materials.

Hey guys, any suggestions on which framework is the best bet for the future in terms of web applications? I am really overwhelmed by the number of frameworks that are coming up. All seem nice.
Hey guys, can you tell me approximately how many days it takes for a certificate to arrive? I am from India.

I did not keep a track of the days during the earlier certificates but this time I have given my office address due to shifting of home. So I need to keep on asking the receptionist if anything has come.
Hey Guys,

I cleared SCBCD 5 with 88% yesterday . Questions were challenging and you must read the specs at least once to get through them without difficulty. Before the exam I hadn't touched EJB at all. I used the following for preparation:

1. EJB 3 in Action (only for introduction purposes)
2. EJB3 (excluding EJB 2.x stuff) specs & JPA specs - they are simply amazing
3. Enthuware Mocks - My scores were (69,62,75,82 & 66 in final exam)

There were no drag & drop type questions in the exam. I got 100% in all of the JPA sections while I lagged in the EJB 3 overview sections because I had not studied EJB 2.x related stuff.

It pinches to have not touched the magical figure of 90+, but I have no qualms since I gave my best shot in the exam. Thanks to all ranchers who helped me out with my doubts. You rock!

All the very best to those who are preparing. Please read the entire specs guys, you can easily score beyond 90%. Believe me!
If we have to make a EJB 2.1 client view for an EJB 3.0 bean then should we create a home interface manually or will the container make it automatically for us?
In my opinion it should be yes, since Application exceptions can extend RuntimeException and EJBException is also a subclass of RuntimeException.

However I want to confirm it since it is not mentioned in the specs and there was a similar question in the Enthuware mocks. But trying out won't give a clear answer since vendor implementations differ.

If it has not been mentioned in the specs then I hope it won't be asked in the exam too, because we don't have a clear answer for it.

Originally posted by Vinay Nath:
well I have one explaination, are requires_new and not_supported mutually exclusive?

think abt it, if its requires_new then thr will be a transaction even whn no transaction was propagated, so not_supported will be of no use ever.

Okay thn why not_supported have to be there? coz smtimes you probably dont want a transaction, co anyhow sending message is done in different transaction altogether.

therefore only required and not_supported are there.



Thanks Vinay, this explanation makes a really good point. I did not think in this way.
Can an application exception extend from javax.ejb.EJBException class?
Anu I think you are a little mistaken here.

REQUIRES_NEW doe not make a container hold its transaction. In fact the container starts the new transaction for the bean itself.

If you take a look at the spec, it says:


The Container must invoke a message-driven Bean method whose transaction attribute is set to Required with a valid transaction context. Because there is never a client transaction context available for a message-driven bean, the container automatically starts a new transaction before the dequeuing of the JMS message and, hence, before the invocation of the message-driven bean's onMessage(...) method.



If the container always starts a new transaction automatically, why the need of REQUIRED, why not REQUIRES_NEW?
Hi Mirko,

Amazing feat man. 90% is great and so is the way in which you prepared. Even I am facing the same problems as you..... Roles, EJB 2.x and loads of theory. I would be even happy to get around 90% as I am already exhausted just taking the mocks....haha