Swing and TopLink

Hi,
We are moving our applications from a client/server system built on Oracle Forms 6i to a multitier J2EE design. We are testing TopLink as one of the approaches. We are thinking building a rich client (Swing-absolutely neccessary) connecting to Oracle AS through a remote session over a very slow network (Modem-56Kbps) using RMI. Is this a good approach or should we consider something else?
Where do we find documentation and tutorials regarding this technology and this architecture?
Best Regards,
Eric

Eric,
Although RMI may be the way to handle this remote client if you require a shared server I would not typically recommend TopLink's remote session. It is a somewhat busy communication link as you lazily load objects. I would prefer to build EJB session beans that expose well defines services that my Swing client can access over RMI. This will allow me as the developer to carefully control what is sent to and from the server in each request. This will be an important concern as you deal with the speed of the link.
This session bean facade architecture will also lend itself nicely to scaling to multiple servers and easily using these same services in other composite services or in other clients such as a web interface.
Doug

Similar Messages

  • Java Swing and Socket Programming

    I am making a Messenger like yahoo Messenger using Swing and Socket Programming ,Multithreading .
    Is this techology feasible or i should try something else.
    I want to display my messenger icon on task bar as it comes when i install and run Yahoo Messenger.
    Which class i should use.

    I don't really have an answer to what you are asking. But I am developing the same kind of application. I am using RMI for client-server and server-server (i have distributed servers) communication and TCP/IP for client-client. So may be we might be able to help each other out. My email id is [email protected]
    Are you opening a new socket for every conversation? I was wondering how to multithread a socket to reuse it for different connections, if it is possible at all.
    --Poonam.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Why ADF Business Components and TopLink

    Hi All,
    Why are there two types of components in Businses Tier? (ADF Business Components and TopLink). Even through there are other types, I can visualize the use of other components but ADF Business Components & TopLink seems to serve the same requirement.
    Can some one provide me information on what is the difference between these two and when to use which one?

    ADF Business Components (aka BC4J) are different from Toplink from approach point of view. Basically if you are more comfortable with SQL and want fine grain control over what and how SQL are run against the database, BC4J is the way to go, because, it's you who write the queries(in ViewObjects)
    If you are from more of java backgroup and can visualize things in term of Object and relationships among objects, so on and so forth then Toplink would be the right choice.
    Pls see the post by Shay in his blog:
    http://blogs.oracle.com/shay/2006/03/10
    regards - rutwik

  • Connect swing and J2EE

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing swing and j2ee
    Somebody knows something...
    I need your help....

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing
    swing and j2ee
    hopefully, no business logic is in struts; only the application logic (i.e. order of screens, input type validation, etc.). If this is the case you have many options:
    - direct calls to the ejb (assuming you have a service defined as an EJB)
    - SOAP, SOAP-RPC, or a full web-service (as mentioned above)
    - your own custom protocol over HTTP
    - RMI (probably too much work; easier to just make direct EJB calls)
    - JMS (probably more work than just using SOAP or HTTP)
    - Socket based communication with your own custom protocol
    Probably the fastest to get going is direct calls from swing to the EJB.
    You'll have to re-implement your application logic; but this is fine as the swing app will probably have a different flow than the web-app.
    Best of luck,
    Andrew

  • Urgently!! Deploy project using Struts and Toplink

    Hello. I want to make a deploy of a project in wich I'm using Struts and Toplink technologies.
    I'm using JDeveloper 10g for Windows and my production server is a SUN V880 with Soloaris 8 and I make it ok, but when I run it since a PC in the intranet the following errors appears (obviously those don't appear before):
    java.lang.NullPointerException     at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)     at jsp.login._jspService(_login.java:50)     [SRC:/jsp/login.jsp:5]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:567)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:536)
    Thank you so much for help.

    NOO!! :( I don't install any libraries in the server, but in the WAR file of the application, in the lib folder, there was the jars corresponding. I thought that those libraries, in the WAR file, was "local" to the project, anyway, the Struts and Toplink libraries must be global at server level, 'cause I will use it sure once agian, and now I'm trying to install those in the server...
    Thank you so much!!

  • WL6.1 and Toplink 3.6.1

    I am having problems with connections not closing, we have a connection pool
    setup to our Sybase ASE 12.0 database using the jconnect driver.
    The connection pool maxes out at 50 connections but after those 50
    connections are gone, requests fail...
    Any Ideas?

    Hello,
    I am having same problem with weblogic6.1sp3 and toplink 903.
    I have one connection pool 'OraclePool'.
    I have two data sources added and refereing to that pool.
    My toplink.xml looks like this.
    <login>
    <datasource>oracleDataSource</datasource>
    <non-jts-datasource>oracleNonJTSDataSource</non-jts-datasource>
    </login>
    I have max capacity of 60 to that pool.
    When i run sql queries simultaneously server works ok, it uses all connections efficiently.
    But when i use update method using toplink, connections max out.
    And it says 'No connections available in the pool'.
    How can we find out if toplink closes connections efficiently
    after each transaction. Please let me know
    what is wrong with my setup.
    Thanks
    George

  • Swings and Threads

    My applet communicates with the database. To ensure that the GUI is updated in the Event-Dispatching Thread I am using a SwingWorker: in construct() the application communicates with DB, and in finished() it updates the GUI. In construct() of the SwingWorker thread I need to create a dialog box to prompt the user for an input like to chose a color or to answer yes/no.
    My question is: Do I need to use invokeAndWait() to create the dialog box? The more general question is: do we use invokeLater() or SwingWorker only for GUIs that are shared by several threads or we have to use it for every swing we create after Event-Dispatching Thread started running?
    Thank you

    One of the fun things about Swing and its EventDispatchThread is that
    doing things wrong (such as performing Swing operations from a thread
    other than the EDT) is that more often than not, even though they are done
    technically wrong, they will still appear to work, especially in small programs.
    (In a larger sense, this applies to any multi-threaded program: things might
    appear to work until the timing changes just a teensy bit...)
    What's even more fun is working with someone who has previously only
    done small programs and because of that, takes this approach in large programs, and then spending a large amount of time trying to figure out why
    something sporadically stops working, only to trace it back to a Swing
    operation being invoked from a thread other than the EDT. Fun!
    You know how to do it correctly.
    You know why to do it correctly.
    But you choose not to. Good luck with that.

  • Can be toplink-essentials.jar and toplink-essentials-agent.jar shared ?

    I have 2 apps, A and B, toplink-essentials.jar and toplink-essentials-agent.jar are not in their war /lib directory. It is in /common/lib (Tomcat 5.5) or /toplink/jlib (OC4J 10.1.3.2.0).
    First I deploy and run A - it works, then I deploy and run B - it fails with exception: No Persistence provider for EntityManager named ...
    When I do it in opposite sequence, B works ok, A fails.
    When I add toplink-essentials.jar and toplink-essentials-agent.jar into war /lib, both works OK, but only on Tomcat. On OC4J not. Itried to add orion-web.xml
    <orion-web-app>
    <web-app-class-loader search-local-classes-first="true"/>
    </orion-web-app>
    but without success. Second application still failed.
    Can be toplink jars shared between applications ?
    Tested with build 41
    Lumir

    Note: The agent JAR is only needed when starting a
    client outside the container.Yes, I kow it - but I am confused, that OC4J /toplink/jlib contain agent, and tutorial at
    http://www.oracle.com/technology/products/ias/toplink/jpa/examples/jsf-jpa-example.html#CHDDIFII
    also say: Add toplink-essentials.jar and toplink-essentials-agent.jar to <EXAMPLE_HOME>\lib.
    Is there any more information in the stack trace that
    might help figure out why the second persistence unit
    cannot be initialized?javax.persistence.PersistenceException: No Persistence provider for EntityManager named xxx
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
    Are you setting up any TopLink session configuration
    properties in your persistence unit (i.e.
    toplink.session-name)?No. I have only session customizer, that does following in customize()
    JNDIConnector connector = (JNDIConnector) session.getLogin().getConnector();
    connector.setLookupType(JNDIConnector.STRING_LOOKUP);          
    session.getLogin().setTableQualifier(schema);
    Bye,
    Lumir

  • Using swing and swt together

    i would like to use some of the components of swt such labels or buttons in swing as swt has better look and feel. but in all the examples i found they are using a whole set of swt api to create frames and showing them up.
    Isnt there any way to add button or label of SWT in Swing. i found a method SWT_AWT.newFrame(). But it is returning a awt frame not a Swing JFrame that at the frame level. i need them at individual component level(buttons and labels).
    hope u understood my problem.. any other suggestions??

    Swing and SWT are two different framework. Usually, peoiple choose one and stick with it. I would not mess with mixing SWT with Swing or vice-versa. I really don't understand why you would choose to mix these two framework together. "better look and feel" is not the best answer for this. what i would look into is a look and feel for Java (like JGoodies look n feel)..and check for Swing component that pther people have made (or enhance upon the Swing library).
    Stick with one framework. Your life will be much easier.
    Futhermore, maintainance would be less difficult. (you only have to know one framework instead of two, plus how they interact)

  • Need  java code to perform refresh button action using swings and awt

    i need java code to perform refresh button action using swings and awt.please help me

    Wait ! Noboby ? OK, I'll do it
    public void onBtnAction ()
        if (!fresh)
            refresh ();
    }Seriously, did you expect anyone to answer such a cryptic question ?

  • Comparision bw BC and TopLink business service

    Hi Experts,
    I am new to JDev. It appears to me that developing applications with BC in the back end is easier.
    Is there any disadvantage of using AppModule as Data Control as compared to Toplink. ?
    Can we use multiple types of Business Services in the same applications. eg AppMod and TopLink just in case.?

    You are correct in your observation that ADF BC is easier to develop with since it offers more out-of-the-box declarative features.
    There are also some things that TopLink does better though.
    For example you can more easily map an OO designed set of object to an existing database (meet in the middle scenario).
    Another thing is that with TopLink you are using java classes that don't need to extend any interface (POJO).
    While ADF BC wizards are only available in JDev, TopLink has it's own stand alone tool - which means it is a bit easier to use if you are not using JDeveloper as your tool.
    At the end of the day the big difference though is the "way of thinking" - see this blog entry:
    http://blogs.oracle.com/shay/2006/03/10
    And the great thing is that you can have both used in the same project :-)

  • JDeveloper and Toplink

    I am having problem using jdev and toplink. The toplink xml file ([projectname].xml) in the src/meta-inf directory is no longer being updated from the changes made in the class descriptors and toplink mapping file (mwp).
    How do i fix this ? If not all the changes I made in Jdev are not translated into the toplink xml and when deployment I am encountering errors.
    j.

    You should probably ask this on the TopLink forum - but basically you need to either be working on TopLink from inside JDeveloper or from the mapping workbench - you can't work on a project from both at the same time.

  • What are the difference between TopLink and TopLink Essentials...?

    What are the difference between TopLink, TopLink Essentials, EclipseLink and TopLink Essentials-GlassFish?
    What is the difference of their functions?
    Edited by: qkc on Nov 21, 2009 10:52 AM

    Difference between TopLink and ToPLink Essentials:
    TopLink Essentials are the reference implementation (RI) of JPA, is an open source effort that is licensed under the Common Development and Distribution License (CDDL) v1.0. It can be freely downloaded and used under the terms of this license agreement. This means, you can only use it for the management of persistence and orm with Java EE and Java SE. The binary distribution of TopLink consist of 2 jars:
    * toplink-essentials-agent.jar: contains Java Persistence API; XML Schemas and TopLink essentials implementation
    * toplink-essentials.jar: contains java agent class requires in a standolane Java SE application
    In addition to TopLink Essentials that makes the JPA implementation alive, Oracle offers its Oracle TopLink product (10.1.3) that contains an earlier preview binary of JPA and also offers developers additional object-relational capabilities, object-XML mapping (JAXB), non-relational mapping using Java 2.0 Connector Architecture (JCA).
    Let's wait other person to answer these questions.

  • What are the relation between JPA and Hibernate, JPA and TopLink?

    What are the relation between JPA and Hibernate, JPA and TopLink?
    Can JPA instead of Hibernate and TopLink?

    The Java Persistence API (JPA) is the object relational mapping persistence
    standard for Java. Hibernate and TopLink provide an Open source Object-relational mapping framework for Java.
    They provide an implementation for the Java Persistence API. In my opinion, both Hibernate and TopLink provide support to JPA
    and they can also be regarded as the complementary to JPA.
    Let's wait to see other person's opinions.

  • Database Change Notification and TopLink Cache Invalidation

    Has someone succeeed in implementing the How-to Database Change Notification and TopLink Cache Invalidation.
    I have corrected some document errata about the pl/sql content and I manage to have messages in the 'notify_queue'.
    I obtain the Topic in Java from this queue.
    But the TopicSuscriber instances do not receive any message. Is there something to have in mind to make it work ?
    Regards.

    Reviving this thread again...
    I am using DCN feature to build a middle-tier cache. I know oracle has problem sending physical rowid in case of 'Index Organized Table', however, in normal table also its not able to send proper rowid.
    e.g, I have 2 records in Table A with rowid AAARIUAAGAAAV/uABw and AAARIUAAGAAAV/pAAX.
    I have updated both the records. Strangely for the first record, oracle is sending INVALID rowid, although for the second record its sending the valid one.
    Following is the output:
    Row 1:  (Wrong rowid being sent, AAARIUAAGAAAV/uABw is replaced with AAARIUAAGAAAXDCAAr)
    Connection information  : local=localhost.localdomain/127.0.0.1:47633, remote=localhost.localdomain/127.0.0.1:2278
    Registration ID         : 2102
    Notification version    : 1
    Event type              : OBJCHANGE
    Database name           : <sid>
    Table Change Description (length=1)
        operation=[UPDATE], tableName=<table_name>, objectNumber=70164
        Row Change Description (length=1):
          ROW:  operation=UPDATE, ROWID=AAARIUAAGAAAXDCAAr
    Row 2:  (Right rowid being sent, AAARIUAAGAAAV/pAAX)
    Connection information  : local=localhost.localdomain/127.0.0.1:47633, remote=localhost.localdomain/127.0.0.1:2278
    Registration ID         : 2102
    Notification version    : 1
    Event type              : OBJCHANGE
    Database name           : <sid>
    Table Change Description (length=1)
        operation=[UPDATE], tableName=<table_name>, objectNumber=70164
        Row Change Description (length=1):
          ROW:  operation=UPDATE, ROWID=AAARIUAAGAAAV/pAAX
    Any idea ?

Maybe you are looking for

  • How do I tell if the option key is down?

    I want to detect whether the option key is being held down while the gui is setting up (the option key, only appearing on macs, is roughly equivalent to the 'alt' key). I am not having any particular events fired at this time, that I know of. How can

  • Error in scot

    HI all, I get lot of notifications in SCOT which are in error state. I want to know where this notifications are getting generated from and how to stop it from getting generated?? When I checked the contents of the notification.. I found the below te

  • How I can change the state transition time?

    I want to change the transition time, when you change from the normal state to rollover state for example. Thanks

  • Making an object serializable

    Hey guys, im new at this so i dont know almost anything about serialization, so here's my problem: Got an array of an object "Article" that i defined, wanna write it to a file but i get the "NotSerializableException", here's my object's constructor:

  • Photo library beta - syncing images to icloud takes forever

    I started using the icloud photo library (beta) yesterday and my phone is still uploading photos. My phone has been on a wifi network for the better part of the last 24 hours and still it's only managed to upload about 230 of 800 images/videos. It se