|
Im facing one problem in streaming data capture for reading the broadcast during multithreading, pls help if u get time,
Actually there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class for data the thing is working with 1st thread which gets created but when i request with another client from another pc/ip the packets get losted to the 2nd client/thread
I have made a workaround by creating a list where im storing the Threads outputstream object
and looping it to send the data to all the client but this is just temporary as it ll delay the packets if clients/connections gets increased
pls suggest if required will share the code.
thanks in advance
|
|
|
|
|
praveen2609 wrote: there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class
So which is it: TCP or UDP? There is a difference and it affects how your program needs to operate.
modified 25-Jun-12 5:23am.
|
|
|
|
|
TCP is accepting connections from client requests , and create a thread which internally calls a class in run method of thread which create a udp connection and continously receives the data from the udp port and writes it to the tcp connection outputstream object
|
|
|
|
|
I'm still not sure what you are doing; perhaps if you show some of the code that is not working people will be able to offer suggestions.
|
|
|
|
|
It appears that you have the following system.
You have UDP port which recieves data.
You have TCP listener which accepts client connections.
Once you have a client connection you want to send some or all of the data from the UDP port to those clients (it doesn't matter whether it is some or all as that is a different problem.)
Solution to the above.
Part 1.
1. Create a thread safe pipe which allows for a single input and allows for multiple readers. This has NOTHING to do with UPD nor TCP.
2. Test it.
3. Test it again using threads.
Part 2
1. Creaet a UPD port
2. Set up the UPD port to write messages (data collected from port into something meaningful) to the pipe.
3. Test this. Note that this has NOTHING to do with TCP.
Part 3
1. Create a TCP listener
2. For each listener request hook up as a reader to the pipe.
3. Test this. Note that this has NOTHING to do with UDP.
Part 4
1. Put parts 2 and 3 together.
2. Test it.
|
|
|
|
|
hello,
I will look after a few days on the developement of an application jee a little big but I decided to devote one week prior to document more about IDEs and frameworks
then after my little research, I found netbeans for me the most because I like it more than eclipse and I will rely on the tutorial application full e-commerce to the doc netbeans to make my application,
but on the use of framework, I have not a clue what to do
is that because this is the first application I must not do all even if it is large
or I have to use because it facilitates the work
what do you advise me
and if I have to use them: to which you can direct me: JSF, Spring, Struct ......
and thank you
|
|
|
|
|
You can use Eclipse RCP as a framework for your application. It is working fine and also pretty well documented. The Framework provides a lot of features that one otherwise has to develop oneself.
You have to develop under Eclipse, but that is anyway the most common used IDE. With a little experience you'll begin to love it because it's so simple and structured.
Ralf Ebert has placed his book on Eclipse RCP3.x in the web : http://www.ralfebert.de/eclipse_rcp/EclipseRCP.pdf[^]
Lars Vogel is the other big source for tutorials and howto's on this :
http://www.vogella.com/eclipse.html[^]
|
|
|
|
|
Java EE spread in a wide range, like JSF, JSP, Spring, etc... So its all depend on what you really want to do. My advice is take the only tutorial and work on with that. With the time you can have a better understanding about the subject matter.
Don't stick with one IDE. Each and every has there own advantages and disadvantages. In almost all the IDEs you can easily attach the Java DOC and refer any time you want.
If you've never failed... You've never lived...
|
|
|
|
|
|
Using JDK 1.6 with the Cryptix encryption libs, I get this error: Error:java.lang.RuntimeException: NYI. I've updated the Security jars with many different version, but still get the same error. Suggestions please?
|
|
|
|
|
Allan Larson wrote: Error:java.lang.RuntimeException: NYI
Are you certain that is the complete message, it does not give much of a clue?
|
|
|
|
|
"NYI"? Does it mean: "Not Yet Implemented"? Then you have to wait for someone to implement it and get it released...
|
|
|
|
|
I am asking this question because I recently installed and then uninstalled eclipse IDE because it put me under lots of troubles for java whereas NetBeans is running quite smoothly with lots of support.There are lots of problems with JDBC driver with Eclipse (as far as I know) and no search engine even their own FAQ's don't provide the exact solution
Always believe in God and never let misfortunes make you give up
|
|
|
|
|
I use Netbeans and I like it. Others may disagree as it is a mater of preference as far as I'm concerned.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
I have always used Eclipse as I find it easier to work with than NetBeans, but as the great Vilmos says: "ez egy mater preferencia".
|
|
|
|
|
I'm using Eclipse too. Netbeans is too fancy, to much play around for me.
Eclipse is just right. Most developers I know are working with Eclipse.
|
|
|
|
|
Its just a matter of preference only.. netbeans n eclipse... depends on person to person...
|
|
|
|
|
Hi to all,
I am using Rich face components like datatable, extend datatable, combo box, button, text etc...
When ever this component is loading it is taking huge memory and later it is not release this memory (even I tried GC also) and reducing performance.
How to improve performance and free memory as soon as page close or after component used.
Thanks in advance.
|
|
|
|
|
- when is the memory assigned?
- why is so much memory assigned? any special "things" in there that can use memory?
Do you need to dispose the components after using them?
|
|
|
|
|
a) As soon as page loading memory is assigned but it is not releasing memory after user log out.
b) I am using rich component for that I am assigning value from Database (using BEAN).
Slowly server memory filling to max. any suggestion.
|
|
|
|
|
You need to find it - good luck.
memory leaks can be a pain in the *ss. Complicated to find and often caused by a little thing.
Debug your database related stuff. Check the amount objects that are floating around in that area. You might be able to see which objects are causing the problems.
|
|
|
|
|
I have a xml file scanned from a 2d barcode. The creator decided not to include the namespace info into the code so i have to add it after scanning the file. How can I do it in java?
|
|
|
|
|
|
|
Is this meant to signify something?
|
|
|
|