re: trying to make sense of thread dump in Tomcat 5.5.9

2006-02-16 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

We are using Tomcat 5.5.9, and am having a problem with a memory leak.
Most of the threads in the thread dump have the similar stack trace as
this one does.

It doesn't make sense, because it seems that the ldap connection came
from the tomcat server, not from a web application.

We don't have any authentication set up to go to the ldap from the
Tomcat container, I do all my authenticating explicitly, through my web
applications.

How can I track down what is the cause of threads blocking going to the
ldap?

Thank you for any help.

Thread-21964 daemon prio=10 tid=0x0063aac8 nid=0x55dc runnable
[0x6567f000..0x6567fa10]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
- locked 0xaaf005c8 (a java.io.BufferedInputStream)
at com.sun.jndi.ldap.Connection.run(Connection.java:780)
at java.lang.Thread.run(Thread.java:595)

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD9IG1ikQgpVn8xrARA5eKAKCNUdAib9mAzSWHJiR5Kka+pBR+7wCaAiJp
8zIzvCV8yqdM8SoSeccVS6w=
=yPeA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Caldarale, Charles R wrote:
 Read up on servlets and JSPs on the Sun web site (or Google).
 Simplisticaly, servlets are the class files that contain compiled Java
 code for processing client requests.  Normally, JSPs are turned into
 servlets on first reference, but most (all?) development environments
 have a means of pre-compiling them before application deployment.  This
 not only avoids exposure of the source code, it also gets rid of the
 response hiccup that's seen on first reference.

  But, you can decompile class files.

  If you obfuscate them, then it makes it harder to read through the
code, and if it is hard enough it may be that the hacker will go elsewhere.

  JavaME applications are done this way, more for size than security,
but netbeans can easily use an obfuscator.

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDzRUBikQgpVn8xrARA+EZAJ9x2J3UUwpH+as5f1E1GXpQw8VRiQCfQdQ/
AsAT1Mf48qVKRYJ94X2+Ne8=
=io5+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



re: tomcat 5.5.9 caching ldap dns information

2006-01-09 Thread James Black

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

I am curious if indeed this version of tomcat would cache dns information.

What happened is that we have a cname pointing to our ldap directory.
The cname was changed to point to the backup, and the primary was shut
down.

None of the applications that went through the tomcat server could
authenticate against the new server.

We restarted tomcat, and everything started to work.

It appears that the tomcat server was sending everything to the old
server, and not following the cname.

The machines themselves, when doing a traceroute, would follow the cname
to the new machine, so the machine wasn't the problem.

This is on Solaris 9, btw.

Thank you.

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDwmlXikQgpVn8xrARA53jAJ9hRlQoLAT1HRbtmW1PAL2mte+z2gCdFbW9
LXNg0hp4lw5kMZWZ2Os1sn0=
=PW/N
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem solved (was: tomcat 5.5.9 caching ldap dns information)

2006-01-09 Thread James Black

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

James Black wrote:
| I am curious if indeed this version of tomcat would cache dns information.

~  I found out that the jvm caches, by default, indefinately.

~  So, we just need to set the value in java.security.

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDwnaPikQgpVn8xrARAy9EAKCHGta/YUM3VoAHZwsHeLVjg6P3YwCbB3sr
WETyv+oaxvwFhN2i8jqwq80=
=14iA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: making a singleton servlet

2005-12-07 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas Strauß wrote:
 This worker-thread can easily serialize all incoming requests in a working 
 queue (database- or file-based) and your servlet just pushes a job into the 
 working queue for the thread.

  That is my basic plan is to have one thread that runs, emptying out
the input queue, as all requests are put into there.

  I figure I can check back every 10s, though it may be pushed to 30s,
to see if the job was finished.  I want to give them updates, as some of
the students grades may be updated, but not all, so they can at least
see some progress, and to give them updated approximate finish times.

  By using javascript and xmlhttprequest the user won't click the submit
button. They can close the browser, and come back later, and still see
what the status is. :)

  Thanks to all for their responses, I think I have an idea how to
approach this now. I first need a counter to test my servlet and make
certain the same instance is processing everything.

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDlufKikQgpVn8xrARAm01AJ4lmzyvd0l27sOnDFiR8tilWofVdQCeMHyE
wEbgPC9RTcAfSTsaGpFXYss=
=Q04P
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am going to make my servlet be static, with the hope that it will only
have one instance running, regardless of how many clients connect to it.

My concern is what happens when two clients try to connect at one time.
 Will the second client block, until the servlet is available?

I am planning on having it be multi-threaded to handle several clients,
but I was just curious if the client will block.

I only want one instance because I want to control the number of
database connections, and right now the magic number is one db
connection. I will just queue up the client updates and there will be a
mechanism for them to be informed when the db update is completed.

Thank you.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDljy7J/zyYkX46joRAhq7AJ9NF9R+xV8NMsveActW3OTAZB0W2gCghqS+
EwHmAiwiaBQ8wWh6HlDB9SI=
=9o02
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Caldarale, Charles R wrote:
From: James Black [mailto:[EMAIL PROTECTED] 
Subject: re: making a singleton servlet

I am going to make my servlet be static, with the hope that 
it will only have one instance running, regardless of how 
many clients connect to it.
 
 
 What do you mean by servlet be static?  What syntactical construct are
 you employing?
 
 If you mean using static fields in your servlet class, then you will
 have to make use of synchronization clauses to insure concurrent
 requests are serialized.  It's my understanding that the container
 (Tomcat or whatever) is free to process as many requests in parallel as
 needed, as well as create multiple servlet instances - see the servlet
 spec.
 
 What problem are you trying to solve?

  My plan is to try:
public static class SomeServlet extends HttpServlet {  ... }

  That way there should only be one servlet.

  I am writing a servlet to save grades to a database, but,
unfortunately, instructors will procrastinate like students do. So, I
expect that 2000+ instructors will submit their grades in the last hour
or so, before the deadline.  If each instructor had their own db
connection then the system will be useless, as students won't be able to
get connections, since all the connections will be used up.

  For the first test I want to limit them to only one connection that
will read from an input queue, and just process all the grades. Later it
may be bumped up to 20-50 connections, to speed it up.

  That is the basic problem I am trying to solve.

  I am actually using XmlHttpRequest to connect to the servlet so it
doesn't lock up the browser.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDlkneJ/zyYkX46joRAlfpAJ0cdiTxXrSSdLfZ3znd63dSJesvJACgiFes
PfU+fddjZNUPTT1gq0Ft69g=
=tKjO
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Google Map of active users on this list

2005-11-04 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I think the concept is interesting though, albeit not perfect. It would
be difficult to know where people are unless the ISPs gave that information.

But, as a proof-of-concept, esp using google maps, I think it is a great
idea.

- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDa1dgikQgpVn8xrARAjetAJ9jaGti5LXzVXcf579d00WZlT+ChACdE6qg
9nGDZWMk5e8rgG4SMg3nnno=
=7X4o
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]