long meng

Ranch Hand
+ Follow
since Oct 10, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by long meng

the Query object has 3 mothed: iterate(), list() and scroll(), which one should i take? any difference among them? and on what condition, i should use which one? thanks!
want to learn java FX, hope i can win this book~~~
15 years ago
i just tried this,


and the conn is null, is that mean the connection is already closed?
i use the connection pool provided by websphere, i want to know if i call "session.close()", is that mean hibernate will give the connection back to the connection pool? if not, how to give it back, thanks!
hi, i use the connection pool provided by websphere, i want to know if i call "session.close()", is that mean hibernate will give the connection back to the connection pool? if not, how to give it back, thanks!

Misha Ver wrote:

long meng wrote:why it tried to connect 127.0.0.1:8009, while i set wk.ajp13.host=83.10.31.20?



Most likely you have some other settings somewhere



so where is it? anybody help...
15 years ago
and here is the logs

mod_jk.log:
[Mon Aug 24 17:00:20.656 2009] [3964:1348] [info] jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)
[Mon Aug 24 17:00:20.656 2009] [3964:1348] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)
[Mon Aug 24 17:00:20.656 2009] [3964:1348] [error] jk_ajp_common.c (1507): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)
[Mon Aug 24 17:00:20.656 2009] [3964:1348] [info] jk_ajp_common.c (2447): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [info] jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [error] jk_ajp_common.c (1507): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [info] jk_ajp_common.c (2447): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [error] jk_ajp_common.c (2466): (ajp13) connecting to tomcat failed.
[Mon Aug 24 17:00:21.859 2009] [3964:1348] [info] mod_jk.c (2615): Service error=-3 for worker=ajp13


access.log
83.10.31.20 - - [24/Aug/2009:17:00:19 +0800] "GET /Fenye/form/logon.jsp HTTP/1.1" 503 323

why it tried to connect 127.0.0.1:8009, while i set wk.ajp13.host=83.10.31.20?
15 years ago
is that matter? although it's deleted, it still doesn't work ...
15 years ago
LoadModule jk_module modules/mod_jk.so
#JkWorkersFile "D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\workers.properties"
JkWorkersFile "D:\Program Files\Apache Software Foundation\Apache2.2\conf\workers.properties"
JkMount /*.do worker1
JkMount /*.jsp worker1

and i have already restarted apache and tomcat.

mok_jk.log:

[Sun Aug 23 18:09:43.390 2009] [364:2468] [error] jk_uri_worker_map.c (506): Could not find worker with name 'worker1' in uri map post processing.
[Sun Aug 23 18:09:43.390 2009] [364:2468] [error] jk_uri_worker_map.c (506): Could not find worker with name 'worker1' in uri map post processing.
[Sun Aug 23 18:09:57.640 2009] [364:5724] [info] mod_jk.c (2623): Could not find a worker for worker name=worker1
[Sun Aug 23 18:10:06.703 2009] [364:5724] [info] mod_jk.c (2623): Could not find a worker for worker name=worker1
15 years ago
this is my workers.properties file,if i change "worker1" to "ajp13" , it works; if like the code below, it doesn't work

ps=\
wk.list=worker1
wk.worker1.port=8009
wk.worker1.host=83.10.31.20
wk.worker1.type=ajp13
wk.worker1.lbfactor=50
15 years ago
hello everyone, i have a problem when i config the workers.properties.

the value of workers.list can only be set to "ajp13", when i try to change it to anything else(like worker1), it will get a 500 error.

and in the mod_jk.log, report is like this "[error] jk_uri_worker_map.c (506): Could not find worker with name 'worker2' in uri map post processing."

why i can't change the value?
15 years ago
thanks James! i got it~!
and a little question here is where the SomeClientObject class get the factory object ?
shall i make it an instance varible, and use setter method to assign the concrete factory object to it?

James Clark wrote:You are missing the point of "not changing the client object code."

The classes of client objects which use the "factory method" do not need to be renamed, recompiled, newed or whatever.

Keep in mind that object-oriented design patterns are typically for solving significant issues with large systems. It might be hard to learn or understand if using "small" examples with only a few classes. If your implementation of Factory Method saves you time because you do not need to modify 20 to 50 classes, then this is a significant benefit.



i do remember the point, like my code: if there is a new product the Client class want to use , how to do it without change the code?

i'm realy confused, hope you can help me ! thank you very much!!!
there is always a place to new the new factory, why i can't just new the new product instead of the new factory?
so anyone tell me the advantages of factory method pattern, thanks