Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Zemian Deng

Greenhorn
+ Follow
since Jun 12, 2007
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 Zemian Deng

Does anyone know if EJB3Unit supports Message Driven Bean (MDB) testing?

Thanks,
--Z
11 years ago
Can anyone spot a clue to help?

Thanks,
Z
11 years ago
Hello,

I have benchmarked some code using Java's ThreadMXBean class and compared with normal real time(using System.nanoTime) like this:


After I converted the nano time into secs, I get these kind of results:


What baffled me is that why sometimes Real time can be smaller than CPU time? Is there something I mis understood the usage of the ThreadMXBean?

Thanks,
tbs
11 years ago
Srikanth,

I hope you just use "rm" as example to use System.exec, as it not portable to other OS systems. Using java.io.File#delete is more safe. Of course you will have to recurse and make sure all files are delete before a directory is to be removed as well.
11 years ago
Ah, so great to see JavaRanch is feature a Scala forum topic! This is great!

I own a copy of PiS too, and I can tell you guys that it's pretty good. It give you reason behind some of the choices they made on the language construct and the usage of frequent collection classes. It definitely gives you the feel of Scala after reading it.

If you can't use Scala in real work, then just learning the language will teach you at least what Funtional programming is about. Of course Scala still let you do all the OO things, but the functional parts are really useful to pick up. After you learned it, you just wish Java would add some of it features to it's JDK too.

Enjoy the book and happy Scala programming!

Zemian
[ December 20, 2008: Message edited by: Zemian Deng ]
11 years ago
Very Cool Indeed! Thanks for the link.
11 years ago
Hi,

If I were to design a hot deploy/undeployer plugin system in my application, I would need to write my own ClassLoader to load in any arbitrary user jar at runtime right? What I haven't figured out yet is how can I unload these classes if I were to remove the plugin at runtime as well? I didn't see a unloadClass method in ClassLoader. Any idea how I would approach this? Is there a library that does this already?

Thanks,
-Z
12 years ago
What is SOP?

Did the catalina.sh run command works for you? Do you even see output?

Have you read the logging section from Tomcat's documentation site? http://tomcat.apache.org/tomcat-6.0-doc/logging.html

If you are experimenting, then read more on JDK's java.util.logging. If you plan to use logging extensively on your app, I recommend using either log4j or logback library.

-Z

-----
12 years ago
Opps... i mean to reply to another topic. Please discard this one
12 years ago
What is SOP?

Did the catalina.sh run command works for you? Do you even see output?

Have you read the logging section from Tomcat's documentation site? http://tomcat.apache.org/tomcat-6.0-doc/logging.html

If you are experimenting, then read more on JDK's java.util.logging. If you plan to use logging extensively on your app, I recommend using either log4j or logback library.

-Z
12 years ago
You need to pased your server.xml on the Connector section where you configure SSL.

My guess is that you have the key name not matching what you added to your keystore.

If you cont to have problem, print the output of how you add your keys and created your keystore will get you faster answers.
12 years ago
Hello Poonam,

Default tomcat will do logging already. If you are experimenting, try running:

$ tomcat/bin/catalina.sh run

And that will run it on foreground with message on screen.

Also check your tomcat/logs folder for more specific logging that saved as file.

You may change tomcat logging by editing conf/logging.properties as default. Or you may use other library such as Log4j to controll it's output as well. Their official site has these documented.

Hope these help.
-Z
12 years ago
Hello Julien,

From what I read of you information, each scriptor should have zero of more scriptures right? and you are working on a app that runs by only ONE scriptor.

Despite this, if you have full control on table, you should go ahead and create a scriptor table and have it's information there, and then link it's ID to each scripture rows. It should help you model and relate data better.

If you don't like that, then you can always just create a simple POJO Scriptor class that capture all that information, and have it loaded at startup of your application (use ApplicationContext for webapp). If you need this information change and persist during the live of application run, then you need provide form and a way to store it anyway. So you might as well use the db.

-Z
[ August 08, 2008: Message edited by: Zemian Deng ]
Access like reading a file?

There is nothing stopping you from creating
inside a servlet.
12 years ago
Also, the latest release is Tomcat6, not 5.
12 years ago