java

GWT and storing a session key

My app logs into an external service & needs to store the sessionKey (the sessionKey needs to be added to the HTTP header for future RPC calls). What alternatives do I have for storing the sessionKey ? I've read about a scenario where the sessionKey is saved into a DIV tag on the page. Thanks for enlightening me. ...

ant install prefix

This is my first time using ant and I can't for the life of me figure out how to tell where I want it to install files. similar to ./configure --prefix=< PLACE I WANT IT INSTALLED INTO > Running: ant package installs it into ./build/dist/ I've searched but can't figure out what to pass in that'll tell it where to install to. It's dr...

Metro UsernameToken Policy

I created a web services client prototype using api's available in weblogic 10.3. I've been told I need to use Metro 2.0 instead (it's already being used for other projects). The problem I have encounter is that the WSDL does not include any Security Policy information but a UsernameToken is required for each method call. In weblogic I w...

unnecessary to put super() in constructor?

isnt this one automatically put by the compiler if i don´t put it in a subclass's constructor? that means i dont even should care about it? in some articles they put it out. and if i got 1 constructor with arguments, will this be THE constructor, or does it takes a constructor without argument list? ...

use compass rather than hibernate second level cache

looking forward to hear opinion from you all. do you think just use compass and enabled caching in compass is enough and thus no need to use hibernate second level cache? i even heard compass support memcached. in that case no point to use hibernate second level cache do you all use compass and still enable hibernate 2nd level cache on...

Java runs out of memory, even though I give it plenty!

Hey, folks. So, I'm running a java server (specifically Winstone: http://winstone.sourceforge.net/ ) Like this: java -server -Xmx12288M -jar /usr/share/java/winstone-0.9.10.jar --useSavedSessions=false --webappsDir=/var/servlets --commonLibFolder=/usr/share/java This has worked fine in the past, but now it needs to load a bunch more s...

In Java: create unique random filename in a directory

How do I create a random unique filename in a directory (of my choice)? Note: I don’t want this file in the system temp path but rather in the directory I specify ...

lucene index file randomly crash and need to reindex

how you all deal wich such issue of occasionally need to reindex? what recommendation do you suggest to minimize this? ...

which language is better for packet capturing and processing

I want to write a program that has 2 threads , one thread continuously captures packets from the network and dumps them in a buffer every t seconds and the other thread continuously reads this buffer and processes it every t seconds.. Can this be done in C ? or will Java be a better option ? ...

How do you interate over a Collection<T> and modify its items without ConcurrentModificationException?

I need to do something like this... Collection<T> myCollection; ///assume it is initialized and filled for(Iterator<?> index = myCollection.iterator(); index.hasNext();) { Object item = index.next(); myCollection.remove(item); } Obviously this throws ConcurrentModificationException... So I have tried this but doesn't does s...

Checking-in JAR files (libraries) into Version Control tool - Is it a good practice?

I'm developing a web application in Java and I'm using several third party JAR files in my lib folder. I also have Subversion as my version control tool. My question is, while checking in my project files, should I check-in the JAR files also or is it not needed to version the JAR files as I'm not modifying them anyway? ...

using this to call a instance variable?

Should you use "this.variablename" or just "variablename" to reference a member variable in a method? ...

point of having an instance variable as final?

what is the point of having an instance variable as final? isn´t it better to have that variable set as a static final variable then? cause if it can't be changed by any of the objects, then it's the same as a class (static) variable, right? ...

OutOfMemory when list files in a directory

When I list files of a directory that has 300,000 files with Java, out of memory occurs. String[] fileNames = file.list(); What I want is a way that can list all files of a directory incrementally no matter how many files in that specific directory and won't have "out of memory" problem with the default 64M heap limit. I have Google...

show Jframe but not show title bar on task bar

In my application, I show a Jframe at the corner of screen for notification. And I want to show only Jframe and do not display a title bar at task bar. How can I do that? ...

oracle SUBSTR date duration

when i do query SUBSTR(e.updatetime - s.updatetime, 1,30) i will get result below +000000001 05:06:47.388000 can this save in java.util.Date? or which java class should i use other than String to ease me retrieve day,minutes,hours... p/s: e.updatetime is timestamp type ...

I am looking for something similar to the drupal CCK, but in Java (in a Java CMS)?

I have been using drupal, but I am constantly hitting its limitations. the drupal CCK (and associated modules) is a cool module in Drupal which allow you to specify new "content types" and add fields to them such as Images, text, check-boxes. Drupal then generates pages to add/edit and display these content types on the web. Obviously th...

How can I restrict number of Concurrent users on JBoss 4.0.4

Jboss 4.0.4 GA Apache 2.2 ...

Suggest a JMS provider ( for Java platform)

What is the most reliable open source JMS provider ? Any good/bad experience with gearman or Apache ActiveMQ ? ...

Is Java fully object-oriented?

Possible Duplicate: Is java 100% object oriented ? Is Java a fully object-oriented language? If not, why? And which programming languages are fully object-oriented? ...