Alexandru Gifei

Ranch Hand
+ Follow
since May 19, 2012
Alexandru likes ...
Postgres Database Java Linux
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Alexandru Gifei

Update: After several runs of the first example I noticed that the order in the first case can be different.
Hello,
While studying for OCPJP7 I encountered these kinds of problems.

Can someone explain me the difference between example 1 and 2?
Example 1:


Example 2


In the first example the text "Boom!!!" is always printed first, but in the second example the order is random (I would also have expected to see the "End" string printed first). How can that be ? The main difference that I see is that in one case there are 2 threads involved, in the other 3 threads. (Including the main thread too ofcouse).

I would much appreciate an answer for this one.
Hello,
We are working on a project where we have to load i18nstrings using fmt tags for instance, on the server-side. We do not have client side i18n strings, and we import these keys in jsps. The issue arises when we have to use these keys in combination with javascript. The only possible way that comes to my mind to separate js from jsp code is to use hidden input fields holding the i18n string values and reading the inputs withing javascript, but i am thinking of the html content that is getting bigger with all these hidden inputs. Is this a good practice or is there other way to achieve this (javascript code separation from jsp)? I know a solution would be to internationalize the strings in javascript code, but that is not possible at this moment.

Thank you,
Alex G.
10 years ago
JSP
Hello,
Anyone knows how is this possible/what's the explanation? I happened to find this instruction in a project i am working on and also here: http://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html.

I noticed that this statement also compiles:

If i am trying to print the 4th element in the array i am getting an IndexOutOfBounds Exception.

Thank you,
Looking forward for an answer.
10 years ago
Hello,
I am getting my hands on spring mvc for the first time. I am having a handler in my controller that displays all users from my app and also a handler for displaying info for a specific user. I am using REST style paths.


Web application configuration:


Spring configuration:





Tiles configuration:


The JSPs that i am using. When i click on the edit hiperlink, the css does not load anymore. So here is the issue, the web page to which i am redirected, http://localhost:8080/app/users/2 does not load the css anymore.






Here is the hierarchical structure of the web application:
Hierarchical

Here is what i see in my app logs when clicking the hyperlink.


What solutions could be for this situation? Thanks.


10 years ago
Hello,

I would like a suggestion on the existing public web services like the ones from Google, Yahoo, Amazon, Flickr etc. that can be used in a web service composition engine. Would prefer to use those that do not require authentication, but this is not mandatory. I am looking for a real case study that would use at least 3-4 web services. Like for example: I want to visit a town in a foreign country and would combine the directions and places web service API's from Google. Much appreciated. Thanks.

Kind regards,
Alexandru
10 years ago
Hello,
I am building a calculator service using Eclipse & BPEL designer with Apache ODE and this is where i got stuck:

If i use concat instead of sum, there is no compilation error. But i need to make the sum of the variables. I have checked the documentation for this function and the signature is: fn:sum(arg,arg,...). What could be wrong here?

Alexandru
10 years ago
I forgot to mention that linux was the OS that i used.
Update: I just used the same setup on windows and i succesfully deployed the WS. I can also see it in my logs:

It is a mistery to me why it did not work on linux.
10 years ago
Hello,
I have followed the basic tutorial from the Apache ODE website, a couple of times.. In particular this one:
http://people.apache.org/~vanto/HelloWorld-BPELDesignerAndODE.pdf
First i used tomcat 6, and the latest eclipse & latest ODE war, and i got stuck at step 23. Then i used tomcat 5.5 and eclipse 3.6 and the 1.2 war. This scenario failed from the start, because i could not install BPEL designer to this version of eclipse (it seems that plugins need the last version of eclipse). Then i switched to the latest eclipse, tomcat 5.5 and 1.2 war. I followed the tutorial more than 1 time, and im almost sure that i haven't missed anything from the pdf, and i could not deploy the service. It doesn't show in axis2 /listServices url. Is anyone familiar with this ? Maybe i am missing some axis configuration that is not stated in the tutorial. I would appreciate a lot a hint, something, anything.

Regards,
Alexandru
10 years ago
Declaring the flags as volatile did the job. Thanks!
Hello guys,
I'm having an issue with 2 threads that run with different priorities. The problem is that the program prints the 2 counters, but does not stop. YThread is similar to XThread. Thanks

Hello,
I would like some suggestions on algorithms books. I have seen some answers in this forum regarding this subject, but i have seen mostly java related books. I would like something that explains and presents algorithms from scratch, and it should not be a language based book, i'm looking for pseudocode-wise ones. Many thanks.
PS: It is ok to receive also info on more complex algorithms books, but i would like to start with the basics first.
10 years ago
Hello,
You can start with the book Head First Servlets and JSP, to learn about the basics of J2EE.
I think that the certification doesn't state that you are a good developer, it shows that you are a good Java programmer and that you are very familiar with Java syntax; you could write code even in a text editor without intellisense. If you do not have much experience with Java i do not recommend taking the cert, and even if you do, try to take the latest certification. Bare in mind that Java 6 was released in 2006 and Java 7 5 years later, in 2011.
Robert Liguri, Mala Gupta & Enthuware are a great combo.