Nayyer Kamran

Greenhorn
+ Follow
since Dec 15, 2000
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 Nayyer Kamran

dear all
does any version of weblogic support ejbSelect method as defined in EJB2.0 specification if yes then can u give me the address of some tutorial or Example to go through it.
Thanks in advance
Nayyer
21 years ago
Hey
does any version of weblogic server support ejbSelect method according to the EJB2.0 specification. and if yes then where do I can find out the tutorial or example for it.
Thanks in advance
Nayyer
in a finder method I want to use anding between two parameters currently I am using is 'AND' but it does not works so what would be and where do I can find details about ejb query language.
finder method syntax.
<query>
<query-method>
<method-name>findBySession</method-name>
<method-params>
<method-param>int</method-param>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>
< ![CDATA[WHERE UserID = ?1 AND SurveyID= ?2]]>
</ejb-ql>
</query>

Thanks in advance
Nayyer
you did not mention which version of the ejb specificaiton u r implementing and where did u defined the setXXX() methods, is it container managed or beanmanaged. and some detail description of how u r using it I mean cliet calls.
hope I would be able to help u after these details.
Nayyer
How we can handel one-to-many relation in EJB1.1, if both table are CMP beans.
e.g:
if A(one side bean) and B(many side bean) are two beans then can we call the bhome.create() or create of B many times, while we are remains in the create method of A. is it possible.
There are two things should be consider
1:A has yet not created in Database as it is still in its create method. and in database we could have the Foreign key constraint.
2:A and B are of the part of different transaction. What container haults the A's tracation and starts B's trasaction.
does making them the part of the same transaction would do the magic.
Thanks
Nayyer

Originally posted by Michael Hildner:
Sorry I misunderstood at first. You're not using WebLogic 6.0 are you?


I am using weblogic 6.0 Evaluation Version recently downloaded
Nayyer

Originally posted by Michael Hildner:
Did you also change your primary key class? Is is the same name? Is the name correct in the deployment descriptor?


Dear Michael problem is not the one that understand. These are the events sequence
Lookup the bean with JNDI name (Successful)
Creating the bean with a primary key(cosposite) (Successful)
Change one of the fields of the primary key e.g primary key is ID and Name and I created the bean with ('10','Adeel') later I change name from Adeel to 'Nayyer' by calling bean method changeName(String name); this change also reflects in my database so that means the changing is successful. after that if I go to execute any method on the same bean previously created it throws the exception which mention that server is trying to find out the bean with the same old ID and name.
Now I want to know that does ejb specification discuss this problem and its solution.
and what should I do to over come this problem.
Nayyer
I faced a problem while developing a CMP entity bean with a compound key. Problem is if I change one of the primary key fields and then call some fn over the same bean exception occures. The exception is
"nayyerjava.rmi.NoSuchObjectException: Exception in ejbLoad:javax.ejb.NoSuchEntityException: Bean with primary key: '10Adeel' not found. "
This is because that container does not change its refrence with the field change should it not do that?
does ejb specification discuss this problem as its not that much unusual bahaviour.
is there some solution.
Thanks
Nayyer Kamran
Dear fellows,
I am evaluating weblogic server 6.0 beta evaluation version and I feel that it is too slow does it due to the beta version and the puchased would perform better.
2nd question is that weblogic server get stop quite frequently any reasoning
Thanks in advance
Nayyer
Dear fellows,
I am evaluating weblogic server 6.0 beta evaluation version and I feel that it is too slow does it due to the beta version and the puchased would perform better.
2nd question is that weblogic server get stop quite frequently any reasoning
Thanks in advance
Nayyer
21 years ago
dear fellow,
u must differtiate between a variable or variable name and an object that occupying space. GC one and only key rule is
"An object(occuping space) gets eligble for garbage collection when it could not be accessed again or any refrence to it has be lost or destroyed"
in your both question 'anObj' is variable name not the object where as "sample" is the real obj so untill u have a refrence to it, it can not be garbage collected
07: anObj.trim(); as "sample" have nothing to trim so no new obj get created nor u r dislocating the anObj so an obj is still pointing the smae "sample"
09:anObj=anObj.toUpperCase();
as "sample" and "SAMPLE" is different objects which u can confirm by insering this line of code in your code
String anotherObj=anObj.toUpperCase();

if (anotherObj==anObj){
System.out.println("equal");
}
else{
System.out.println("unequal");
}
'unequal' get printed it means that new obj get created and its refrence has been assign to the anotherObj.
where as in your case 'anObj' is get assigned new obj refrence. so the old 'sample' is ready for garbage collection as it does not have any var to get refrenced in program.
in your next question the explanation is same what only matters is the local scope of 'anObj' and 'locObj' var after that 'sample' could not be refrenced so it is eligible for garbage collection just after 'if'
hope u not get confused
Nayyer

Dear fellows.
Is it possible to print from applet. if it is then probably we need to have a signed applet to do this. Then How we make an applet signed.
thanks in advance
Nayyer
21 years ago

I found "Thinking in Patterns" by Bruce Eckel a good book to go through. and available in electoronic version at bruceeckel.com
Nayyer

class Xx extends Object {
String str;
void setstr() {
for(int i=0;i<5;i++){
str=Integer.toString(i);
}
}
public static void main(String args[]){
Xx obj = new Xx();
obj.setstr();
System.out.println(obj.str);//Here I am accessing the var and geting
//4 as output so it means that the last string has yet not gone for
//garbage collection
// so the answer is c.
}
}
//reply if I am wrong
It is mentioned for HomeInterface that use only the arguments types that are allowed by the RMI standared. So what is the RMI standar and what are its allowed types.
Thanks in advance
Nayyer