Hi All,I have a static method which has lots of local objects which are basically references to nodes of an static DOM object which had been created at the application startup time.. I want to know if multiple threads access that static method,will the local objects inside the method be thread ...
6222 byte By
lokiea at 2007-11-27 10:01:01
Hello everyone.For some reason when I send my first string through the socket, everything works fine. But after that Its cutting off the first 2 or 3 characters of the string and I have no idea why because I'm flushing the output buffer before and after I send the the string to the output ...
1006 byte By
jobina at 2007-11-27 10:01:48
HIi have a server port whch can support mulptiple connection. im running this as a Java HotSpotserver .im getting problm after some, im running this server on 5001 port ,it will accept many connection and running propel. the clients are applets.these are the problems i am getting1..From the new ...
1457 byte By
Roshitha at 2007-11-27 10:02:16
Hi ,I am facing a strange problem while using controls with Active Directory. I am using a SearchControl to set the total number of users to be returned matching the filter to 800 , and used the PagedResultControl to set the page size as 400 . Here is the the sample code i usedSearchControls ...
Hi,We developed a web-application using J2SE 5.0. It runs in IBM Websphere 6.1(with IBM JRE 5.0). We have an applet for rendering our reports. The applet communicates with the web-application to obtain serialized form of the data that needs to be rendered in the applet. The browser in the ...
511 byte By
xpantaa at 2007-11-27 10:03:28
Hi,I have created a thread A which in turn creates a thread B. Is it possible to press a button on thread B that stops execution of thread A (and consequently thread B, of course)?More specifically, thread A is a client thread that waits for server data. If it takes too long I would like to ...
Hello To All,I wrote the telnet (Port No :23) Program inorder to the access the Linux Host.After Giving Login and Password through Code.I am trying to fetch the data from there.I am doing it through the OutputReader and BufferedReader Class and I have written Try and Catch Block also.In My File ...
Please find the below code.public class FiledRef {public static void main(String[] args) {try{Class clas = null;clas = Class.forName("fieldRef.TwoString");System.out.println("VALUE IS -> "+incrementField("val02",clas));}catch(Exception ex){ex.printStackTrace();}}public static int ...
306 byte By
4tha at 2007-11-27 10:05:00
Adler_Steven always used this:// Create the initial directory contextLdapContext ctx = new InitialLdapContext(env,null);I use this:DirContext ctx = new InitialDirContext(env);both methods work for changing a password...Can someone explain that to me ...
Hi,I had been using files and Java IO API for a time but in my new implementation I want to write few Java objects in to a file and fetch them as "same objects" in to a datastructure (such as an array or map) when I start my application again. I was wondering if there is any mechanism that I ...
1895 byte By
4tha at 2007-11-27 10:06:12
That is my active directory of my TEST Windows 2000 server: http://img248.imageshack.us/img248/918/adwn6.gifOn the image yu will find 4 schools with shortcut names called:OU=ASROU=EDSOU=EKS (EK school for example)OU=THS (TH school for example)Under every OU="shortcut of schoolname" you will find ...
Hi All,I want to write a pgm using Threads given the problem scenario as:I'm pretty new to Threads!Write a NumberFactory class - AddNumber and DisplayNumber are the threads running in the class - AddNumber will add all ten numbers continuously - DisplayNumber will display numbers in reverse ...
I'm using the RowSetDynaClass as I need to close my resultset and return the connection to the connection pool quickly. Resultset rs = stmt.executeQuery("something");RowSetDynaClass rowset = new RowSetDynaClass(rs);I iterate through it by the following:Iterator iter = ...
I'm trying to create a script to test server availability. In the response I would like to return the IP of the server. The following works fine locally but when I run it online it just gives me the loopback address.InetAddress.getLocalHost().getHostAddress();Granted the server is a shared box ...
805 byte By
Fastfoxa at 2007-11-27 10:08:20
I'm unsure of what collection to use in my program. These are my desired characteristics:- synchronized (I guess all of them can be);- easy addition/removal the beginning and end- easy merging of two collection objects;- sorted;- fast scrolling at any place.The idea is to store data received ...
10147 byte By
marco_wua at 2007-11-27 10:09:48
Dear all, I am writing a simple program which is a simple IM. It will send string and receive string. That means it is a server and a client. I have 4 classes, one is client, one is server, one is GUI, the last one is just call all of them. I think I make something wrong in the Server and/or ...
356 byte By
leatropa at 2007-11-27 10:10:21
Does anyone know any fast way to implement hashtableWith SET access as table["key1"]["key2"]["key3"]=vAnd GET access (with "wild cards") like: v = table["key1"][null]["key2"];I can do through simple loop to handle wild card, but that table may have millions of values stored - it will take ...
2383 byte By
MBuetowa at 2007-11-27 10:10:38
Hello All,Was looking for some advice on this scenario:Most of the information that I have found regarding servers seem to revolve around using disconnected sessions (connections?). An example being a web server type of application ( or a web service for that matter ) where users would initially ...
In a situation that one program grab a read lock on a file and another program want to write to the file. How does the first program prevent the second program from modifying the file? According to Java API doc, a shared lock prevents other concurrently-running programs from acquiring an ...
Hi All,I am working on a project where i have to build a framework for calculating next working days based on predefined holidays, weekends etc.For example :Assume today is July 11 and is friday.I need to calculate the next working day assuming that saturday, sunday are holidays.so my ected result ...
10870 byte By
lokiea at 2007-11-27 10:11:25
Hello everyone.I've searched the forums and also google and it seems I can't find a way to figure out how many bytes are sent from a socket and then how many bytes are read in from a socket.My server program accepts a string (an event) and I parse that string up, gathering the relevant ...
We need to have traditional character support(chinese, japanese etc) for our applications. The traditional text is available in the oracle database and is displayed correctly in toad but when we access it thru browser/stand alone java app, it is not shown. The language pack is installed correcly on ...
<p>Hi guys,</p><p>I just want to know if i serialize an object, what and all will be serialized, i mean </p><p>apart from variables, whether methods will be serialized?</p><p>Thanks in advance.</p><p>Regards,</p><p>SRI.</p>
15880 byte By
4tha at 2007-11-27 10:13:21
Hello folks,first you will surely say is that my server is offline or something with the network is wrong but it is not ;-)thats the code:Please read my words after the pasted code at the bottom of the page!import java.awt.Color;import java.awt.Insets;import java.awt.event.ActionEvent;import ...
I am having a problem with sending two objects (over a socket). I have read in other posts that this could be due to trying to receive incompatible data types but my applications work fine if I send my objects synchronously rather than asynchronously.I will try my best to describe what my problem ...
Hi all,I have TCP code which works fine on Linux, but fails on Mac OS X (java 1.5.0_07-87). In particular, the setTrafficClass below (the hex number is IPTOS_THROUGHPUT) throws a IOException with the following error: upload: Invalid argument[java] java.net.SocketException: Invalid argument[java]at ...
1939 byte By
ardmorea at 2007-11-27 10:14:54
hi, I am reading binary data from a binary file. Now I have no idea of it.I have some question to ask.1) Are the strings ZeroStrings or FixedZeroStrings?2)How to position the position of each strings?My binary input is space delimited with fixed width data fields.All integers are 4 bytes, floats ...
Hi All,i am attempting to perform a JDBC commit and an update to a log file, ie. i am recording the updates in a log file so i can use for recovery, however from the point of the transaction is commited to the point at which it is updated into the file the system can be exited thus the database and ...
4815 byte By
kokorokoa at 2007-11-27 10:15:46
sory guys, i ve read hundreds of posts here and elsewhere but none solution worked for me.. sory for pasting all this stuff here but i guess without it nobody could help me.so again:i'm running tomcat 6.0-EXCEPTION:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ...
152 byte By
iGurua at 2007-11-27 10:15:52
<p>Can anyone give insight into Ajax. </p><p>Q: Also does Ajax use caching mechanism along with dynamic processing of the data using xmlHttprequest?</p>
322 byte By
4tha at 2007-11-27 10:16:22
Hello,of course i could remove the position 0-2 from the String "cn=Klaus" to get a substring like "Klaus" but i don`t wanna use an extra "for loop" if there maybe exists another possibility to get a clean output like "Klaus"someone knows an ldap method to get ONLY the pure value of the cn ...
I am getting very slow socket initialization. Here is sample code to clarify the issue. I suspect is has to do with reverse lookups or some such thing - is there a way to disable all of that? I tried using the security manager but that is a bad solution because it does not seem doable from within ...
7082 byte By
lokiea at 2007-11-27 10:17:02
Hello everyone. Currently my program will create a new thread everytime a person connects to my server. Once they connect they can send me events, and once they send me the events I parse the events and store them in a Map.Now if someone wants to recieve all those parsed events, but don't want to ...
Hello everyone ,I have to do a program that captures traffic from a client and sends it to a server and gets the traffic from the server and sends it back to the client... it's a intermediate Java program between a server and a client ( i need it in order to analyze a protocol ) .In more concrete ...
3336 byte By
xolotla at 2007-11-27 10:18:06
We are all familiar with the idiom of delegating the execution of a loosely typed method to a more precise one where the type is made explicit, e.g., public interface Foo<B extends Bar><?>> { }public interface Bar<F extends Foo><?>> { }public void test1(Foo<?> foo) { doTest1(foo); ...
557 byte By
sirynxa at 2007-11-27 10:18:15
I'm using JBoss connecting with RMI. I'm trying to connect from the outiside of my LAN but I cannot. I have configured NAT to use Jboss but the connection from the outside is impossible. I have passed this arguments to my JBoss-Djava.rmi.server.hostname = ...
4826 byte By
cjba at 2007-11-27 10:18:54
Hi all,I'm trying to write a very simple TCP/IP server, to provide XML data to a web browser. This should be dead easy, but I'm encountering something weird. I hope you can help me.I can successfully create a ServerSocket on a given port, and accept connections. The problem arises when I try to ...
5000 byte By
lokiea at 2007-11-27 10:18:57
Hello everyone I wasn't sure if this was thread safe or not. I'm going to have more than 1 client connecting to my server, and sending me events I'm storing these events in this Map. But I wasn't sure if it was thread safe or not. I was looking at the sun collections and i saw somthing ...
Hi,My Property file:base.dir=D:/Testsrc=${base.dir}/srcclasses=${base.dir}/classesI am using the following code to read it:Properties properties = new Properties();FileInputStream fis = new FileInputStream(propertiesFile);properties.load(fis);Enumeration keys = properties.propertyNames();while ...
Hello,I have an app running on jboss 304 server that make calls to a corba gateway with jacORB library.The follow exception occured when it tries to resolve the object name.org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0May I ask if anyone can tell ...
2485 byte By
lokiea at 2007-11-27 10:19:26
Hello everyone.I'm not sure what I should be trying to use here but I looked in the API and I think this is the closet thing to what I need.What i'm trying to do is the following:Everytime I send somthing from a client to a socket or vice versa I want to do the following:Open the socket to send ...
Hi,I wrote a socket client program that connects to a socket server. This is what I'm doing:-I'm opening a socket connection-I'm writing an initial request to the output stream of that socket-Then, while true, I create an input stream of that socket and get information off that streamIt all ...
Hi , i have a java policy file (Mypolicy.policy), now i want to load it at runtime.without using command prompt.means i dont want to use java -Djava.security.policy=Mypolicy.policy command can anybody have any idea.thanks in advansRegardsBrajesh ...
2029 byte By
sim085a at 2007-11-27 10:20:35
Hi,Basically I am new to building server applications and I was wondering whether there are any good books that can show good design patterns that can be used when building a server application.I am mostly interested in building a server for online reservation systems. I thought of this scenario ...
As Serializable interface is an MARKER interface and does not have any methods or field. Then how does a class implementing Serializable interface is automatically serialized(or the object is converted into bytestream). Is it that, JVM does know what to do with a serialized object. If this is the ...
Hi, I got the following exception message when i run the given JNDI example on Sun Java Application Server8.1.Please help me in resolving this issue;Exception:javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]import ...
368 byte By
CGambaa at 2007-11-27 10:21:45
Hi,I need to write a file on a NAS. I have the share path (suppose \\share\dir). How can I create a file on it? Do I need to know the physical path and use it to create a file? Can I obtain the physical path having the NAS path?I'm talking about Java 1.4.03 (and Websphere).Sorry for my english but ...
315 byte By
sri_sua at 2007-11-27 10:22:04
I want to retrieve a configuration file into my application. I can get that file in byte array format. I want that to be converted into java.util.Properties object so that I can retrieve the contents of it. Is it possible to convert that into some other object and then to Properties object? How can ...
<p>Hai guys,</p><p> I need to know about NIO package. Please give some useful url(S) for understanding basics.</p>
<p>Hello Everyone, </p><p>I am new to RMI technique. Can you please brief me about the uses of RMIs. Also, I am in a doubt that RMI is used only when using EJBs.</p><p>Thanks!!</p>