Amrit Kashyap

Ranch Hand
+ Follow
since Apr 23, 2006
Merit badge: grant badges
For More
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 Amrit Kashyap

thanks Paul for your response.

I was planning to use Oracle DBLink to connect to SQL Server.

Now my oracle database is on Unix platform and SQL Server is on windows platform.

As of now, I was thinking of writing sql Inserts over DB Link to fetch data from Sql Sever to Oracle Database.

I asked if the use of Oracle DBLink will be a good choice and what do's and don'ts need to be taken care. Is there any other alternative method of data migration is available?

13 years ago
I need to migrate data from MS SQL Server 2000 to Oracle database 10g. I am thinking of using db link for the same. Any particular do's and don't for using db link to connect to SQL Server???
13 years ago
hi raf,

the log4j jar file is being used by both my web and ejb archieve.

can you tell me where should i put the log4j jar file.

since putting in web-inf/lib does not work...........
Hi all,

I am facing problem in deploying my ear file.

Following is the structure of my ear file


Follwoing is the content for my for MYWEB.war

Manifest-Version: 1.0
Created-By: 1.4.2_06 (Sun Microsystems Inc.)

and follwoing is the content for my for MYEJB.jar
Manifest-Version: 1.0
Created-By: Oracle JDeveloper 10g 10.1.2
Class-Path: log4j-1.2.9.jar

When I try to deploy this file, i gets the following error message

error instantiating application 'MyEAR' at file:
Error initializing ejb-module;
Exception Error loading class 'common.loginejb.LoginSessionBean': java.lang.NoClassDefFoundError: org/apache/log4j/Logger

I am using oracle10g AS for deploying my ear file.

My requirement is that I've to pack this log4j-1.2.9.jar file in the ear file itself. I cannot put it in applib folder or any other folder in the class-path.

Since as far as I know according to J2EE specification, if I put the class-path entry in META-INF/ file, then EJBJAR file should pick that.

Please suggest where I am wrong.

thanks Krishna.........

and thanks to all the ranchers, who helped me in preparing for the exam......

15 years ago
hi all,

i've passed my SCJP 1.5 on last saturday securing 88%....

15 years ago

As long the J2EE knows about and is managing the database connections you are making, then yes in the event a transaction fails, the entire transaction (unless you are catching the exception) will be rolled back.

Hi Scott,

I didn't get you completely.

But anyhow, I am catching the exception and within exception handler I am marking the tranasaction to be rolleback by calling "setRollBackOnly()" and then throwing that exception again.

I am using setRollBackOnly() in case of exception to mark the transactions for rollback.

Hi Roger,

Yes, my every subsystem is opening and closing independent database connections.

Due to some constraints, I am not able share the database connection, among multiple subsystem.

I am using the transaction attribute of REQUIRED.

Will not the container itself, take care of the transaction to be rolled back and do the needfull to rollback that transactions completely regardless of no. of connections opened and closed with in that transactions context,once I've marked it for Rollback.
Hi Gitesh,

Can you tell what is your exact question?

From the answer, which you are saying to be correct, the question should be "How thread2 can avoid any chances of deadlock situation with thread1?"

Correct me if i am getting it wrong?

If that is the question, then your answer option 4, may result in a deadlock situation, if the order of parameter passed is obj2 and obj1.

I think option 3 is also right.

"The second thread should call getLocks() only after first thread exits out of it. The is not necessary. Option 2 works just fine."

When thread1 has exited from getLocks(), thread2 can safely call getLocks() giving parameter in any order.
Hi everybody,

I've some doubt regarding transactions management for J2EE.

I've one J2EE application built using EJB, Struts, DAO, DTO, Business Delegates and some other desing patterns.

All of the EJBs are "Stateless Session Bean", with following configuration:



I am making database operations using DAO pattern, in which case I opened a new connection, do the changes and then close the connection.

But in some cases, I am accessing multiple subsystem which in turn open their respective connections to database and close them subsequently. And I am accessing these subsystem from a single session context.

I am using setRollBackOnly() in case of exception to mark the transactions for rollback.

According to my understanding, container should rollback the transactions "COMPLETELY" in case of exceptions.

But in case I am accessing multiple subsystems, the transaction does not get rolled back "COMPLETLY".

Please help, where am I wrong?
hey javaranch guys!!!

what has happened to you???

Is not there anybody who can clear my doubt??
hi everybody,

I am using the following data source setting for my project work.

And everything is running fine.

But I don't know what's the purpose of location, xa-location and ejb-location attribute.

I've checked on internet as well but could not get a satisfying answer.


url="jdbc racle:thin:@localhost:1521 rcl"


Can anybody explain these attributes to me?
Hi Eric,

May you give me the link for the previous topic?

HI all,

I've doubt regarding the Generics.

I am referring to Kathy Sierra & Bert bates for the same. Page no is 634 and Problem no. is 16. And problem is which will compile without error:

According to book the answer is B,E,F.

But when I tried to compile this code, I got all the options wrong.

Can Anybody help?