java

can oci driver for 11g (odbc5.jar) work with 10g client ?

Hi, I need to connect to Oracle9,10 and 11 in my java application.The client will always be present where the app will be run and I want the app to just work with username,password and instance (specified in tnsnames.ora).Hence I would like oci drivers with a connection string of type : jdbc:oracle:oci:@testora .Im using the driver: ora...

Do I need to synchronize on the result of an invokeAll call?

I am enhancing an existing algorithm that consists of multiple independent steps to use concurrent tasks. Each of the tasks will create multiple objects to hold its results. In the end, I would like to have a list of all the results to return from the controlling method. At the moment, my code looks something like that private final Exe...

Best Java RAD web framework

What is the best web framework in Java for RAD development? Preferably,actual Java web app and not just JVM. ...

Waiting on multiple threads to complete in Java

Across the course of my programs execution a number of threads are started, the amount varies depending on user defined settings but they are all running the same method with different variables. In some situations, a clean up is required mid execution, part of this is stopping all the threads, I don't want them stop immediately though,...

using a Map to create primary keys using Hibernate Annotations.

I'm not too used to ORM mapping, having come from a PHP background. I'm trying to achieve a link between a series of questions and their possible answers, along with the correct answer from that set. I'm trying to create a Question object that can be queried for it's corresponding Answers, but unfortunately, the best Java classes I've c...

Configuring servlet logging properly under Resin

Hello. I have trouble to configure standard JDK logging resin uses. I have read the documentation many times and looked for examples, but in the end I'm still puzzled. I run a servlet under resin 4.0.1 with simple logging requirements. All logging configuration should be possible in web.xml (and not global resin.xml) resin (com.cauch...

voice recording in Ogg format?

I have created a voice recorder applet. The output sound file will be .wav format. I want to use a compressed file format like .ogg. I have the .ogg decoder applet and it plays the audio file through streaming. But I need an .ogg encoder to record the voice in .ogg format. Any samples or studies are much appreciated! ...

Why does 'delete document' in lucene 2.4 not work?

Hi I want to delete a document in lucene 2.4 with java. My code is Directory directory = FSDirectory.getDirectory("c:/index"); IndexReader indexReader = IndexReader.open(directory); System.out.println("num="+indexReader.maxDoc()); indexReader.deleteDocuments(new Term("name","1")); System.out.println("num="+indexReader.maxDoc()...

OSGI - static method calls across bundles

I have a 3rd party JAR that I have converted to an OSGI bundle using bnd. The code I need to call to use it from my own bundle looks something like this: ThirdParty.setRegKey(myRegKey); ThirdParty thirdParty = new ThirdParty(); thirdParty.callMethod(); What seems to be causing me problems is the first line - the static method call. ...

Java class cached in ColdFusion

When developing my own Java class to use within ColdFusion 8 I stumble upon a problem that ColdFusion doesn't recognize that the *.java or *.class was changed, at least i don't see the change I made appear on the page. Is it some kind of caching issue? ...

Java OSGi Centralised Network Configuration

I'm looking to create an app based on the OSGi model. One of the elements of this will be network access (http and obr initially) I am looking for a way of centralising the network config (proxying, encryption, etc) perhaps to a single bundle that the rest of the app can call into. Has anybody done this/got ideas? Thanks ...

Hibernate callbacks

I want to tell hibernate to give me a callback notification when a new row is inserted into my database (this row is inserted by another system/application.) Im using mysql cluster and replicates the databases within the cluster. As soon as some of the databases is changed the other systems must be informed about this change. Is Hibern...

Running a java "background application" in application server

My experience with application servers is limited to some basic servlet coding, so I am not even sure how to frame this question appropriately. I need to write a java program that runs on the (java) application server and continuously executes a certain method (it will check for files in a certain directory). I have found a way to sc...

How do I migrate JBoss 4.0.5 JMS configuration to JBoss EAP 4.3?

I have a J2EE application running on JBoss 4.0.5 which makes use of custom JMS queues and topics. The configuration for these is in XML files in the deploy\jms directory. JBoss Enterprise Application Platform 4.3, however, does not have a jms directory in this location. What do I have to do to migrate my existing JMS configuration files...

weblogic context lookup error : java.rmi.UnmarshalException: error unmarshalling arguments

Hi, We are facing an issue in our production env. We have searched the net high and low and we were not able to come up with any answers. This error(stacktrace below) occurs when an ejb lookup is made from managed server 1 to manager server 2. Virtual ip is used for the lookup. It occurs intermittently and at random intervals. We are no...

dwr comet approach

from http://directwebremoting.org/dwr/reverse-ajax/index.html , it stated it supports polling, comet,piggyback. does that mean when we implement this approach, we can change to this 3 options in configuration without changing codes? what does dwr implement different from atmosphere api? dwr can be used on all j2ee containers also right?...

How to display the properties of the current selected component in a JPanel using the Netbeans Platform API

I am currently building a small visual designer using the Netbeans Platform. All my components that can be placed on the JPanel show correctly in the Palette Window. What I am struggling to do at the moment, is to let the property window show the properties of the component that was either just dragged and dropped or showing the current...

java.util.Properties and Cp1250

Can I use java.util.Properties with encoding different then default? ...

Difference between Javabean and EJB

Just a simple question from a relative Java newbie: what is the difference between a JavaBean and an EJB? ...

Hashmap and hashtable in multithreaded environment

I am really confused on how these 2 collections behave in multithreaded environment. Hash table is synchronized that means no 2 threads will be updating its value simultaneously right? ...