Win a copy of Spark in Action this week in the Open Source Projects forum!

Palak Shah

Greenhorn
+ Follow
since Jan 21, 2005
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 Palak Shah

I am trying to configure global results in struts but getting exception in logs when starting tomcat:



My struts.xml is as follows:


Can some one please guide whats wrong with this code? Even <result name="login">login.jsp</result> does not work. I see the same exception.

9 years ago
yes you can... just give name="sameForm" in both actions. Also mention validate="false" in the action where you don't want to validate but just wanna initialize....
11 years ago
I agree James... I need to add the business layer.. However the doubt is about the multiple thread accessing the same method of DAO. Since I have only one instance of DAO, would multiple simultaneous calls to same method of a DAO (for different users) create a problem?

Please see my code above and let me know if it'll work!
I would like to cache so that it does not have to create new DAO for each database call. Any idea how to solve problem of concurrency? or it is better to create new DAO every time?
I am working on a web application. I am using Struts for the presentation layer. Also I am using DAO pattern for Database layer.

My doubt is about creating instance of DAO's. I am created a DAO Factory which can create instances of DAO's. Whether I can go for caching of DAO or Do I have to create a new DAO for everytime? Would caching done as shown in the code below create Concurrency issues? or please suggest the right way of going about it.

My Struts Action code is as follows:



UserDAO code is as follows:



And DAO Factory is as follows:


[ April 19, 2008: Message edited by: Palak Shah ]
[ April 19, 2008: Message edited by: Palak Shah ]
Hi,

I have a JSP page that has some image buttons. I am using struts to control the app. The problem is that some times these images don't show on the page when u goto some other page and comeback.

Does anybody know what could be the issue?

Thanks.
14 years ago
JSP
Hi Sanjay,

I do not have any prior EJB Experience. AS far as preparations are concerned, if you can give 3 hrs a day then 2 months should be good enough.
15 years ago
Hi ALL,

I have cleared SCBCD exam with 95%. I referred following material:
1. HFEJB (3 times)
2. MZ's notes (1 time)
3. Tests on ejbcertificate.com and jdiscuss.com (2 times): they are very good

Special Thanks to:
1. Kathy and Bert
2. MZ

One Special Request to HFEJB authors:
1. You have given many excercises that do not have answers. I understand your motive behind the same. But it would be great if you could provide answers for them (may be at the end of the book) since at the end of the day we would like to verify ourselves.
[ June 18, 2005: Message edited by: Palak Shah ]
15 years ago
Visit scbcd_exams@yahoogroups.com for links to all SCBCD related mock exams (free/shareware) available online.
Hi,

Following are required to ensure above 85%

1. Read HFEJB.
2. Go through Mikalai Zaikin's EJB Notes
3. Give exams on ejbcertificate.com and jdiscuss.com
15 years ago
I Think So! Other experts please confirm.
For stateful session beans, container makes the EJB object and SessionContext. Then container creates the bean instance. Container calls setSessionContext() link the bean to its context.

Also the container links the bean to its EJB object by calling ejbCreate(). Is this correct? if not when is ejbCreate() called?

For stateless session beans, when exactly is ejbCreate() method called?
I ask this question because, in HFEJB it is mentioned that bean can get a reference to its EJBObject from ejbCreate() method for a stateless bean. How is that possible? can anyone please clarify?

Thanks in advance.
Does this mean that reading specs is not essential?? If I skip reading specs in what range can i score?? above 85???
Hi ALL,

I have completed HFEJB twice. Theer is too much of theory.. Huh.. This method in that interface...... Also I have heard people saying that reading Specs is also required. The Specs has only 500+ pages!!!

Does anybody have wayout? means how to go about studying? What to study? How much to study? Please help as I am finding it very difficult to prepare for the Certification.
Hello,

I followed all the steps given in HFEJB: AdviceBean tutorial. But when I tried to run 'AdviceClient.class' from command line, I get an exception.

Can anybody help?

See the exception attached below:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:18)
at AdviceClient.main(AdviceClient.java:11)