This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!

Kedar Dravid

Ranch Hand
+ Follow
since May 28, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kedar Dravid

Thanks for the info., Edwin.
Hi Ranchers,
I have just started studying for the SCJD exam. I have bought the book SCJD Exam with J2SE 5 by Andrew Monkhouse and Terry Camerlengo, and studied the first 3 chapters.
Now while browsing through this forum, I came across the term 'URLyBird' at a lot of places. Dont remember reading about it in the book atleast.
Could someone explain what it is?
Hello Ranchers,
I just cleared the SCBCD exam with 90%
Thanks to Bert, Kathy for their wonderful book...
I got a decent score thanks to my work which involved EJBs predominantly...

15 years ago
I am using iText to generate a multiple-page PDF file. Now when I execute my program, sometimes the PDF file is generated correctly, but at times I get the following error: "The PDF file is damaged and could not be repaired", when I try to display the file on the browser. If I try to launch it myself from Windows Explorer, it opens up often, but this is also not happening all the time.
I am not able to figure out the exact source of this error.
Any pointers in this direction would be appreciated.

15 years ago
You may provide either
1) a remote home interface and a corresponding remote component interface, or
2) a local home interface and a corresponding local (component) interface.
You can't have
1) a remote home interface and a corresponding local (component) interface, or
2) a local home interface and a corresponding remote (component) interface.

So, option d is correct.
From the EJB specification:

For a session bean, the transaction attributes must be specified for the methods defined in the bean�s component interface and all the direct and indirect superinterfaces of the component interface, excluding the methods of the javax.ejb.EJBObject or javax.ejb.EJBLocalObject interface; and for the ejbTimeout method. Transaction attributes must not be specified for the methods of a session bean�s home interface.

So, 2 should also qualify as a correct choice.
Why are stateful session beans allowed to end a method without ending the transaction? Why isn't this true of stateless session beans?
Thats right. But what i can't understand is that the same code when removed from the Timer class and put directly into the servlet's init() method, works perfectly. But as soon as the same code is put throught the Timer, it throws this error.
Is it because of some constraint of J2EE 1.3? While surfing the net to resolve this, I learnt that in J2EE 1.4, a Timer service for exactly the kind of functionality that I am trying to achieve, has been introduced. But then I am stuck with J2EE 1.3.
I am trying to call an EJB session bean method from within a java.util.Timer object. I want this method to be executed repeatedly over specific intervals. I have implemented JAAS security.
The Timer is called from a servlet's init() method. This results in the following error:
Authorization failed for /UNAUTHENTICATED while invoking (Home)ejb/com/dcx/sp/bl/bcf/ejb/AdministrativeQueryProviderHome create:2 securityName: /UNAUTHENTICATED;accessID: null is not granted any of the required roles: All
Non-application exception occurred while processing method "create". Exception data: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)ejb/com/dcx/sp/bl/bcf/ejb/AdministrativeQueryProviderHome create:2 securityName: /UNAUTHENTICATED;accessID: null is not granted any of the required roles: All

Now, the same code (without the Timer part), if executed from the servlet's init() method, works correctly. When executed with Timer functionality, the call to the session bean's create() method is failing with the above error.

What could be the reason that the code fails when invoked through a Timer object? BTW, i am using J2EE 1.3.
SELECT MIN(o.orgUnitId) FROM ProcessedOrganization o
This is query i am using ,in this case

ProcessedOrganization Entity have orgUnitId as primaryKey as well as
foreign key reference.
when i am going to generate rmic for this Ejbql then it showing error
Invalid SELECT containing either expression,parameter,or multiple elements.
I am using ejb 2.1 so there is no problem of version
can u help me?
15 years ago
The service() method is not threadsafe. Only one instance of a servlet is created. For each request, a new thread is spawned.
My question:
If some code is written in the service class which updates a database table, and different clients access the servlet at the same time (in effect, the service() method) then how is database consistency handled?
16 years ago
16 years ago
At just INR 500, its definitely good value for money.