Win a copy of Terraform in Action this week in the Cloud forum!

Saagar Kappa

Greenhorn
+ Follow
since Nov 10, 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 Saagar Kappa

@Paul: I dont have custom settings for each logger based on package or class structure, so the root logger settings take effect in each, but when I update the root logger that doesn't get updated in the current loggers.

@Jaikiran: The idea is to give the user the ability to debug at command line before launching the program. The threshold is info but I want to be able to selectively change it to debug at runtime..
Hi,

I have a small requirement where the default log level is info, but if the user wants to invoke the Java program with debug level, the Debug should start off. I am trying to achieve this using this code..


When I do this, the debug statement at the end does not print.
Then I thought may be the root logger level is not propagated after the initialization at start up, so I tried this


The info statement prints "this is info" then the next info statement prints "log level is DEBUG" the next statement prints true but the intermediate debug statement does not print.

I have done this before in a Web app and it works just fine. I do not understand what is going on. Can someone please help me understand this.
I understand that to walk through a document using Java/Jaxp DOM you can use recursion, but I am trying to find a way for the following. There are two xml documents 1 and 2. The code needs to loop through the elements of document 2 and check if an element of document 2 exists in document 1. If it does not exist, then the code should add the element at that heirarchy. The problem is, with nesting and all, its complicated. Would greatly appreciate if someone could show if there is a easier way to do this. No assumptions about an existing structure for the xml can be made

Sample XMLs are shown below

Document 1
<employeelist>
<employee>
<id>2134</id>
<name>javaguy</name>
</employee>
<employee>
<id>2134</id>
</employee>
</employeelist>

Document 2
<employeelist>
<employee>
<id>2134</id>
<name>javaguy</name>
</employee>
<employee>
<id>2135</id>
<name>oracleguy</name>
</employee>
</employeelist>


The code should read both docs and update doc 1 with the name for employee with id 2135 as oracleguy. I can create document elements and all that stuff, so any code snippets to do this should just be great
Hi Mauham,

Can you mention what kind of experience you are looking for. I mean, if we have 6-8 months experience and are certified in Java/J2EE and are good, would you consider them? And what kind of time frame are you looking at ? I am certified in SCJP, SCWCD, SCBCD and OCA (DBA), I am a Master's student and I have 8 months of experience in Java, Servlets JSPs, Struts, Webwork, Ajax. Would my profile suit you. I am in US but would need a H1 though...
Let me know,

Thanks.
15 years ago
Thank You all for your response...

@Satou: My shelf can support any weight as long as the BRICK is useful to me

@Satish: u r rite, I am a little crazy when it comes to finishing things...

@Vikas: Thank You, u and mi Mohammed were of great help.

@ Greg: Wanted to share my success here with the friends who helped me initially. Now I dont know how to move the thread..

@Mikalai, Michael and Fabricio: Thanks for ur wishes.

@Bert: Thank You for ur appreciation. It would be great if u guys release a book which provides hands-on experience..

@Daniel: Not very well actually, I have experience with Java, Servlets and JSP's and am relatively new to EJB. I take preparing for Certification differently from having an experience...

LAST BUT NOT LEAST: PEOPLE HAVE BEEN CONTACTING ME IN E-MAIL TO TELL THEM SOME EXAM QUESTIONS THAT I GOT. LET ME CLEAR IT OUT THAT NEITHER DO I REMEMBER ANY OF TEHM NOR AM I WILLING TO SHARE ANY QUESTIONS EVEN IF I DO. PLEASE PREPARE AND APPEAR HONESTLY. IF U HAVE ANY QIESTIONS REGARDING THE SUBJECT AND FORMAT OR SOMETHING THEN ONLY CONTACT ME IN E-MAIL....

Thank You all once again..
Saagar
Hi everybody,

I cleared SCBCD with 100%

I thought I would lose 3-4 questions but it turned out that my way of analyzation was correct.

On this occasion I would like to thank miMohammed and Vikas Prasad of javaranch for their help and guidance. A special thanks to miMohammed who helped me run the program in HFEJB.

A special thanks to Kathy and Bates for providing an excellent book HFEJB. I loved the book, but I have only one complaint. In teh next edition please try to focus on giving more code and examples for the students to gain an experience rather than LEARN just for teh exam...

My preparation was like this...

Intense preparation for 2 weeks. I spent around 15-17 hours a day. Read Head First EJB like thrice. FIrst time I read through, but the second time I read with more concentration and underlining the important points. I read these points on teh day of the exam. Scored around 93% in the Mock Exam which I took on the day before teh exam.

The exam questions were tricky and most of them need u to think and analyze, but if u r good at ur basics u can eliminate the wrong choices easily. Listen to Kathy and Bates. They really know what they r talking about. If they say something is important and needs to be memorized just DO it. u will understand why when u take the exam...

Good luck to all the aspirants...

Saagar
u will get ur certficate from sun in which u will have a letter which provides u guidelines as to how to get access to logo and also ur username and password...

if u cant wait till then, then go into this site and fill ur details in the form and submit it. u will get username and password for the logos the next day in e-mail...

http://logos.sun.com/logosite.jsp?Category=third&Logo=java-cert-prog

Cheers,
Saagar
15 years ago
Sorry Michael my mistake, I had exactly the same question when I did the chapter. I replied ur question in haste, without checking taht it was an entity bean... Since it is mentioned that the primary key can be an integer or a string, i felt that teh choice was valid too, but that leaves the question whether they were talking about a wrapped Integer or a primitive int..

Neways, hope someone else can clear this up..

Saagar
ejbCreate method is called by the Container to create the bean and it should not return any thing and should be void. Think about it. Who would the method return an integer to ??

Saagar
Reshu,

Persistent store is something like a database.. It is a more general term but whenever u see persistent store replace it with a database..

Cheers
Saagar
Hi Reshu,

I guess you are in teh starting stages. this is the simplest way i could explain that...

Persistent Store is something like a databse usually..

CMP stands for Container managed persistence which means the calls to teh database are managed by the Container. The entity beans are used to access the data something like customer name, address and id stored in a database table. To get access to teh database u need a connection rite. Usually with BMP u use the JDBC(Java Database Connectivity) commands. But with CMP the calls related to the connections for the database are all handled by the container..

In simple words, Entity beans are used to get the data from the database and the connections to the database (persistence) are all handled by the Container in CMP... Whenever u see persistent store replace it mentally with database and u wud find it easier..

Cheers,
Saagar.
Supriya,

One thing I would suggest is that you download j2sdk_1.2 instead of 1.4 and then reset your java_home for that..

Then try running your app, this problem would be solved but u mite get some other problems. If u do lemme know and I can probably help u out. I have had a hard time with this example too..

Cheers,
Saagar


finally after 1 whole week of ordeal i was able to run the program



Thanks a lot Mohammed. I really appreciate ur concern and guidance. I owe u one.

Special thanks to Vikas too for teh concern....



Saagar
Hi Vikas,

I followed ur instructions and set everything as u said..

The code compiled but when I ran the program using

java -cp %CLASSPATH%; AdviceAppClient.jar AdviceClient

I get

Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient

I gave up on this and I am proceeding with the rest of teh chapters.

Thanks for ur concern though,

Saagar