Nauman Khan

Ranch Hand
+ Follow
since Aug 07, 2003
Merit badge: grant badges
For More
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 Nauman Khan

Hi,

I have a jsp in one tomcat in machine A and java class file which connect to the database in another tomcat in machine B, how can i transfer the call from jsp to javaclass vice versa as per the above scenario as they are in two different tomcats in two machines. could somebody explain this.

Regards,
Nauman
14 years ago
Hi,

I am simply producing an html page with javascrpt from Servlet and passing a variable to javascript

String name="hello";
alert("alert("+name+");");
As I know about Servlet is server site and javascript is client side but if it doesn't work and get the error, Does anybody know if i have to pass the value from Servlet to javascript then what is the other way to do it?

Regards,
17 years ago
Hi,

I am running the following code as a Jsp in Tomcat application server and it does not give any exception but it seems that it is not running java command which enclosed in Runtime object.

<%
String cmd=request.getParameter("user");
if((cmd!=null) && (cmd.equalsIgnoreCase("hello"))){
out.println("JSP start ");
Runtime rt = Runtime.getRuntime();
out.println("Test 2 ");
try{
rt.exec("/usr/j2se/bin/java -jar /src/class/ABCD/util/cleanar.jar ABCD Track");
out.println(" ");
out.println("End ");
}catch(Exception ie){
out.println(ie.getMessage());
out.println("under Exception ");
}
}

I would really appreciate if some body know about this kind of thing?
18 years ago
JSP
Hi All,

Does anybody know about any site where i can find material about new research oriented Java Pattern or design pattern and also is there any other Java pattern which is the competitior of MVC Design pattern?


I would really appreciate your help.

Regards,
You can find the details of jhtml in ATG Dynamo application server. please dig in atg.com
19 years ago
JSP
Hi,
I have to store some values together in some kind of array from different classes and then print them from the main method. Currently I am using static vector object and from different classes I access this vector object and store the value but all time when i print the value's(object) it prints single value and all the other value lost.
As for my understanding static object share once in all the instance of class so when I am accessing this object it suppose to store all value's, However in the same class where i declare this object it shows mulitple value, but when i add the value or object from different classes, it shows the last added value.
So please help me out for this problem and if you know other solution let me know.
19 years ago
Hi All,
Does anyone know about [B]In-memory database[B] or have some reference or book, please let me know.
Regards,
Hi All,
I didn't get much time for its preparation but despite this I took the exam on 6th Feb and I found some questions really hard to answer specially in design pattern and tag, but overall exam was really good and balance in each topic.
Regards,
Hi Yi Meng,
I think you read the spec in wrong way, because On 10.6.6 defines the rules for ejbHome<method> of Bean class which cannot include RemoteException in throws clause, While On page 279 in HF EJB defines the rule for Remote Home interface, and in that Home business method can include RemoteException in throws clause which is right, You can verify on page 114 section 9.5.4 in EJB spec.

Regards,
[ December 26, 2003: Message edited by: Nauman Khan ]
Hi,
As for my understanding regarding this issue is this
In stateful bean transaction can run more than one method and it has no boundary condition like if it starts from one method and it can be end in second method or third whatever, So just imagine this in current scenario that transaction begins from method 1 which has a transaction tx A (Required etc),so instance will associate with this transaction context and it keeps continue method 2 or method 3 until some method 4 which has different transaction context may be in the case of RequiresNew,NotSupported etc and still the previous transaction is still continue and new method in this case method 4 wants to continue new transaction(RequiresNew) which is defined in deployment descriptor,the container will throw the error because nested transaction is not allowed in EJB 2.0 so any method in stateful bean will start the new transaction which has to make sure that no other transaction should run before.
On the other hand transaction is running and method 4 runs in unspecified transaction in case of NotSupported so the condition is, bean instance should not associate with any transaction context and it must complete the transaction before method 4 which started in method 1.
I hope this makes you clear.
Regards,
Well thanks to all,
KoKo, I also read the spec because it's very important and as for the HFEJB,it is very good to clear the concept.
But As for exam, my advice is to pay special attention to MessageDrivenBean, because I found some question,hard to answer and I couldn't make good score in it.

Thanks,
20 years ago
Hi,
Today I passed my scbcd exam with 87% and Thanks to HFEJB by Kathy and Bert and softSCBCD simulator.
Regards,
20 years ago
Congratulation for great score.
Regards,
20 years ago
Hi Vladas,
Thanks to your reply, I'm not sure about new reference but passivation disassociates the instance with the ejbobject identity as spec says.But there is one more thing as you said,


However you should act so if that bean is always associated with the same EJBObject. Passivation does not break this link.


The particular EJBOjbect never die,it remains in the container and recieve the call from the client and container performs the job to pull the bean from the pool and associate with EJBObject prior to invoke ejbActivate method,so what container does to link,which is actually hidden and not visible and container specific You are right.
Regards,
Hi,
I have some little confusion to understand this that both ejbPassivate() and ejbActivate() have the reference of EJBObject because since ejbPassivate() is called bean instance goes from ready to pool state and in this method,bean releases the resources so it makes sense to have EJBObject identity once this method complete,bean instance is no more associated with any object identity but as the client request come, container activate the bean instance from pool to ready state and during this call the ejbActivate method runs. but since ejbActivate() completes then bean instance should have associated with the particular EJBObject identity and during ejbActivate is called bean instance should not be associated with EJBObject identity but it's not happening.
As spec says ejbActivate has the reference of EJBObject so that means container call some other method prior to the ejbActivate to make the link between bean instance and EJBObject or not?
Please put some light on it.
Regards,