Win a copy of Terraform in Action this week in the Cloud forum!

Chris Jebaraj

Ranch Hand
+ Follow
since Sep 19, 2003
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 Chris Jebaraj

Hi, Is this problem fixed for you?

I am having the same error in Weblogic and trying to figure out but couldn't. Can you help me by posting the solution or changes you made to Weblogic's JMS queue or connection factory?

Thanks
Hi, If you can post the code then we can see whether anything you did wrong. Or otherwise DataTable would do.

One other way to do is, binding the parent HtmlPanelGrid in the UI and do the following
1) When user clicks 'Add' button, invoke an action method in BB
2) In the BB, add whatever components you want and append it with the Parent HtmlPanelGrid
3) Once this action is successful, reload the same page. Now it will have your new components added to the existing list.

If you dont want to reload your page, then AJAX is the best one. You can use AJAX for JSF and try with this.
13 years ago
JSF
Hi Tim,

Regarding point #2, I totally agree with you. Just want to notice how many times the Constructor of the BB is called, i used SOP.

Your point #1 is valid. If that is the case, the App Server creates BB instance per Browser Type ( thinks that each browser type (IE or Firefox) instance is a new session ). I am confused here.

Ok, lets take the normal "Shopping Cart Application". I assume each User login will be considered as new Session. But this contradict to your Point #1. If i dont close the browser window and login-logout with five different user, then will the App Server creates only one BB instance??

If that is correct, then i am forced to believe that the definition of session by App Server is different from what we normally consider in Shopping Cart Application. Is that true?

So, the managed-bean-scope that we are defining in faces-config.xml file is more for App Server's session definition and not the sessions (HttpSession) that we create,manage,destroy in the Application. Is that corret?

Can you clear me on this, I think i have missed out some basic knowledge towards the Session?
13 years ago
JSF
If I specify the scope of the Managed bean as "Session" in faces-config.xml, then I believe the container will create "One" instance of the MB per Session. Is that correct??

Ok, if that is correct. I am totally confused here.

Here is my managed bean,


I deployed the enterprise application and run the App Server. Now, When the first Session is created ( lets say, first user logged in ), I am getting this S.O.P statement printed in the console. After that how many ever sessions created ( ie, how many ever users logged in ), I don't see the S.O.P statement in the console.

Since I specified the scope as "Session", I am expecting the S.O.P statement per Session Creation.

Am I missing something here??? Any thoughts.
13 years ago
JSF
Hi, i have designed a web application in such a way that it will have only one entry point (lets say AuthenticationServlet and some Security Request Filters).

Now i have come across a requirement where one other application (Swing app) of mine needs to talk to my web application. Basically it needs to access only couple of web pages in the web application. I know that if i try to access those pages directly, the Security Filter will block it.

The solutions that i could think of at this point of time are...

Solution 1:
1) Add a unique user account for the swing app (say U1) in the web application and give access to those two web pages alone.
2) Write a new Servlet for processing swing app request
3) Whenever the new servlet gets the request from the swing application, login with U1 at the backend/code and let the user access only those two pages.

By this way, i need not alter the existing security settings and code of the web application.

Solution 2:
1) I can add code in the security filter to let go this swing application calls alone.

By this way, i am afraid because i am creating a hole in the security which might cause trouble later.

Apart from these two solutions, I would like to know without creating a new user for the swing application or adding 'allow' code in the security filter, is there a way where i can have a second entry point for the web application where only my swing application can enter?

Your help is much appreciated!! Thanks.
13 years ago
Hi Gupta,

You are throwing the caught exception in the finally block. That means your method ends there. There is no chance of statements after that could execute. That's why you are getting that compilation error.
As srinivasan said, you havent called the constructor. If you want the k=k*2 as a instance block and not a static one, then your code should be

Hi Gaurav,

Your output is correct. It should be 1. Because the code block k=k*2; is not put inside a static block. Its just a normal block. Your static declaration of k is ended with ;

