Tero Ahonen

Greenhorn
+ Follow
since May 24, 2001
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 Tero Ahonen

Hi,

I'm starting a new project with JBoss Seam and still haven't desided which dev environment I'll use. I would like to hear what kind of env. you use when you're developing with Seam.

I have done one Seam project with Eclipse and Maven. In contained three different Eclipse "code" project (web, ejb and ear) and one for bringing all together. It was pretty nice, even it took huge amount of work to get it working. depencecys where really pain in the ass. Also testNG and microcontainer didn't work together. So I couldn't do any Seam component tests during build.

I have tested Eclipse and JBoss Tools. The idea in there is really nice, but it feels very slow and heavy. JBoss, JSF libraries and for example RichFaces is very nicely integrated to the Eclipse. Still I did't like it. Maybe there were too many moving components and no control att all...I dont know.

Have anyone done Seam project with just plain Ant ja Eclipse? I dont need to run app server in the Eclipse. I like to run server in console outside Eclipse. The WYSIWYG coding is also not for me. I dont want to drag and drop components. It 's a nice feature, but I would like to know what goes in the source, so I like to write my code not draw it

Please share if you have some nice experiences with Seam and dev. tools and environments.
Correct result should be 3, because only best results is counter from each player. Se the query to get players position in list should be executed agains result set created with something like this: "select * from result group by player_id order by points desc"

So first I need results list which cointain only best result from each player and from there I need to read players position in list.
I have a small query problem that I cannot solve.

I have an result table which contain all game results

mysql> select * from result;
+----+---------------------+------------------+-----------+---------+-------+
| id | created | points | player_id | game_id | round |
+----+---------------------+------------------+-----------+---------+-------+
| 1 | 2006-06-13 12:52:30 | 3811.88333333333 | 4 | 3 | 0 |
| 2 | 2006-06-13 12:53:33 | 3804.55 | 4 | 3 | 0 |
| 3 | 2006-06-13 14:17:42 | 0 | 5 | 3 | 0 |
| 4 | 2006-06-15 00:12:29 | 3826.05 | 5 | 3 | 0 |
| 5 | 2006-06-15 00:13:37 | 1893.5 | 5 | 3 | 0 |
| 6 | 2006-06-15 00:14:12 | 1891.16666666667 | 5 | 3 | 0 |
| 7 | 2006-07-28 08:34:27 | 1913.05 | 1 | 3 | 0 |
| 8 | 2006-07-28 08:36:22 | 1865.46666666667 | 1 | 3 | 0 |
| 9 | 2006-07-28 08:38:11 | 0 | 1 | 3 | 0 |
| 10 | 2006-07-28 08:38:49 | 1919.38333333333 | 1 | 3 | 0 |
| 11 | 2006-07-28 21:36:25 | 0 | 6 | 3 | 0 |
| 12 | 2006-07-31 01:08:56 | 0 | 1 | 3 | 0 |
| 13 | 2006-07-31 02:01:55 | 1841.61666666667 | 1 | 3 | 0 |
| 14 | 2006-07-31 02:05:47 | 1922.73333333333 | 1 | 3 | 0 |
| 15 | 2006-07-31 02:08:12 | 1879.31666666667 | 1 | 3 | 0 |
| 16 | 2006-08-09 21:58:05 | 0 | 1 | 3 | 0 |
| 17 | 2006-08-09 21:58:13 | 0 | 1 | 3 | 0 |
| 18 | 2006-08-09 23:27:10 | 1579.23333333333 | 1 | 3 | 4 |
| 19 | 2006-08-11 06:17:44 | 0 | 1 | 3 | 5 |
| 20 | 2006-08-11 07:23:04 | 3748.96666666667 | 1 | 3 | 22 |
| 21 | 2006-08-11 07:28:26 | 3517.98333333333 | 1 | 3 | 23 |
| 22 | 2006-08-11 07:28:36 | 5258.61666666667 | 1 | 3 | 23 |
| 23 | 2006-08-11 07:28:41 | 6908.61666666667 | 1 | 3 | 23 |
| 24 | 2006-08-11 07:30:26 | 3782.01666666667 | 1 | 3 | 25 |
| 25 | 2006-08-11 07:30:31 | 5610.78333333333 | 1 | 3 | 25 |
| 26 | 2006-08-11 07:30:34 | 7397.65 | 1 | 3 | 25 |
| 27 | 2006-08-11 07:30:34 | 9173.66666666667 | 1 | 3 | 25 |
| 28 | 2006-08-11 07:30:35 | 10941.3333333333 | 1 | 3 | 25 |
| 29 | 2006-08-11 07:30:35 | 12701.3333333333 | 1 | 3 | 25 |
| 30 | 2006-08-11 07:30:36 | 14454.8166666667 | 1 | 3 | 25 |
| 31 | 2006-08-11 07:30:36 | 16202.3 | 1 | 3 | 25 |
| 32 | 2006-08-11 07:30:36 | 17944.2666666667 | 1 | 3 | 25 |
| 33 | 2006-08-11 07:30:39 | 19645.6833333333 | 1 | 3 | 25 |
| 34 | 2006-08-11 07:30:39 | 21340.9166666667 | 1 | 3 | 25 |
| 35 | 2006-08-11 07:30:40 | 23030.3166666667 | 1 | 3 | 25 |
| 36 | 2006-08-11 07:30:43 | 24666.1333333333 | 1 | 3 | 25 |
| 37 | 2006-08-11 07:30:44 | 26285.4333333333 | 1 | 3 | 25 |
| 38 | 2006-08-11 07:35:21 | 3875.53333333333 | 1 | 3 | 27 |
+----+---------------------+------------------+-----------+---------+-------+

