| Tomcat 5.5.X ready for production ? |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Uptodate MSN messenger API?Guys,
Does anyone know of an up to date MSN Messenger API in Java? I've found
similar for Yahoo and Skype, but I'd like to be able to use MSN (mainly
because our company is moving off Yahoo to MSN over the coming year).
I've searched SourceForge but everything there seems to have been
stopped at least a year ago.
Any suggestions appreciated.
Cheers,
Chris
- 3
- java.netHello
How can I get the ip and mac address of the networking device
(eth0)?? is it possible with the InetAddress??
I want to get the ip address given by the ISP.
Sincerly
DigitaluX
- 4
- Does object pooling *ever* make sense?I've read recently that object allocation in recent JVMs is so fast that
it doesn't make sense to create object pools. Just create a new object
when you need it and let the garbage collector do the work.
Does this hold true when your objects are very large, though? What if
your object contains a byte [] of length 100K? Or 1Mb?
What's the breakeven point beyond which it makes sense to reuse objects?
- 4
- Thread for ProgressBarHi all,
I have a question on threading for the progressbar.
My program will call a few methods and those methods are really time
consuming, the time it takes all depends on how much information are
being pump in, sometimes it can be less than half a minute, sometimes
it can go up to few minutes. So determining the percentage of the
progressbar is impossible.
So how do I find out the total length of the process so that I can
update the progressbar's percentage accordingly?
- 4
- how to read multiple (binary) lines from text file / stdin?
hi group!
i am writing a small tool to dump data from oracle databases and i want
to implement the possibility to execute sql statements read from stdin
or from a file. i have so far managed to do so, but every sql statement
must be on a single line with no ";" at the end of each line.
i would like to use an input file like this:
-- file statement.sql --
select * from table
where thing = "something";
------------------------
or
-- file statement.sql --
update table
set image = '<binary data>'
where thing = otherthing;
------------------------
this is how the code looks so far:
// code start
BufferedReader in = new BufferedReader(new FileReader(filename));
while (((statement=in.readLine())!= null) &&(!statement.equals(""))){
try {
ResultSet rset = stmt.executeQuery(statement);
[...]
}
}
// code end
i would like 'statement' to contain the multiline sql statement
including all newlines so that also binary data may be inserted into the
db so i tried to use
System.setProperty("line.separator", ";");
but that didn't help and also doesn't seem the right way for what i want
to achieve. could someone please point me into the right direction on
how to do that? the variety of different stream classes is somewhat
confusing in terms of finding the right class for the right job.
big TIA, armin
--
armin walland
focusmr.com
maculangasse 8
1220 wien
- 4
- JDBCAdapter & close() method ?Do you know JDBCAdapter from j2sdk TableExample:
JDBCAdapter extends AbstractTableModel {
....
public void close() throws SQLException {
System.out.println("Closing db connection");
resultSet.close();
statement.close();
connection.close();
}
...
}
Who start the close() method on exit of my application???
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 19.7.2004
- 5
- jbutton/jlabel disspearing textHi,
I have created a few JButtons/JLabels but the text on them seems to
disappear depending on the platform the gui is run on (The disappearing text
appears as "..."). How is it possible to set the size of the label/button
according to the length of the text?
Thanks,
Adrien
- 7
- JDK 1.1.8 V1999-11-9 on recent FBSD 4Hi all,
I tried to run JDK 1.1.8 V1999-11-9 (ELF version) on my FreeBSD
4.8-STABLE box. It could not run and I had the following message:
% java Linpack
/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
% java -version
/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
% java
/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
% jar
/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
% java_g
/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
Can the JDK 1.1.8 work on recent FBSD 4 and 5?
How can I avoid this problem?
Kazuyuki Shudo email***@***.com http://www.shudo.net/
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 13
- Servlet LDAP Web Server AuthenticationThis may not be the correct place to post this; however, please bear
with me.
Platform: Solaris 9
iPlanet Web Server
Java Servlets/JSP website
I have a servlet that displays the contents of a directory as links
available for downloading/viewing. I have also locked this directory
down using LDAP through the web administration page of iPlanet. What
I would like to happen is to authenticate to the web server first,
before the links are displayed, so that when the user clicks on the
links, they are not prompted with the typical gray box asking for a
username and password. I've researched and implemented JNDI,
authenticated to LDAP, tailed the logs, and I authenticate fine. My
servlet loads, and the first thing it does is query ldap and
authenticate. Next it prints out the page containing the links.
(I've even tried not closing the context) But as soon as I click on
the links, I am prompted again. I am assuming (and very fuzzy on how
this works) that yes, I authenticated to LDAP. But the webserver
doesn't know that. So how do I get the webserver to realize that I've
already authenticated? Any help would be appreciated.
Thanks,
Kim
- 13
- [JavaIDL] Releasing CORBA object references in Java ?<previously posted on comp.object.corba, with no response yet>
Hi all,
I really wonder what's the use of org.omg.CORBA.Object._release() and
_duplicate().
I was thinking that reference counting was the job of GC.
In C++ the reference counting, via the usage or _var and _ptr and methods
release() and duplicate(), is without ambiguity (even if complex and error
prone). But here in Java, the introduction of _release() and _duplicate() is
very strange.
Another point for the discussion: as I am using the JDK ORB implementation,
the Java Doc says:
"
- Object _duplicate()
Returns a duplicate of this CORBA object reference. The server object
implementation is not involved in creating the duplicate, and the
implementation cannot distinguish whether the original object reference or a
duplicate was used to make a request.
Note that this method is not very useful in the Java platform, since
memory management is handled by the VM. It is included for compliance with
the CORBA APIs.
The method _duplicate may return this object reference itself.
- void _release()
Signals that the caller is done using this object reference, so internal
ORB resources associated with this object reference can be released. Note
that the object implementation is not involved in this operation, and other
references to the same object are not affected.
"
My opinion here is that releasing references or not won't make any
difference, and duplicating them is pointless.
But what does the standard says ?
Thanks in advance,
JC.
- 13
- JAVA NIOHello,
Somewhat new to JAVA, and I swear I have looked all over on this
problem, and found an answer, but it does not seem to work. I have a
non blocking NIO socket client connection I can send data to the
socket check the input buffer for data and handle it okay. If no
activity occurs in say 10 seconds, I do an input read. From reading
documentation, I would expect a 0 return value for a proper connection
with no data, a -1 return value or IOexception for a bad socket
connection. However, what is happening is that the socket connection
is still open on both sides, the read times out and generates an
IOexception error described as Read timed out. Does the JAVA examples
only work when the server is also a NIO object? I say this because
the server I am using is not written in JAVA. Any help or suggestions
would be greatly appreciated!
Thanks
Ryan
- 14
- JAVA scipt neededHi all - I am looking for a JAVA script that automatically downloads
and executes a .exe or .com program upon clicking a link.
Let me know (I'd appreciate an answer to my email address as well)
Thanks ...
- 14
- bsd implementation ofOn Thu, Jan 17, 2008 at 08:13:00PM -0800, Michael Allman wrote:
> There's a bug in the bsd patch to FileChannelImpl.c, as described in the
> subject of this message. FYI, I have verified this using the "current"
> jdk16 freebsd patchset found here:
>
> http://www.eyesbeyond.com/freebsddom/java/JDK16JRLConfirm.html
D'oh...there certainly is.
> I haven't fully analyzed the impact of this defect. I can say that in my
> case, if I call FileChannel.transferTo(0, 100, socketChannel), where 100
> is less than the length of the file in question, it transfers the entire
> file to the destination. According to the docs for this method, it should
> only transfer a maximum of 100 bytes. This is key to my particular usage
> of this method.
The problem is that it ignores the count entirely and just transfers the
whole thing.
> I can attempt to provide a patch, but C is not my thing, and I could not
> make a reliable claim as to the correctness of my patch. Also, there's
> the whole license issue. Fixing this seems simple enough, though. I
> would like to help insofar as I can.
Something like this maybe? (Untested)
--- ../../j2se/src/solaris/native/sun/nio/ch/FileChannelImpl.c 6 Mar 2007 17:45:05 -0000 1.11
+++ ../../j2se/src/solaris/native/sun/nio/ch/FileChannelImpl.c 18 Jan 2008 08:11:36 -0000
@@ -264,11 +264,12 @@
return IOS_THROWN;
}
- while ((r = pread(srcFD, buf, 4096, offset)) > 0) {
+ while (count > 0 && (r = pread(srcFD, buf, (count < 4096) ? count : 4096, offset)) > 0) {
w = write(dstFD, buf, r);
if (w == -1)
break;
offset += w;
+ count -= w;
}
free(buf);
> Also, I know this is getting pushy, but it seems like fixing this issue
> would be a great time to replace the current implementation of this method
> with a true bsd sendfile() call. I could give that a try, too.
As noted in the comments, you can't since the BSD implementation of
sendfile(2) expects to be sending the file to a socket, not just any old
file descriptor. Solaris and Linux are both ok with any old fd.
--
Greg Lewis Email : email***@***.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : email***@***.com
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 15
- Detecting KeyBoard events on a JDialogHello,
i have a JDialog subclass, with a lot of components in it, and i would
like to detect Ctrl+C on it. I've tried to use this:
protected void register(JComponent jcomp) {
Action action = new AbstractAction("Action") {
public void actionPerformed(ActionEvent evt) {
System.err.println("Action!!!");
}
};
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_C,
KeyEvent.CTRL_DOWN_MASK);
jcomp.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(key, "myaction");
jcomp.getInputMap(JComponent.WHEN_FOCUSED).put(key, "myaction");
jcomp.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(key,
"myaction");
jcomp.getActionMap().put("myaction", action);
}
wich is call like that:
register((JComponent)getContentPane());
register((JComponent)getGlassPane());
register(getRootPane());
but my action is never performed.
So i've registered a KeyListener recursively on my dialog, and the
keylistener is called with getSource() returning the dialog ref. But the
dialog has no inputMap so how can i do?
I can't use the recursive trick because there are 2 JTables in the
Dialog which must keep its default copy behavior, and a lot of text
fields too.
Thanks for any help.
- 16
- help with saving a JPanel to jpgI have a JPanel that I paint with a graph. The upper 40% is a graph
with a grid background, and the rest is a legend for the graph. When I
try to save the JPanel as a jpg, I get an image with the same
dimensions but there is no graph or legend and the grid, which uses the
dimensions to set the upper grid limit, covers the entire panel.
Everything on screen is fine. The current code is below. I've tried
the available varieties of paint and tried using the Robot class
(though this could be explored more). Any tips on where I'm messing up
or what could be changed to get this working would be appreciated.
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(
panel.getPreferredSize().width,
panel.getPreferredSize().height,
java.awt.image.BufferedImage.TYPE_INT_RGB);
java.awt.Graphics2D g = image.createGraphics();
g.setRenderingHint(java.awt.RenderingHints.KEY_FRACTIONALMETRICS,
java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,
java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
panel.paintAll(g);
g.dispose();
javax.imageio.ImageIO.write(image, "jpeg",
new java.io.File("./" + jtf.getText() + ".jpg"));
image.flush();
|
| Author |
Message |
Jean-Marc Vanel

|
Posted: 2005-2-1 0:35:00 |
Top |
java-programmer, Tomcat 5.5.X ready for production ?
Hi
I need your advices and experiences !
Is Tomcat 5.5.X ready for production ?
I will add some new features to an application running currently on
5.0.X . I consider taking this opportunity to switch to tomcat 5.5.X ,
and at the same time to JDK 5.0 .
--
Jean-Marc Vanel
Consulting & Services / software development
OSS, Web, Java, XML ...
http://jmvanel.free.fr/ ===) CV, software resources
Computer science diary : http://jmvanel.free.fr/computer-notes.html
Worldwide Botanical Knowledge Base : http://wwbota.free.fr/
Test XML query engine: http://jmvanel.free.fr/protea.html
|
| |
|
| |
 |
Noah Fiedel

|
Posted: 2005-2-1 3:23:00 |
Top |
java-programmer >> Tomcat 5.5.X ready for production ?
Hi Jean Marc,
I'm currently using Tomcat 5.0.28 and am about to use it in a large
scale production deployment. We have done serious load testing and it
is very stable. While I'm a big fan of the Apache-Tomcat group, they
are IMHO notorious for hyping the latest versions over stable versions.
Take the mod_jk and mod_jk2 connector. My management wanted the
latest/most current, so at first we decided on mod_jk2. After a bit of
effort, we realized that mod_jk2 was not really supported. A few months
later (around Nov, 2004) the Tomcat group officially took mod_jk2
offline and said mod_jk would be the Tomcat connector.
Back to your question. I would take 5.0.30. It is stable, and you
can see by the smallest versio number "30" that there have been 30
revisions. Each of these refine what is already a great project and
make it more stable. The 5.5.x branch is at 5.5.7, and I don't know
anyone who is using it in production.
Good luck, Noah
Jean-Marc Vanel wrote:
> Hi
>
> I need your advices and experiences !
> Is Tomcat 5.5.X ready for production ?
>
> I will add some new features to an application running currently on
> 5.0.X . I consider taking this opportunity to switch to tomcat 5.5.X
,
> and at the same time to JDK 5.0 .
>
> --
> Jean-Marc Vanel
> Consulting & Services / software development
> OSS, Web, Java, XML ...
> http://jmvanel.free.fr/ ===) CV, software resources
> Computer science diary : http://jmvanel.free.fr/computer-notes.html
>
> Worldwide Botanical Knowledge Base : http://wwbota.free.fr/
> Test XML query engine: http://jmvanel.free.fr/protea.html
|
| |
|
| |
 |
Steven

|
Posted: 2005-2-1 5:16:00 |
Top |
java-programmer >> Tomcat 5.5.X ready for production ?
I have installed 5.5.6 and had a few problems with it, so I went back to
5.5.4 and the problems where solved.
|
| |
|
| |
 |
Ryan Stewart

|
Posted: 2005-2-1 10:07:00 |
Top |
java-programmer >> Tomcat 5.5.X ready for production ?
"Jean-Marc Vanel" <email***@***.com> wrote in message
news:MYsLd.18969$email***@***.com...
> Hi
>
> I need your advices and experiences !
> Is Tomcat 5.5.X ready for production ?
>
> I will add some new features to an application running currently on 5.0.X . I
> consider taking this opportunity to switch to tomcat 5.5.X , and at the same
> time to JDK 5.0 .
>
This question would be much better asked on a Tomcat mailing list if you haven't
already.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- how to detect platform?What I really want to do is set the look and feel according to
platform, win-lnf for windows, gtk-lnf for linux. I don't have a mac to
try it on, but the same for mac would make sense.
When I use getSystemLookAndFeelClassName() I still get the butt ugly
metal on linux, so I'd like some way to detect which platform I'm on so
I can set the lnf accordingly..
Also, does the gtk lnf work on Windows? I've tried with sun-jdk15 and
sun-jre15, none of which seem to have it.
- 2
- After Jar creation, when I call from another project gives me java.lang.NoClassDefFoundErrorI'm using WebSphere.
I've create a java project, with one class, that has several methods.
Export it has a jar file. Then in another project add it in libraries has
an external jar file.
When I call methods from that class, it recognizes every method, and
compiles ok. When I try to run it it gives me
"java.lang.NoClassDefFoundError".
Can I create a jar file from a java project?
I'm doing something wrong, it's annoying me, because this jar file is
what's missing me to conclude this project.
Any ideas?
Thanxs
Antonio Fonseca
- 3
- How to integrate MsWord with Java Web Application and Linux ?Hi all,
We plan to develope Java web application and deployed in Linux web /
application server. But All the clients are using Windows. Here is our
requirement :
- From Java web application we will invoke MSWord on client side
- MSWord will access database on database server on Linux
(may be for mail merge etc)
I know for .Net application we can do that using VSTO.
But what if using Java and Linux (No windows / .Net server), what
approach can I do to get the functionality ?
Using VBA/Macro + Java Web Service , can we do that ? or any other way
?
Thank you very much for your help,
Krist
- 4
- How to use regex to split a sentence with different spaces?Hi,
I saw the following code to split a sentence into words. My question is:
How could I modify the code to split a sentence like(in his example,
the words are separated by EXACTLY ONE SPACE by chance):
"But I'm not dead yet! I feel happy!"
<Code>
// : c12:ReplacingStringTokenizer.java
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
import java.util.Arrays;
import java.util.StringTokenizer;
public class ReplacingStringTokenizer {
public static void main(String[] args) {
String input = "But I'm not dead yet! I feel happy!";
StringTokenizer stoke = new StringTokenizer(input);
while (stoke.hasMoreElements())
System.out.println(stoke.nextToken());
System.out.println(Arrays.asList(input.split(" ")));
}
} ///:~
</Code>
- 5
- Calculating download time based on bit rate.I have the bps rate that the document is downloading at, the size of
the the document, and how much has been downloaded but I cant seem to
calculate the ETA for it to finish (all I need for now it the time in
seconds.)
for a 9mb file it says 2 seconds left when that is clearly wrong
considering that it takes around 1 minute to finish.
private long getSecondsLeft(long bitRate, long received, long
size)
{
return (bitRate != 0 ? (size - received) / bitRate : -1);
}
- 6
- 64-bit JVM for Linux on Intel?Hi,
I'm looking for a 64-bit JVM for Linux on Intel, but it looks like Sun
doesn't offer one.
Am I just missing it, or are there really no 64-bit JVMs for Linux on
Intel?
Are there free alternatives?
Thanks.
- 7
- hashCode for byte[]"Roedy Green" <email***@***.com> wrote in message
news:email***@***.com...
> What algorithm is used for hashCode for byte[]. Where do you look to
> see it? Do you have to invent your own wrapper class to get a decent
> one?
From section 10.7 in the JLS:
The members of an array type are all of the following:
- The public final field length, which contains the number of components of
the array (length may be positive or zero)
- The public method clone, which overrides the method of the same name in
class Object and throws no checked exceptions
- All the members inherited from class Object; the only method of Object
that is not inherited is its clone method
That says that the it uses the equals and hashCode methods from Object,
which are actually native methods and thus VM dependent but are usually a
permutation of the address of the object itself.
What Sun really needs to do is to define an interface like Comparable for
use with HashMap and HashSet. This interface would implement the methods:
equals( Object a, Object b )
hashCode( Object a )
This would allow you to establish your own criteria for when objects are
equal.
- 8
- Problem reading from nio socketchannels into a bytebufferAt:
http://www.javanio.info/filearea/bookexamples/unpacked/com/ronsoft/books/nio/channels/SelectSockets.java
There is sample code. In that page there are the lines:
// send the data, don't assume it goes all at once
while (buffer.hasRemaining()) {
socketChannel.write (buffer);
}
// WARNING: the above loop is evil. Because
// it's writing back to the same non-blocking
// channel it read the data from, this code can
// potentially spin in a busy loop. In real life
// you'd do something more useful than this.
In some of my code I have written a line more or less exactly like:
while (buffer.hasRemaining()) {
socketChannel.write (buffer);
}
and the code does just spin. What is an example of "something more
useful than this"?
Jeff
- 9
- Cross-platform installer package?Does anyone know of a cross-platform installer package? Scanning
Google, it appears that the installer package landscape is all focused
on specific operating systems.
- 10
- Missing Stack Trace using log4jI am creating a custom log4j appender (extends AppenderSkeleton) to
record data into a previous developed logging system.
On occasion (18 times out of test order 120,000 executions) (not
reproducable, as of yet), I get the following message in my log file:
>> 160954.679:Notification Processor #4:INFO
com.datamodel.WorkOrder - CANNOT PROCESS PROPERLY
java.lang.NullPointerException
>> 160954.679:Notification Processor #4:INFO
....
the line prefixed with ">>" is the log header record.
My problem is that I do not know whether the NPE exception is generated
and reported in the appender or in the calling code; since there is no
stack trace printed.
Is there appender debugging tools or can someone offer a suggestion
here?
- 11
- Can I put the business logic in Servlets and bypass EJB?The more I read from I find that EJB are not favored by many. And
it's not something I want to do unless I have to anyway. Is it
somehow wrong to to put my business logic in my servlet or a javabean
and not use Enterprise JavaBeans at all? That still looks like good
separation to me. I think it's MVC, but not sure. Still learning.
Thanks.
- 12
- packaging problemsHello
I hae a web application and I just want to try to get
an applet working. The instructed way is to create
the applet in a separate project and package it into
the webapp. That works and it produces the
applets.jar in the document directory of the webapp.
(But why does the applets.jar not show up in the
project listing? but I digress, grin)
myApplet is in applets.myApplet and myApplet.html has
this core code below. It never works. No matter what
paths I give it. It always says applet notinitied.
Of course the applet works fine in its own project.
My ultimate goal is to get this to work with the
jsp:plugin. I am ass-umming that I can just splice
in, when I get it, working code from the html and add
all the other attributes. (Is there a way with the
jsp:plugin to make it accept any JRE above a certain
level that you know the client has?) Thank you for
any help in pieces or all. The woes of a newbie.
myApplet.html
<applet
code = "myApplet.class"
archive = "applets.jar"
name = "TestApplet"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
/>
--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200601/1
- 13
- OJB.proprties & websphereHi all,
Sorry if this is the wrong group for this question (happy to be guided
to the correct one).
I'm new to Java, new to websphere, new to OJB. So naturally I'm having
problems getting them all to work!
When I run my OJB test the PersistenceBrokerFactory throws an exception
saying that the default attribute is not set in the jdbc connection
descriptor. This is puzzling because I have set the 'default=yes' in
the repository.xml file (is it this file? - sorry I'm working from
memory because all this stuff is on another pc).
I guess from this that for some reason my OJB.properties file is not
being read. Where should this file be? I've read that it is loaded from
the classpath - I'm not entirely clear on what this means...!
Where do I put this file?
If it is not found would I expect a more serious exception or would OJB
quietly carry on until I tried to create a PersistenceBroker?
Is there some way to get more info on this exception?
Thanks in advance,
Jezzer
- 14
- sprite & image - j2memidp 2.0
Java SE 5.0
J2ME version 2.2
I'm trying to create an image based on javax.microedition.lcdui.Image
I wish to fill the image with graphic created by the code and not use a real
image... because I want the image to change during program execution.... I
want the image to display a circle filled with a color... I guess there is
no such thing as a circle image so I thought first create a layer with
Alpha=0% (transparent) and then a layer above it containing the
circle...... - giving the impression of a circle image, the corners of the
image object melt into the background
I want this image to be put into a sprite
I'm not sure how to create such an image...
Please if you have any tips about this then tell me, and links to examples
solving this problem is very welcome :-)
Jeff
- 15
- Bug tracking tools for Java appWe're looking for a simple bug-tracking app. Jira looks cool, but it's not
cheap. Bugzilla looks complicated.
Any suggestions?
|
|
|