Hi all,I have been developing an application to do a stress test on our Instant Messenger server. This application must check if server can handle 1000, 10,000 or 100,000 connections concurrently.- Server is developed by using socket, it will create a new thread everytime it receives a incoming ...
332 byte By
acharia at 2007-11-27 7:37:37
Hello, i am trying to write a program in which i need to know the names and ip address of all computers connected in LAN. previously some one help me to do this. but unfortunately i lost my all my back up so please send me atleast any reference so that my requirement will be fullfilled.thanking ...
762 byte By
Iftia at 2007-11-27 7:37:57
I have a client server application.In the client part i send data to the server and the server receive data. After receiveing data server also send some data but the client can't capture data. Anyone please tell me what is the problem?I am giving the sample code here......I am thinking ...
738 byte By
lifesuna at 2007-11-27 7:38:13
I've received this Exception :Exception in thread "main" java.lang.NoSuchMethodError:stub class initialization failed at : CLASSE_Stub.<clinit> <Unknown Source>I start the registry with : rmiregistryI compile all the -java : javac *.javaI create the stub with : rmic CLASSEbut when ...
765 byte By
Jensona at 2007-11-27 7:38:17
Hi Guys,Sorry if my post irritates you or seems annoying. But I'm just a beginner learning Java Generics and I really have difficulties understanding Generic Methods and Interfaces (not Generic Class though). I read the Anglika's FAQ on Java Generics, however, it's stated that it's not ...
Hi,I want to check all incoming network request to my system, and finding information about the clients who are trying to access my system (i.e. their IP Address etc.).Like whenever a user access my system my application should be able to track that request.But I am not able to find out how to ...
Example: highly multi-threaded application, but almost all threads use a common resource - read only in most cases.In some rare cases (few in number and occurrence), however, the resource can be modified by a single thread. So the resource has to be synchronized, with the result that only one ...
hi i have an application which returns an Ip addess .The problem is it giving the valid IP address in windows but in linux i am getting invalid IP address please help me outthanls
What do you think about using this code to add a control to Unblock BLOCKED threads each 15 mins for example?Vector runningThreads = RunningThreads.runningThreads;logger.info("runningThreads"+runningThreads);for(int j=0;j<runningThreads.size();j++){SearchUSPTOThread t = ...
1075 byte By
avsia at 2007-11-27 7:40:46
I have an application which listens on a port and when it receives something runs a process (using the same port) in a new thread. The application runs as a windows service so I'm using a socket timeout to force the loop to keep evaluating rather than just blocking to allow the service to be ...
206 byte By
vdga at 2007-11-27 7:40:58
hi !!I am working on a group chat and having a problem with multicasting the message to all the sockets ...how to create a stream for each of the sockets?plz help me i have very little time ..
Hi, Im kinda new to RMI, i was asked in an interview recently What are things i need to keep in mind while designing an RMI application, as in what needs to be taken care off while putting a server object in the RMI registry?Can any1 help me with this.Thanks
Hi all!at present im using a code given below, its working fine! currently we are using mixed mode active directory! we are going to migrate that to Native mode!import java.util.Properties;import javax.naming.*;import javax.naming.directory.*;import javax.servlet.http.*;import java.io.*;import ...
687 byte By
c.anejaa at 2007-11-27 7:41:35
Hi i am getting this error while making Session bean.I think its not getting a proper object in lookup.java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)Code is like this:InitialContext ctx = new InitialContext();Object ...
Hello i have a function that return a byte array. I did it this way but i m wondering if it is the good way, so if someone can help improve it. Thank you. try{InputStream is = new BufferedInputStream(new FileInputStream(nomFichierDemande));byte[] readData = null;while (is.available() > ...
3300 byte By
lmimmfna at 2007-11-27 7:42:28
Hi,im using JDK1.4( i know old ), but when scheduling a task with a Timer( isDaemon=true ) its throwing a RuntimeException, im using these to kick off timers for timeouts for sessions, i.e. in the below case idle timeout and each session has its own instance of MyTimeoutTimer( ive dumbed down ...
650 byte By
ACVa at 2007-11-27 7:42:31
Hello,Can anyone tell me why when I try to register the RMI Server the following runtime exception occurs:========================java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:java.rmi.UnmarshalException: error unmarshalling arguments; nested exception ...
I am using an ssl socket connection with a long lifespan. I'm using it to receive event information from a server. My problem occurs when the client os's underlying network connection drops out and comes back. When it re-appears the application re-establishes the event socket connection, by ...
251 byte By
jpgthora at 2007-11-27 7:43:31
Does the Java Core API contain a class/object for simple command line argument / options parsing? If an class exists in the core API, can anyone point in the right direction? If not, can anyone suggest a simple and useful 3rd party API? Thanks!
Hi,from my thread i call an external perl program like this:String [] cmdStr = {"perl", Constants.workingPath+ File.separatorChar +"scripts"+File.separatorChar+"get_document.pl", urlPath, database, busquedaFile, Constants.patentesPath};int exitCode =-1;Process ...
959 byte By
manfy74a at 2007-11-27 7:43:44
Hello, I have an application which sends and receives multicast messages. It works fine, but now I have to change it to support more network interfaces. From one interface I will get response, from others not, but I don't know in general which one is the right one.I tried it with creating a ...
749 byte By
S.Aa at 2007-11-27 7:45:03
hi, every oneI am writing objects to a file using ObjectOutputStream but I need to close it from time to time and then open it again and append objects to it.I have been using the following to open the existing fileoutput = new ObjectOutputStream(new FileOutputStream(fpath,true));then when I'm ...
Hi,I want to create a small chat messenger within my small organization of 10 ppl. I know it can be done via networking but how to proceed on this i dont know.Please throw me some ideas on that 1. What is the logic behind chat messaging. How Java networking helps in that case?2. How to start ...
Hi,I just felt on a problem with captured wildcards for which I understand what's wrong still can't see how to fix it. So I'm here asking for help. Here's the test case:import java.util.ArrayList;import java.util.List;import org.junit.Test;import static ...
3304 byte By
Sutha at 2007-11-27 7:45:21
I'm getting an ExportException coming from one class (SGJmsWriter) but not from the other classes I have that are basically the same thing. I've looked all around for a resolution to this problem, and I solved one problem where I hadn't called connection.start(), but I still have this one. ...
Is there any sample program for me to try out on LDAP?
716 byte By
ibanna at 2007-11-27 7:48:55
Recently i noticed that Collections.synchronizedList(List) implementation was based on a "simple" synchronize block wrapping delegated calls to original List.This suprised me as i was expecting something better than Vector implementation. (which is also based on synchronized blocks).In my ...
493 byte By
balteoa at 2007-11-27 7:49:51
Hello,I would like to avoid the hard-coded annotation variable such as below:@Table(name = "CALYONQA.TheTable")public class etc...Environment:-J2ee 1.4 (web tier only, tomcat 5.5)-J2se 5.0I have a context param which is located in the web.xml and that I would like to use instead of the ...
696 byte By
Yeva at 2007-11-27 7:50:30
Hello,my program does ldap serch. Without LDAPS everything works great, but as soon as i am trying to use LDAPS IBM virtual machine keeps saying that certificate is not trusted (meaning that it can't fidn trust store) and Sun comlaines about invalid signamure. I can do my custom factory, but i ...
1795 byte By
MePacoa at 2007-11-27 7:50:57
I have a class with some static member data that is used throughout the code. Nothing modifies it so I haven't had to worry about synchronization. However, now I want to be able to change it at run-time and I'm not sure what all needs to be done. Here is an example of the type of thing I'm ...
209 byte By
meetaa at 2007-11-27 7:51:00
Hi,How do i use autoproxy with HttpURLConnection?I tried using the system Properties http.proxyHost and http.proxyPort, but it did not work, i still got a connection timeoutPls help
HI everyone,My question is how to bind a thread to a CPU explicitly in Java on Linux operating system. If anyone get the answer, please let me know. I appreciate it.yang
Suppose we want to send requests and receive documents over HTTP frequently. Is establishing direct connections and manually sending HTTP request by using Sockets faster than simply using a HttpUrlConnection instance?What if we want to establish persistent connections (HTTP Keep-Alive) ...
264 byte By
Keviva at 2007-11-27 7:51:59
Hi,After i read-in a file using FileInputStream, 1. I need to detect if its in UNICODE format. How to do that?2. If it is, i need to convert it into ANSI so that i can parse it later on.Any hints/solutions?Thanks,-V
I have been working on a project with another company. The project involves me writing a client to communicate with their server via CORBA. I'm using JacORB and they're using the Sun ORB. We've had some interoperability issues and their solution is that we both use JacORB with IDL compiled ...
Hi everyone,I have just started going through reflection's API andI am positively surprised that I can retrieve all the informationregarding generics despite erasure ! That makes me feeleven more dizzy ..... a) Why can't I .......b) Because of erasure ....a) Why do we need erasure ?b) For ...
In my application i would create a multithread server.When i launch the server, it listens on a port (with accept method) and i must manage it from consolle.While it manages the connection in by client, i must can controll the server from the consolle, such as see how many connections are ...
I'm having compilation wornings after I switched to Java 6 in the following code:Class cls = ...Constructor constr = cls.getConstructor(Long.class, Date.class);warning: [unchecked] unchecked call to getConstructor(java.lang.Class<?>...) as a member of the raw type java.lang.ClassWhatever ...
hi at all,it's my first post, so i'll make a short introduction:I'm a 23 year old german studying Information Systems.We are running a training on developing software (a small auction system like ebay ;-))Now to the problems i've been running into concering serialization:We've for every ...
2035 byte By
ushaca at 2007-11-27 7:54:52
Hi all!Maybe this has been discussed before, but if so my searching skills must suck. A pointer to where would be much appreciated. Anyway, to my problem...Knowing that you can't directly create an instance of a type parameter, like new T(), i create an interface like this:public interface ...
433 byte By
DMJasona at 2007-11-27 7:55:14
I have been studying for the SCJP exam and began wondering if PrintWriter is buffered. From what I can tell in the javadocs it seems to imply that it is; however, I keep seeing developer code that wraps a BufferedWriter.Not that it matters for the exam (it can be done and that's all I need to ...
626 byte By
jlrockya at 2007-11-27 7:55:40
I want to parallelize a block of code, say that contains three statements: Statement 1, Statement 2, and Statement 3.I have created two threads but only one of them should execute statement 2. I mean Thread 1 should execute Statement 1 and Statement 3 while thread 2 should execute Statement 1, ...
2602 byte By
Dytea at 2007-11-27 7:55:46
Hi there,I created an application that writes a List<Object> to a file.It's been working fine like this, but then for some reason, this file became corrupt. I figured out why, but I haven't been able to recover the data in this corrupt file.Most important part (on position 1) of this ...
8294 byte By
TimmyXa at 2007-11-27 7:55:57
Hi,I Know there are many topics about this but mostly the answer were use http-something.I am trying to do this with sockets only, but my code shows up very strange behavior.It looks like the file transfer just works fine, but the client who receives the file is stuck at the end of the file ...
1239 byte By
Nialsha at 2007-11-27 7:57:59
Hi,It seems like Java's ListIterator isn't especially great for doing a "compare every element to every other element" traversion (like the type used in selection sort).For example, this code works fine:for(ListIterator<T> i = list.listIterator(); i.hasNext();) {T a = ...
Hi,I have a piece of code that acts as a load balancer. Under high load scenario - 200+ different simulataneous users, it throws some errors.Following is a snippet from that code - URL url = new URL(site);URLConnection urlconnection = ...
Hi everyone...Is anyone aware, how to interact with UPS (Uninterrupted Power Systems) in Java? I think it is as similar as to interact with remote computer in the network? If anyone knows please reply to the post.Thank You !
Hiim wondering how i can determine if ive already processed/read the contents of a cd before.... im assuming that each cd will have some sort of unique serial or identification number.... if it has, what classes/mentod do i have that i can extract this info....thanks for any help you can ...
hello everyone,I want to creat an array of servers to connect to (configurable hots:port) and send a command to be invoked like "something\n"then close the tcp connection? whereis a good place to start reading about this or maybe a snip of code or two like the array part at least, I would be ...
Hello forum, I having trouble with passing objects from client to server and back again.a) I have created a client server relationship where by the client creates an instance of an object (player.class), fills it with some data (setPlayersName(String);) then passes it to the server. The Player ...