I have a query which I use the read the position on one invidual player..

mysql> select count(*) from result where points >= (SELECT max(points) from result where game_id = 3 AND player_id = 4);
+----------+
| count(*) |
+----------+
| 18 |
+----------+

But this result is wrong . I would like to check the position of a player from distinct results set.

So with this query I can created the distict result list with max points on each player

mysql> select distinct player_id, max(points) as maxp from result group by player_id order by maxp desc;
+-----------+------------------+
| player_id | maxp |
+-----------+------------------+
| 1 | 26285.4333333333 |
| 5 | 3826.05 |
| 4 | 3811.88333333333 |
| 6 | 0 |
+-----------+------------------+

How can I join the which I use to read the position of a player with below query.
That was my initial quess for the answer, but I just needed some confirmation. Thanks.
15 years ago

Originally posted by Chris Mathews:
Got a few questions:
Do you have a hardware load balancer in front of the Apache Servers?

Yes

Are you using HttpSession to store user information?

Yes

Are you replicating these sessions across the cluster or are you using
sticky sessions?

Session replication is on and sticky session are used.

If you are using sticky sessions, are the sessions sticky at the load balancer or WebLogic layer?

Load balander doesn't have any idea about session so they are sticky in WL layer

Are these boxes co-located in the same data center?

Server are in same data center and in same subnetwork.

15 years ago
Hi,

I would like to hear your opinion about my clustering scenario.

I have two physical machines, both with Apache HTTP server and 2 Weblogic server istances. Apache serves static content and Weblogic dynamic stuff. All 4 servers are defined to run as one cluster. Apache server are running webserver plugin and all .do and .jsp calls are fowarded to weblogic.

The actual question is...Should I forward call from apache to all weblogic server or only to server in same machine.

Example: I have to machines A and B and they are running Apache server and weblogics A1, A2, B1 and B2. Request comes to Apache in server A, should I forward the request to weblogic A1, A2, B1 or B2 or only to A1 or A2.

Is there a performance decrease if I forward calls across different machines.
15 years ago
A while ago I made some rough test for Weblogic HTTP server performance. I tested one jsp page with images, css and js links with Weblogic 8.1.4 and with Weblogic 8.1.4 behind Apache HTTP server running weblogic proxy plugin.

Plain Weblogic handled 320 request/s and Weblogic-Apache handled 650 request/s. Apache and Weblogic where running on same machine. Difference can be even greater if Apache is runned in seperate machine.

Usually static stuff is cached in client browser so performance increase in production envs is not as big as my tests show.
[ April 03, 2006: Message edited by: Tero Ahonen ]
15 years ago
I made the changes that Chris Mathews adviced and now the application runs lika a Buick. Thank you for your advice Chris.
15 years ago
This stuck stuff is very strange, cause exactly same code worked fine in Weblogic 8.1.4. Only difference is, that now it is compiled with Java 5 and also executed in Java 5 env. I'm using BEA's JRockit as runtime virtual machine.
15 years ago
Thank you for your answer. I'll try your solution. I dont have any synchronized method or block in my code.

Lets see does this help.
15 years ago
Hi,

I have a problem with JNDI code in weblogic 9.1. It seems that all my code that read something from JNDI is stuck. I'm creating reference to JNDI like it is said in BEA help site Context ctx = new InitialContext() or with constructor InitialContext(url, "weblogic.jndi.WLInitialContextFactory"). I took a thread dump from server and saw in dump traces that all stuck threads were using my "service locator" class.

I'm using the JNDI to get references to EJBs and I'm closing the context in finally block after I have used it. Here is an example about my lookup code.


[ March 28, 2006: Message edited by: Tero Ahonen ]
15 years ago
I'm using Struts MultipartRequestHandler for uploading file to server with my webapp. File upload form contains also text fields and I have a problem to get data correclty encoded from those text fields.

Everything works fine if I use standard chars and letter, but I post some data which contains scandic characters (umlautes like �, �, � etc.) those chars are not transferred correctly to business logic.

I have set the page encoding to all jsps automaticlly with jsp-property-set in web.xml(jsp 2) and also manually to this form jsp. Encoding that I use is ISO-8859-1, which should contains the scandic chars. Actually scandic chars word fine in standard HTML forms.

I'm runnit the webapp on Tomcat 5.0.2x and with JDK 1.4.2....does anyone have a knowledge about this kind of issue.
17 years ago
I have done the SCWCD and it gives good and solid base knowledge about Servlet and JSP apis. SCBCD is also a good cert. and I will also do it someday, but with ..WCD I have very good knowledge about the client and middle tier J2EE stuff. That is true that ...WCD is easy, but you can have to goals....either pass the cert or pass the cert and learn something.
[ October 30, 2003: Message edited by: Tero Ahonen ]
What king of development software you are using for EJB development..,single IDE or many tools together?
I have installed Sun ONE appserver 7 platform edition in to my winXP and I have a problem with shutdown and restart.
When I try to shutdown server from admin console, with winxp service management console or with shortcut created by sun one installation app. Servers is shutdown...I think... but appservd.exe task is not removed from windows task manager (these are two of the one for admin server and one for default server). And finally I cannot start the server again....I have to reboot my system to get the server up again.
18 years ago