If you want your output to be 2, then your code must be,
Hello All!

I am using ImageTypeSpecifier to create grayscale instance for 8, 16-bit images. But when i try to create for 12 bit grayscale image, i am getting the following exception,


It looks like ImageTypeSpecifier's createGrayScaleInstance method supports only 1, 2, 4, 8 and 16.

This is how i am trying to generate my buffered image,


Would any please tell me what i am doing is correct. I should generate buffered image for bit depths 8, 10, 12 and 16.

Thanks in Advance. This is very urgent one please!!
16 years ago
Hi Guys!!

Hashtable htOptions = new Hashtable();

Can this statment make sure that some memory is allocated? What about the disk space went off or the VM running short of memory. Wont i get null for htOptions in that case.

All i am confused right now is, do we need to check null for htOptions after this statement. If it is C++, we need to check null as we cannot be sure whether memory is allocated for the variable.

Would anyone of you, please clear me this doubt. I may be wrong , if so please correct me.
16 years ago
Hi All!! I dont know whether this is the right place to post my doubt!.

Service Oriented Architecture consists of one or more web services which are all wrapped by the Business processes. This is what i understood of SOA. Would you please correct me if i am wrong since i am new to SOA. If this is not correct, what exactly the difference between SOA and WebServices?

Thanks
16 years ago
Hey! These are some of the difference i studied a long back from googling the net. Correct me if i am wrong and add more if i missed out anything.

Java
Thin
Java runs only on the server.
Thick
Java runs on client and server.

browser
Thin
Required.
Thick
Optional. You can run the client portion as an Applet in the browser, or stand-alone without the browser. Getting rid of the browser gives you back RAM.

Speed
Thin
Slow. Everything must wait for the server to process and transmit the next screenful of information.
Thick
Fast. Can instantly scroll especially if the app caches data locally. However, starting the application is slower than with thin client.

editing
Thin
Edits are done in block mode. You don't find out about your errors until you hit submit.
Thick
You find out about an error the instant you key it, or sometimes as soon as you finish keying a field. The cursor is placed on the exact source of the error.

pizazz
Thin
You are limited to what you can pull off with HTML and animated gifs, or Javascript if you cheat on pure thin client.
Thick
What the app does is limited only by your imagination. You have the full power of Java available .

hassle
Thin
You must do all your coding on a server. If you don't own a server, you will have a hard time espicially when you would like to debug.
Thick
You do some of your coding on the server and some on the client. This makes more flexibility, also you can debug your client stand alone application.
16 years ago
Hi All!

I have a gray scale image buffer (1024*1024). I need to add the image shutter feature. If any rectangular area is choosen (within the image area), then except that rect area, other pixels should be turned to black or white. I am nowhere near to that. Tried to find any API calls to do that, but failed. Would any one of you please help me.

Thanks.
16 years ago
Guys!!!
When i try to scale an image (1500*1500) by scalefactor 7, i am getting OutOfMemoryError. I tried searching for a solution, but couldn't. But i could see some answers stating that increase jvm memory by -Xmx256m etc. Is there any other possible solution for this case ??? How about using JAI??? Will this solve this problem. [I am writing 24x7 server code which may handle images in MB (max 50-70MB)].

Is anybody there to help me???

Thanks.
16 years ago
Hi Guys!

When i do some image processing stuffs, I came across two code snippets..

Fliping the image horizontally:
-------------------------------
AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
tx.translate(-image.getWidth(null), 0);

Scale the image:
----------------
AffineTransform tx = AffineTransform.getTranslateInstance(image.getWidth(null), 0);
tx.scale(iScaleX, iScaleY);


I really do not understand what is the difference between these two code snippets. First one: Get the scale instance and apply tranlation and in Second one: get the translation instance and apply scale. I am totally confused here . I tried with the other way round for the both case. it's working fine. In that case, why we need two ways to achive. Is there any special reason or any significant advantage in these.

Please clear me. Thanks everybody.
16 years ago