Client-server question

hi there..
I'm writing a java client that connects to a server to recieve some messages and classify them to different kinds, and then append these msgs to a database application. I have 2 questions:
1. After connection is established to the server, how can my client program know that the server has been down for whatever reason? Note: im not the one who writes the server application, and that the server does not notify my client of its departure.
2. Im thinking of creating a number of connections to the DB application thats equal to the no. of msg types i have( i have 4 msg typs, so i create 4 DB connections), will this improve the program performance more than having one DB onnection that carries all msg types?
Thanks.. Mourad

1. In your client if a connection is lost you will get an excepntion and you can deal with that...
2. its a good idea to use a connection pool package to manage your connections. it will know when and how many open connections you will need. There are may packages out there. use an open source one

Similar Messages

  • Forms 6i client/server questions

    Hi, I have three questions:
    1) Is Patch 17 for Forms6i cumulative? (we have patched up to patch 13)
    2) After applying patch 17 do we need to recompile all of our forms?
    3) We are connecting from 6i client/server forms to a 10.1.4 database, is there a recommended Oracle client? (we are very behind and still running a very old version and I'm trying to get information to move forward)
    Thanks.

    Patch 17 is designed for the 10g database. There is no hint, that a 9i-db is better than a 10g. Use 10g.
    I always recompile all (!) libs, menues and forms after installing a new patch. It's better to do that once, than to search for failures, that result from patching.
    try it
    Gerd

  • Client Server question:Getting client responses in 2 locations, avoiding

    I have a client that holds all the connections. Then a GUI running inside the same VM can do specific on demand actions on some selected clients.
    I keep all the connections inside a Vector, then in the GUI when I want to send for example to a client a "ver" command the client should respond with his version.
    I implemented the behavior but my question is as follows: when I click the ver button on the GUI form, I get the Vector connection from the server class, then I get the associated BufferedReader and PrintWriter from that Vector<Connections>, where Connections is the class that holds socket, bufferedreader and printwriter, I send to selected clients the "ver" string and when a client responds with his version the string is first caught in the ThreadedServer while loop
    while ((temp = br.readLine()) != null)instead of the GUI form class or any other class that implements the behavior.
    The client should send twice the response. Why is that? And why is firstly caught in the server then in the loop that sended the "ver" command.
    Is there a way to avoid this? I mean can I get the response in the method that asked for that version first not in the threaded server that holds all the connections?

    1) What will happen ?Depends on what your code does.
    2) Will both clients get their own objects seperately ?Depends on what your code does. Remote objects can have an 'id'. If the ids are the same then the same object is produced If not then different objects.
    It is likely that your code is using different objects, but that is only a guess.
    3) How do they track the use of a method in the remote object ?How does "who" track it? And why would it matter?
    A client doesn't 'track' code in a remote object. Basically a RMI proxy sends a message to the RMI server. The RMI server gets the message and processes it. The act of processing causes the object method on the server to be called. When that method exits a message is sent back to the client. At that time the client returns from the method that it called. Notice that the client doesn't do anything with the server code all it does is wait for the message to come back. Does that answer your question?

  • Question, in a client server implemention

    Question, in a client server implemention using only basic sockets and datagrams, what happens if a method is being called at the server side while the same method is already being called/running for another client?
    Example:
    Client 1 calls Method 1 at Server Side. Method 1 runs.
    Client 2 calls Method 1 at Server Side. Method 1 is still running for Client 1. Does it create another Thread and runs for Client 2? Or do I have to implement a seperate Thread for each Client myself?

    Thanks!
    Don't want to start a new thread so might as well ask this here,
    Is there a way to pass or at least update the value of a variable from the outside into a Thread that is running? And this value needs to be seen and be the same for all Threads.
    I am thinking of creating new a class that to hold the value I want to update, and passing an object of the class in to the Threads before they runs. Since objects hold reference to the location of the actual object or something like that; people always get worked up over this if I phrase this incorrectly, but I think I got the point across, so that's okay. If I change the value of the object at runtime in the main method, like assign it with a new value according to user input. All the Threads will get the new value right?
    Something like that.
    public class valueToUpdate {
    String value;
    public valueToUpdate(String value) {
    this.value = value;
    public String getValue() {  
    return value;  
    public class Main {  
    public static void main(String[] args) {  
    String str = "abc";  
    valueToUpdate vTU = new valueToUpdate(str);  
    ThreadClass tc1 = new ThreadClass(vTU);  
    Thread thread1 = new Thread(tc1).start();  
    ThreadClass tc2 = new ThreadClass(vTU);  
    Thread thread2 = new Thread(tc2).start();   
    public class ThreadClass implements Runnable {  
    valueToUpdate vTU;  
    public ThreadClass(valueToUpdate vTU) {  
    this.valueToUpdate = valueToUpdate;  
    public void run() {  
    System.out.println(valueToUpdate.getValue());  
    }Okay, something like that. I know I need to add in a TimerTask for ThreadClass too for it to run for a certain period. But if I were to ask for user input at the main method while the TimerTask in running, and I change the value of vTU, will the output for both Threads be changed to the value of the user input?
    Or is there a better way to do it?

  • JMS architecture question for fat client/server.

    Hi. Is JMS suitable for fat client-server architecture where a certain number of fat client applications (like a few hundreds) open connections directly to the JMS provider? Is it going to have scalability problem when the number of connections grow?

    Depending on your JMS provider, this may be a very suitable architecture. The Sun MQ JMS Cluster was architected exactly for this problem. If the number of connections onto a single broker becomes too much of a burden for this broker, it can be put into an MQ cluster and share the number of connections. Of course, the number of connections a broker can handle will be totally dependent on the resources available to it. OS, CPU, memory, other applications running on the same machine, etc....
    TE

  • Client server applet question

    Hello I have a client and server program on computer a and computer b.
    I want a webpage with a java applet.
    I want that if I push a button in the client the java applet gets a message.
    I want that the server looks for changes in the applet and when there is a change the server does something.
    I have a program where the client and server communicate with eachother but how can I make a program like I want?
    How can I send a message to the applet(on a webpage) from the client and how can I look at the applet with my server??

    Aplet runs on client side (in other words on PC which is used to view page). On server side it is stored only as any other kind of file. To be able to create "client-server" solution you have to be able to run code also on server machine. I did not found any free hosting server which allows to run java. But in many cases they allow to use PHP which runs enteirly on server side. Check for this - it may be right solution for you.

  • Need Help for client - server - client question [Sockets]

    Hi
    I have read the http://java.sun.com/docs/books/tutorial/networking/sockets/index.html tutorial and made this Knock Knock Application.
    But now, I want that one client can view all the other clients which are connected to the server, and interract with a selected cleint over the server (client - server - client).
    But I have no idea how to build such a registration concept?
    A concrete hint (or link) how to realise this would be very helpful. I searched all the internet for examples, but I dont found a simple example.
    Thanks in advance
    greeds

    wSam,
    It appears that Sun considers RMI to be simpler, although less efficient than the alternative:
    http://java.sun.com/developer/technicalArticles/ALT/sockets/
    This article also talks about object serialization, which I am a fan of. Suppose that you want to send a data structure containing lots of information (like all connected users). You can actually pass an object (rather than text) across the network using ObjectOutputStream and receive it on the other end with ObjectInputStream. You might create your own Command class for passing objects between the client and server instead of using RMI. The Command class might hold flags that indicate which method should take place on the remote machine (i.e. send chess move command).

  • Client/Server application question

    Hey everyone,
    I am trying to exercise on a client/server application. My client application is similar to this one [http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/Code/SocketClient.java]. However this client works like this: it sends text through socket -> receive response from server. I am trying to find a way so that the client can receive and process messages from the server asynchronously. That is the server can send messages anytime (not just as a response to the client) and the client should always be able to receive messages from the served at any time, and not just after it sent something. I believe that multithreading would be the answer, listening to the output stream and sending through the input stream should be run in parallel, but I can't find a way to implement it. Your help is appreciated. Thank you.

    I knew that :-) but how exactly?
    How do I translate this code into two runnable classes which will communicate with the original class and its gui?
    //Send data over socket
              String text = textField.getText();
              out.println(text);
           textField.setText(new String(""));
    //Receive text from server
           try{
           String line = in.readLine();
              System.out.println("Text received :" + line);
           } catch (IOException e){
          System.out.println("Read failed");
                 System.exit(1);
      }

  • Client/Server to Web-Based application Conversion

    Hi! Everyone,
    I have couple of questions for you guys.
    Our Client had recently upgraded Forms 4.5 to 6i to move from Client/Server based application to Web based application.
    They are using Forms Server 6i Patch Set 1, OAS 4.0.8.1, Windows NT Service Pack 5 and Oracle 7.3. They are facing the following error every now and then, when they run the forms,
    "FRM-92100: Your connection to the server was interrupted. This may be the result of a network error or a failure on the server.You will need to re-establish your session."
    Please let me know what might be causing the above error. The only problem i can think about might be Oracle 7.3. If i am right only Oracle 8 and above supports Forms 6i.
    Can anyone let me know some tips and/or techniques to upgrade Forms 4.5 to 6i. If there are any important settings/steps which we might have over looked during the upgrade, please list them.
    Any kind of help is greatly appreciated.
    Thanks,
    Jeevan Kallem
    [email protected]

    Most of the code is use with no changes at all.
    See otn.oracle.com/formsupgrade
    Regards
    Grant Ronald

  • Looking for a client/server that supports multiple protocol and delivery

    Hi all, I don't know if this the right place to ask my question,here it goes.
    I am looking to develop a client-server that supports multiple protocols such as HTTP, HTTPS etc. I am looking for a framework( i don't know if that is correct or I need some kind of web-service (soap etc)) that would manage connection, security etc. I would like to like to devote most of my time in developing business objects with multiple delivery mechanism such as sending serilized java objects, xml message or soap message, or in some case JMS message as well. So I need a client server that can come in via TCP/IP or HTTP or anyother industry standard protocol and I should be able to service him with pub/sub model and also request/response model as well.
    I don't know if I had explained what I need, I would like to know what technologies I should be evaluating and which direction I should be heading... Also the server I'm developing should be free of Java constraints if needed...
    Also this service is not webbased service as now but if need arises I should have a flexibilty to make them web enabled in future. Also I would like to work with open source webservers or appservers if I need

    Inxsible wrote:I installed i3 - along with the i3status - which I still have to figure out. I am liking what I see as of now. It reminds me of wmii -- when I used it way back when. However I do not like the title bar. I would much rather prefer a 1 px border around the focused window.
    "i3 was created because wmii, our favorite window manager at the time, didn't provide some features we wanted (multi-monitor done right, for example), had some bugs, didn't progress since quite some time and wasn't easy to hack at all (source code comments/documentation completely lacking). Still, we think the wmii developers and contributors did a great job. Thank you for inspiring us to create i3. "
    To change the border of the current client, you can use bn to use the normal border (including window title), bp to use a 1-pixel border (no window title) and bb to make the client borderless. There is also bt  which will toggle the different border styles.
    Examples:
    bindsym Mod1+t bn
    bindsym Mod1+y bp
    bindsym Mod1+u bb
    or put in your config file
    new_window bb
    from: http://i3.zekjur.net/docs/userguide.html (you probably already found that by now )

  • Client-Server - SOA.... Is it really a transition or a big development  ?

    Hi,
    In all sources related to SOA/ESA by SAP, it is said that, transitioning from Client-Server Arch(CSA) to SOA is the same as transitioning from Mainframe systems to Client-Server Arch.
    If we think about Mainframe and CSA, it is obvious that there had been big differences in that transition. Such as, the INTELLIGENT CLIENT concept had appeared to replace the DUMMY CLIENTS, so this had changed the way of IT Business. There would be a main application providing several functionalities(server) and other applications which want to use those functionalities (clients) would connect to the server using some functionalities on its own (that means a client appliction should also have some functionalities in order to at least connect to the server, so that made them different from the DUMMY clients of the mainframe era)
    Now, when I look at the differences between SOA and CSA, I cannot see that incompareble differences.Why ? Let me explain :
    - One of the most important differences between SOA and CSA is, SOA is vendor and platform independent, so that any application can call any applications functionality as long as they are using Web Services. That is true. But the question arises here : It is still the case that someone is calling some others' functionalities (services), so there is still a client/server mentality, isn't there and We will still be using several client/server programming languages in order to realize the main functionality of the web services but this will be transparent to the user and the integration. The main difference is, SOA is vendor and platform independent. But I don't think this can be commented as a missing feature of CSA. Because the aim of CSA was to make the clients more intelligent and not to make them vendor/platform independent. And also architectures like CORBA and DCOM have also tried to achieve that independency (even though they have restrictions compared to Web Services, one of the main reasons for this is using Web as a transport/communication protocol) but they are still treated as some extensions on top of CSA because they are using CSA beneath. But if we compare Mainframes and CSA, even though I haven't seen manframe ages, I think it is clear that CSA does not use any architectural functionality of Mainframes. They are completely different.. But is SOA and CSA completely different ?
    I agree with all reasons why today business needs sth more agile, more flexible and it is becoming clearer day by day that SOA and Web Services provides this environment, BUT, I still cannot make it clear, WHY it is accepted as a transition from CSA and why it is not treated as a big development over CSA while using the main features of it.
    Any comments will be appreciated.
    Regards
    Ahmet Engin Tekin

    Good point..Actually those are the things clearly known but it becomes a bit confusing to build clear sentences when it comes to declare the differences. Anyway, here are my additions :
    - Mainframes were centralized systems which had their own hardware architecture as well. All processes/applications were running on 1 central DB/system and everyone in the company had to use the same functionality and interface.
    - In time, as a result of business demand, people needed different functionalities/applications regarding different business needs. This could either be done by extending the higly-costed big mainframe systems/softwares OR a new approach had to be developed in order to solve those problems. At this point, (thanks to IBM,Macintosh and Xerox) PC and ethernet concepts had emerged. That was a completely different hardware architecture which allowed less costly systems and also distributing the process load and/or applications to different systems in one landscape (app servers, intelligent clients - 2 tier, 3- tier arch.). Thus, while those were happening on harware side, new communication and programming models/languages emerged on software side. As a result, people started using different applications on different systems according to their needs and thus an efficient solution had been provided to the business need (described above).
    To criticise, this was really a big transition. Not only software concepts but also hardware concepts are also changed drastically. Actually, it is not wrong if we say, developments on the hardware side, allowed changes on the software side
    - What happened next ? Companies started using so many different applications by different vendors with different business logic and programming models (thanks to CSA). But in times, this has emerged the biggest problem of the CSA era : Integration.
    We all know the rest. "Web Services" concept emerged with SOA as well. So that, the boundaries between the systems began to disappear.
    So, is this a transition ? Well, yes it is.. The point that made it confusing (at least for me) is that this time there is no hardware transition (yet) but only a transition in software side. But I still insist that the IT transition during Mainframe->CSA was like a revolution (forget what you've left behind) but from CSA to SOA; it is more likely to be an evolution (the next best thing)
    Anyone have more comments ?
    Regards,
    Ahmet

  • Thumbnail images in Forms6 client/server

    Hello,
    Some help would be greatly appreciated on this matter. I would like to be able to display a thumbnail image of a picture on the web in an oracle, NON-WEB enabled form.
    For example, when I open a form dealing with product details, I would like a piece of magic to retrieve a thumbnail image of the product from somewhere on the web, and display it on the form. Please note, in my situation it is not viable to store a scaled down version of the image int he database. The image must be located somewhere on the web.
    Some research into this has pointed me to OLE, but I can't seem to find anythng relating OLE to images in forms.
    Any ideas?
    - A Developer Scorned.

    Denis,
    I followed the instructions in the link you gave (how to put animated icons in forms in which you instructed how to use an activeX control to display images in client/server forms.
    I would like to thank you as it works beutifully, however there is one more question - Is there a way to get to image to scale or 'fit' to the size of the activeX control on the form
    - A Developer Scorned.

  • Running reports created with Reports 9i in client-server configuration

    I need to have users run reports created with Oracle Reports 9i on workstations without any Oracle products installed on it, (in a client-server configuration as opposed to Web based) . I am looking for a step-by-step approach to accomplish this. I looked through the installation documents in OTN and I did not see one that addressed this.
    BTW, I saw an earlier post in this form which disscussed this,indirectly, for Reports 6i but I don't think these steps will work for 9i rpeorts
    ** Earlier post
    Question:
    I have an application in Oracle 8i, Forms 6i, Reports 6i. Now I want to make executable CD which will be installable in nature. I don't know how to make it or what tools to be used for this . Kindly help me out.
    Answer:
    You can write a .bat file for installation.....
    This file should do following things.
    1. Oracle8 Personal Setup
    Install only Database (no tools)
    2. Oracle Developer200 Setup
    Install only Forms Runtime
    Reports Runtime
    Graphics Runtime
    3. Use imp/exp to put the desired database...
    4. Copy exexutables in some directory and place shortcuts in programs and destkop
    5. Make new file-types in start->setting ->folder options-> file-types
    and specify that in which runtime-application you want to open your executables....
    Thanks in advance,
    Audrey Watson

    hi audrey,
    there is no client/server runtime available for reports9i. what
    you can do is to use the rwclient executable shipped with IDS
    to submit jobs to the reports server.
    there are plans to provide a stand alone thin client in the
    future but this is not available yet.
    regards,
    christian

  • Client/server vs. Application Server

    Our company has around 30 sites with each one having its own Oracle database server and file server (repository for executables of Forms6i/Reports6i). All the sites have the same applications running, i.e., the same set of programs are replicated to each site. At present we are running the applications in client/server mode (Forms6i/Reports6i runtime is installed on each client machine).
    We are also using some third party modules developed in VB/VC++.
    Now we are looking for the Centralized Solution, i.e., We want to have a Single Database Server available to all the sites all the sites are already linked with Network Leased lines).
    Now we want to know the impact of running centralized file server (located at Corporate Office site) accessible from all the sites (through same client/server mode).
    Will this solution work for us or we should move to 3-tier mode? Please suggest us the best feasible solution which can be implemented as early as possible.
    What I mean to ask in the question above is: if a good intranet connectivity is available among sites, what would be the better approach, client/server or n-tier?
    What actually would we gain by using application server in this context? Does the Data travelling is reduced from Database Server through to the Client Node in 3-tier AS approach? Does this 3-tier approach will reduce the Burden on Leased Lines? Does we gain more network resources available in 3-tier?
    What I think is that in client/server mode, the data is travelled from Database Server to Client Machine, but using Application Server, the Data from Database Server will travel upto Application Server and NOT to the Cleint machine (on browser etc.), hence reducing Network Load.
    Please clarify as your input makes a valuable role in our decision-making.

    Hello,
    I'll take a stab at this one...
    If you have enough network bandwidth, you should be fine funning in client/server mode. I have worked with clients with this same configuration. In addition to having a centralized DB, we have also centralized the forms on a network drive allowing users to access the same files and removing the need for users having to update their files locally. The biggest problem I see with this configuration, as long as you have enough band width, is that your configuration is not supported as 6i has been desupported.
    From my perspective you really don't have any choice but to upgrade your application so that you can be supported. The good news is that for the clients we have worked with upgrades have gone very smoothly. In fact recently we have started to partner with another vendor that has a tool specifically designed to upgrade Oracle Forms and it includes additional features above and beyond what you get from Oracle. This tool has drastically reduced the amount of time to complete upgrades (like going from a 2 year project to just a few weeks).
    I hate to answer this question because it is hard to answer without really getting into the details with you. The good news is once you do have a centralized DB and centralized application maintenance will be significantly easier.
    One last option you might consider that our company has done is to use Citrix. I've never used it for Oracle Forms, but for other client/server applications it has allowed out clients to web enabled their existing applications without changing them at all and also get a boost in performance. I wouldn't recommend this approach to you because what you have should be short term until you get your forms/reports upgraded.
    If you have any specific questions I can try and answer them for you. Good luck and let me know if I can be of any assistance.

  • How to minimize Client-Server Round-trip in ADF Faces application ?

    Hi All,
    We have just finished POC on our prototype of ADF Faces + ADF BC application. The POC Emphasizes on Bandwidth requirement.
    After receing the result from the communication provider, including : TCP packets send, Bytes sent from/to server and number of Client-Server Round-Trip.
    There are several part of the application that Must be tuned for the application to run on acceptable performance.
    Here is some page/ function that should be tuned :
    - First page, ADF Read Only Table with two images and some buttons, cause 5 round-trip
    - ADF Dialog Returning Value (as LOV), cause 4 Round-trips
    - On ADF Form, press Commit button, cause 3 Round-trips.
    So the question is :
    1) How to reduce round-trips on ADF Faces application ?
    2) How to minimize the bytes send from / To server on a specific user action ?
    Please give me some recommendation..
    Thank you very much,
    xtanto

    Hi Frank and Steve,
    Thank you for your reply.
    Yes Frank, what I mean by Round-Trip is the traffic between Client and the Server. And Yes, we will use VSAT where the latency is 1 - 1.5 second, so that round-trip matters significantly.
    What I will do is :
    - use minimal skin and No image at all
    - don't use Dialog for LOV because it requires AutoSubmit there.
    - Use 'Apply-Changes' button to do server-side validation before Commit.
    Then do the POC / testing again.
    Thank you,
    xtanto

Maybe you are looking for

  • Move SSL Cert from one device to another on Cisco ASA

    Hello Everyone, Is it possible to move SSL certificate + Key from one cisco asa to another ? I hope its possible and if someone can guide me towards correct documentation that would be perfect. thank you Manish

  • Cant download new itunes 11.1, says needs OSX 10.6.8

    tried plugging in my iphone4 as usual and now nothing comes up, says iPhone" cannot be used because it requires iTunes version 11.1 or later. Go to www.itunes.com to download the latest version of iTunes. Then i got to download the Itunes 11.1 then i

  • Just updated to OS 10.0.9.2372

    When I first brought my Z10, its OS was 10.0.9.348. I connected it with BB Link for an update and it said the updated version is 10.0.9.2372. Others are talking about OS 10.0.10.684 when updating. Any idea for diff? Btw, I am in Vietnam. Long

  • Is there a way to customise the {module_faqresults} order?

    Is there a way to customise the {module_faqresults} order? Also, can they all be on the same page, no matter how many? There doesn't seem to be an out-of-the-box answer to this.

  • [solved]makepkg -e ignoring the -e?

    Trying to build a package that includes curl/types.h which has been removed from the curl package, but every time I comment out the include and run makepkg -e it re-extracts from the source file and overwrites my changes anyway. I thought the entire