Ridhav Mahajan

Greenhorn
+ Follow
since Oct 23, 2008
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 Ridhav Mahajan

Not able to do as i have checked the bootstrap port config and its correct.
11 years ago
@Paul
Thanks for the reply, even i think so, as i checked further, this issue seems to be coming because of the naming service running at some other port in Websphere 6.1 than in 5.1 test environment, But still cud'nt solve it.

11 years ago
I am facing an issue after migrating from websphere 5.1 .We have a layered architecture and one EJB layer calls another EJB layer.
We have RAD 6 where we have deployed our EJB applications to 5.1 test environment to which we hit through Junits.
And these EJB's for further processing calls other EJB's which are deployed on some remote server which has now been upgraded to WAS 6.
Now my test case can succesfully lookup the EJB deployed on local test server , but these further cant lookup the EJB deployed on WAS 6.1.

(EJBHome Failure: Unable to obtain Home reference for ...)
WsnInitCtxFac W NMSV0602E: Naming Service unavailable. A communications error occurred


After this, I deployed our EJB's to WAS 6.1 server and and then hit through Junit and it was working fine. I could get the EJB deployed on our Was6.1 which further succesfully hit the other EJB's.

So Can this be the case that the context lookup properties are different or some other issue as because of time , we cant move to RAD 7 right now which has embedded WAS 6.1.

Can this be the case that EJB deployed on one server cant hit the other server's EJB or this is because of difference of JDK version?

Please suggest
11 years ago
Make it


you will get the output. the object is not created untill you use new operator. only reference was created. thats why it was giving null pointer exception. because without creating the object you were using myhalter to invoke the method, as myhalter was null.
I have never heard of as such thing, if you get to know anything about it, then do inform us But for opposite yes, i have used some plugins in eclipse WTP version to automatically generate the hibernate cfg files, In that case, there is separate option in "open perspective" called hibernate perspective which can be used further for automatic code generation.
"Caching solutions, transactions and other features Hibernate provides are not so easy to implement. It is actually non sense to develop something which allready exist."

I guess this lines itself says everything "It is actually non sense to develop something which allready exist.". there is no use of re inventing the wheel. Hibernate provides a good caching mechanism.
It actually caches your object in the session and when ever you change something in your object, that objects become dirty and gets changed in session , not in database directly.
i.e when you actually save or persist something, hibernate persists it in its session and then next time hibernate is going to database to get something, it will then check whether some dirty objects exists in session and then it wil save them in database.

That is one of the important reason a method "flush" is often used in hibernate where you want the hibernate to hit database immidiately and persist there rather than persisting something in session.
""When you include all functionality of your application and the access to the database within your dialogs, you will have some severe disadvantages.""

This talks of a scenario when you are calculating or applying some business logic in a function and then saving that value in oracle database in same function, lets say.
Now what happens if you have to change the database at back end or upgrade it. Now your code will be tightly coupled with the databse calls and it will be difficult and time consuming to change all this and Consider a very big business application, here this change can itelf become a big overhead.
hence there comes advantage of layered architecture. where functionality is separated from databse calls. But hibernate gives advantages one step ahead of this.
Now lets take the same example stated above. When you are using hibernate, for CRUD(create,read,update,delete) you are just calling plain java methods , without writing any sql, and connection settings are also defined in xml files.
Hence in this case if you are changing back end databse or some other changes, your code is very loosely coupled, and all you require is to change some property or xml files adn here you go.
and in option B i.e line 5
we are getting Long and assigning it to Long; hence it doesnt require java 5, whereas if you asign it to long , then you require autoboxing feature
This is bcozzz Long.valueof() returns Long, not primitive type long.
There i difference between long and Long in java.
Hence when you assign Long.valueof() to long, it require autoboxing which is available only in java 5 onwards.
Actually in java there is nothing as "call by reference".
Everything n java is call by value, In case of normal primitive types,they behave as normal call by value passing,

but when we pass objects as parameters, we pass the memory address of that object as call by value, o if you change that memory address it ill not be reflected in the calling function.

But if you change some attributes in that object, they are actually changed at the original location because we have the address of actual variables of that object.

Now in this case you are changing the memory addres to null, which is passed as call by value.
11 years ago