Java Application connectivity to Coherence cluster

I am looking around the options for Java application connecting to Coherence cluster..
These are the options I seem to have
1. Coherence Extend -
2. Make Java application as a cluster member with no storage
what are the pros/cons?
Thanks

Hi,
Here are my thought off the top of my head
*1. Use Extend if...*
<li> Your application is short lived - i.e. does not run for very long (minutes)
<li> Your application is not located close (in network terms) to the rest of the cluster
<li> Your client uses a different version of Coherence to the cluster (there are caveats around this)
<li> The client application is being developed by another team and its release cycle is not under your control
Pros:
Good for short lived applications
Good for remotely located clients
Can be written in other languages than Java
Cons:
Extend will perform slower than a cluster member as every request goes via the proxy server and then to the rest of the cluster.
If using an invocation service where you want to run invocables across the cluster it needs a two step process.
A badly written Extend client can perform requests which could take out the proxy server
*2. Use a cluster member if...*
<li> Your application runs for a long time - i.e. it is something like a web or application server
<li> Your application is well behaved - i.e. does not have big GC pauses. A very badly behaved cluster member can destabilize the rest of the cluster
<li> Your application is located close (in network terms) to the rest of the cluster
Pros:
Faster than an Extend client
Cons:
Needs to be stable
Needs to be located close to the rest of the cluster
Hope that helps as a start
JK

Similar Messages

  • Java application to call BOXI cluster report server

    Dear all,
    We have a BOXI 3.1 cluster consisting of 2 servers, says server1 and server2.
    Which server should the java application call to? server1 or server2? I don't realize there is BOXI cluster common hostname that can be resolved by DNS.
    If the application calls to server1, what if server1 is down?
    Many thanks

    For the Java version of the BusinessObjects Enterprise SDK starting with XI 3.x, CMS members and their "Name Server Port" are persisted by the SDK in the file %HOME%\.businessobjects\clusterinfo.1200.properties file.    This file is read when SessionMgr is instantiated.
    When logon method with a CMS member name/port is invoked, it's looked up to determine what cluster the member belongs to, as recorded in the properties file.  Then a random CMS member from that cluster is selected, and connection is attempted to that CMS Name Server.
    So regardless of what CMS name you enter for the logon, it should at least fail over to a live one.
    The only issue happens if there's no clusterinfo.1200.properties file (i.e., fresh install on the SDK machine) or not accessible (if the process has no rights to access that file).  Then you have to ensure the CMS name you enter is to a live one.    If it's a fresh install and there's sufficient file access, the initial contact with a live CMS Name Service will retrieve all CMS members, and the SDK will update teh properties file.
    So you shouldn't have to worry about which CMS name you specify.
    Sincerely,
    Ted Ueda

  • How to connect Java Application to ORACLE8i over SSL connection

    Hi,
    I would like to know how to make an existent Java application connect to an ORACLE8i database over a secure SSL connection?
    can I user ResultSets?
    Could you please tell me what parameters to set on the database and, especially, what new code must be added for the Java Application so send data over an SSL connection.
    Your advice/hints will be greatly appreciated.
    Vani

    Use usual Oracle' encryption. SSL configuration is a nightmare.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Properties props = new Properties();
    try {
    props.put("user", "scott");
    props.put("password","tiger");
    props.put("oracle.net.encryption_client", "REQUIRED");
    props.put("oracle.net.encryption_server", "REQUIRED");
    props.put("oracle.net.encryption_types_client", "( RC4_56 )");
    props.put("oracle.net.encryption_types_server", "( RC4_56 )");
    props.put("oracle.net.crypto_checksum_client", "REQUIRED");
    props.put("oracle.net.crypto_checksum_server", "REQUIRED");
    props.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
    props.put("oracle.net.crypto_checksum_types_server", "( MD5 )");
    props.put("sqlnet.crypto_seed", "769764576979045769576907");
    } catch (Exception e) { e.printStackTrace(); }
    Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT =1521)))(SDU=32767)(CONNECT_DATA=(SERVICE_NAME=orcl)(SID=orcl))", props);
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
    while (rset.next ())
    System.out.println (rset.getString (1));
    rset.close();
    stmt.close();
    conn.close();

  • How to make a connection between an application and a Coherence Grid?

    Hello,
    We're starting with Oracle Coherence.
    How do I connect an application (for example running in JDeveloper) to an existing grid?
    I used the following tutorial to get started with Coherence.
    http://www.oracle.com/technology/pub/articles/vohra-coherence.html?msgid=6521631
    Within JDev an Coherence instance is started, data is entered and queried.
    Next I'd like to connect this to a running Coherence instance, (started with [Coherence home]\bin\coherence.cmd)
    When I start the coherence.cmd and run the application from within JDev, I can see a connection is made
    Map (?):
    2008-05-13 13:15:24.667 Oracle Coherence GE 3.3.1/389 <D5> (thread=Cluster, member=4): Member(Id=5, Timestamp=2008-05-13 13:15:24.484, Address=10.35.1
    4.150:8090, MachineId=10134, Location=process:4612@WBNL71033) joined Cluster with senior member 1
    Map (?):
    2008-05-13 13:15:24.934 Oracle Coherence GE 3.3.1/389 <D5> (thread=Cluster, member=4): Member 5 joined Service DistributedCache with senior member 5
    Map (?):
    2008-05-13 13:15:25.630 Oracle Coherence GE 3.3.1/389 <D5> (thread=Cluster, member=4): Member 5 left service DistributedCache with senior member n/a
    2008-05-13 13:15:25.630 Oracle Coherence GE 3.3.1/389 <D5> (thread=Cluster, member=4): Member 5 left Cluster with senior member 1
    I am, however, not able to retrieve the data which is entered via JDev.
    (1) What do I need to do to distribute the data entered via the Jdev application to the Coherence grid
    (2) How can I get access to the data within the Coherence Grid(do I need to to change the Cache, Map or something else)?
    Thanks in advance
    Regards Leon

    Hi Leon,
    In order to see the entries created by the sample application within JDev, you will need to do several things:
    1. Ensure that at least one storage enabled Coherence node is running, by executing cache-server.cmd at least once (coherence.cmd starts storage-disabled console only).
    2. Run coherence.cmd and change to the appropriate cache from the console:
    Map (?): cache VirtualCache
    (the name should be the same as the one defined in cache-config.xml and Java code)
    3. Execute commands against the cache:
    Map (VirtualCache): list
    This should give you a list of all the entries within a VirtualCache.
    HTH,
    Aleks

  • JCo 3.0 connectivity issues between Java application on NWCE and ERP

    Requirement: We have a Java application that would run on NWCE. This application will be invoked from ERP/SAPGUI via HTML Controller. With SSO enabled, the goal is to pass ERP credentials to CE application. This CE application in turn will use ERP credentials from Logon ticket to connect to ERP and invoke BAPI calls (JCo 3.0 destination)
    System Information:
    CE System: SAP NW CE 7.2 SPS 04
    ERP: SAP ECC 6.04
    Both systems are trusted using X.509 certificates
    Current scnerio:
    1) Destination (CE to ERP) - JCo 3.0 using Authetication method of u201CCurrent User (Logon Ticket)u201D
    - Web application is unable to find the JCo 3.0 destination.
    2) Destination (CE to ERP) - JCo 3.0 using Authetication method of u201CTechnical Useru201D
    - Web application is able to find the JCo destination
    Any assiatance in resolving the issues would be appreciated ....
    Trace Log:
    #2.0 #2011 01 19 14:44:38:756#+0100#Error#com.sap.security.core.server.destinations.provider.DestinationsProviderFrame#
    com.sap.getDestinationProperties()#BC-JAS-SEC#tcsecdestinations~provider#001F2960BE89048C0000000100005BC1#16777250000000004#sap.com/TestJcoWebEar#com.sap.security.core.server.destinations.provider.DestinationsProviderFrame#10207625#182##4286395D23D211E08BA2000001000022#d981f18323b011e0b5eb000001000022#d981f18323b011e0b5eb000001000022#0#Thread[HTTP Worker [@2002275007],5,Dedicated_Application_Thread]#Plain##
    ASJ.dest.pr0023#

    Hi Hemandra,
    This is the Full error message i am getting
    Message:   ASJ.dest.pr0023
    Severity:   Error
    Date:   2012-02-09
    Time:   21:37:25:134
    User:   SUPPLIER
    Category:   /System/Security
    Location:   com.sap.security.core.server.destinations.provider.DestinationsProviderFrame
    Application:   XXXXXXXXXXXXXXXXXXXXXX
    Thread:   Thread[HTTP Worker [@254542764],5,Dedicated_Application_Thread]
    Data Source:   j2ee/cluster/server0/log/system/security.log
    Arguments:   
    Passport User Activity ID:   1d2dfea9533811e1adf3000000dc2fc6
    Message ID:   com.sap.getDestinationProperties()
    Session:   11
    Transaction:   
    Time Zone:   +0530
    Customer Message Component:   BC-JAS-SEC
    Runtime Component:   tcsecdestinations~provider
    Correlation ID:   14430150000000004
    Passport Session:   8703D330533611E19565000000DC2FC6
    Passport Connection:   1d2dfea9533811e1adf3000000dc2fc6
    Passport Connection Counter:   0
    Host:   XXXXX
    System:   XXX
    Instance:   J01
    Node:   server0
    Log ID:   C000AC10088100FF0000000000002BF1
    Regards,
    Srinivas

  • Accessing Coherence Extend* Proxy Deployoed on Weblogic Coherence Cluster from Java Client

    Hi,
    I am trying to access Extend Proxy through Thick Java Client
    Followed steps as per below links and deployed a GAR on 3 Server ( 2 Storage Enabled Coherence Cluster and 1 Coherence Storage Disabled Extend Proxy Enabled). I could see ExtendProxyService using JMX and can see Port running on the System.
    Ref :
    Setting Up Coherence*Extend - 12c (12.1.2)
    http://docs.oracle.com/middleware/1212/coherence/COHAG/deploy_options.htm#CHDJBJDI
    Issue :
    When I tried to Execute Java Client to Connect to Proxy Server it Connects to Port and then Disconnects with ConnectionException as below.
    Observer below Lines in Box is show he Connected Socket with Port 9099 which is Extend Proxy Port
    Error Message
    2013-11-08 14:55:55.114/1.202 Oracle Coherence GE 12.1.2.0.0 <D5> (thread=TcpClientRemoteService:TcpInitiator, member=n/a): Started: TcpInitiator{Name=TcpClientRemoteService:TcpInitiator, State=(SERVICE_STARTED), ThreadCount=0, Codec=Codec(Format=POF), Serializer=com.tangosol.io.DefaultSerializer, PingInterval=0, PingTimeout=30000, RequestTimeout=30000, ConnectTimeout=10000, SocketProvider=[email protected], RemoteAddresses=WrapperSocketAddressProvider{Providers=[[DTC37446E9C6CBD/127.0.0.0:9099]]}, SocketOptions{LingerTimeout=0, KeepAliveEnabled=true, TcpDelayEnabled=false}}
    2013-11-08 14:55:55.146/1.234 Oracle Coherence GE 12.1.2.0.0 <D5> (thread=main, member=n/a): Connecting Socket to 127.0.0.0:9099
    2013-11-08 14:55:55.146/1.234 Oracle Coherence GE 12.1.2.0.0 <Info> (thread=main, member=n/a): Connected Socket to 127.0.0.0:9099
    2013-11-08 14:55:55.161/1.249 Oracle Coherence GE 12.1.2.0.0 <Info> (thread=main, member=n/a): Error establishing a connection with 127.0.0.0:9099: com.tangosol.net.messaging.ConnectionException: TcpConnection(Id=null, Open=true, LocalAddress=0.0.0.0:54384, RemoteAddress=127.0.0.0:9099)
    2013-11-08 14:55:55.161/1.249 Oracle Coherence GE 12.1.2.0.0 <Error> (thread=main, member=n/a): Error while starting service "TcpClientRemoteService": com.tangosol.net.messaging.ConnectionException: could not establish a connection to one of the following addresses: [127.0.0.0:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator.openConnection(TcpInitiator.CDB:121)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.Initiator.ensureConnection(Initiator.CDB:11)
        at com.tangosol.coherence.component.net.extend.remoteService.RemoteCacheService.openChannel(RemoteCacheService.CDB:7)
        at com.tangosol.coherence.component.net.extend.RemoteService.doStart(RemoteService.CDB:11)
        at com.tangosol.coherence.component.net.extend.RemoteService.start(RemoteService.CDB:5)
        at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:53)
        at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
        at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
        at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
        at com.tangosol.net.ExtensibleConfigurableCacheFactory.startService(ExtensibleConfigurableCacheFactory.java:681)
        at com.tangosol.net.ExtensibleConfigurableCacheFactory.ensureService(ExtensibleConfigurableCacheFactory.java:599)
        at com.tangosol.coherence.config.scheme.AbstractCachingScheme.realizeCache(AbstractCachingScheme.java:50)
        at com.tangosol.coherence.config.scheme.AbstractBundlingScheme.realizeCache(AbstractBundlingScheme.java:31)
        at com.tangosol.net.ExtensibleConfigurableCacheFactory.ensureCache(ExtensibleConfigurableCacheFactory.java:254)
        at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:205)
        at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:182)

    If this proxy design (not starting up due to a invalid entry in "authroized-hosts") is on-purpose from Coherence Engineers - then it should be re-visited.
    I think the PROXY Server should just log a message stating about the invalid DNS entry for the Authorized-host and continue with the startup...Failing to start completely doesn;t make sense since one cannot rely completely on DNS to
    say everything should be correct before a server start.
    Ofcourse you can overcome by writing your own Custom Filter - but the issue pop's out as with any custom filter(s) is maintaining them along the road (with all minor/major coherence upgrades).
    Also - this "Authorized-Hosts" concept should be carefully analyzed particularly for the following issues...
    (1) if the client IP is changed in the DNS server - will the proxy-server allow the new Client connection without any issues? when will the PROXY server flush its CLIENT DNS entries or what is the TTL time-limit for a CLIENT cached through Authorized-hosts by the PROXY-SERVER?
    (2) Suppose, we have a CLIENT in the "Authroized-Hosts" making a valid connection to the PROXY and putting some cache into the SERVER CACHE through the PROXY....now if the IP-address (DNS being the same) of the CLIENT is changed - can the CLIENT can GET the CACHE it just PUT into the SERVER without any ERRORS?
    (3) How often we need to re-start PROXIES? Do we need to re-start them often for the DNS issues (if any) mentioned above?
    Looks like the Limited documentation & examples for Coherence*Extend - particularly for .NET & C++ clients & *Extend Proxies is a point of concern.
    vk

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • Connecting to desktop Java application from R/3

    I want to connect to a java application program in my desktop and return a parameter to R/3. I have installed Java connector and I want to call the java application from R/3 using Java connector.
    I was able to get few samples to setup the RFC destination for a remote server program, but I was not able to find anything for an application in the client system. How to setup the RFC destination for a Java connector to call the application in the desktop? Can anyone please answer this question.

    Hi Allam,
    1. Why do you need to connect from backend system to your desktop client? Did I understood it correctly that it's exacly what you want to do?
    2. I guess examples you saw are for JCO or JCA which is a part of SAP J2EE server. Simply speaking the server is waiting for a client request and your desktop application probably not. If you still are sure that server->desktop connection is what you need then you have to emulate the server on your self and then depending on what you need JCO/JCA you have to create a kind of container that will implement listening service.
    I'd like to hear your answer for question one to give you more detailed answer.

  • Connection Pooling in Core Java Application

    I need to implement Connection pooling in core java applications..
    My database is MySQL 5.0.27 and java version 1.5.0_09
    Any links or ideas will be really appreciated

    but i just wanted to know, how can i do that in core java application. i have used connection pooling in Tomcat using dbcp
    but these are my questions.
    1. How can i run a core java application doing TCP connection in an Application Server which has got Tomcat and i'm asked to do connection pooling in the Tomcat server.xml.. I didn't understand this requirement pls help me... plssssssssssss

  • Issue with Java Application with ECC - Connection Issue

    Hi
    We have developed one java application to connect to SAP to extract some data. We are using java API (sapjco) to connect to the SAP. Now we are facing one issue u2013 for the ECC while connecting through the java application we are getting u201CUserid or Password incorrect erroru201D, but with the same userid and password we are able to log through the SAP GUI. If we changed the password with all CAPS (Capital Letters) and without numeric values, its working fine in java application (Means its connecting to ECC)
    We are facing this issue only in ECC; the same application is running successfully in SAP 4.7 etc. without changing password.
    Please Help!

    I would draw the conclusion that you have to provide the paaword in upper case. There is a standar java method there that does this for you. Just do it before sending the password.
    Regards,
    Benny

  • Help-how can i connect to the XE through my java application?

    Hi, i am trying to connect to the XE through my java application. I have downloaded the jdbc driver tho. but the error occured: cant find the symbol (class oracledatasource not found) . could anyone here tell me what else should i try to fix it? where should i put the jdbc packages ? anyone's prompt reply would be much appreciated! thanks a lot.

    Hi ,thank you very much for your guide.
    i am actually trying to connect to the XE server through my JSP files.
    i download the Oracle jdbc driver packages and put them in the same folder with JSP files. but i did not set the class path tho.
    do i have to set the enviroment variables for the classpath of Oracledatasource class? thanks a lot.
    another problem i got is installing the JDeveloper, it seemed my computer just got stuck there when installing JDeveloper. my laptop is with 256MB memory tho.
    the code i used to connect to the XE server in my jsp file is as below:
    <%@ page language="java" contentType="text/html"%>
    <%@ page import="java.sql.*" %>
    <%@ page import java.sql.Connection%>;
    <%@page import java.sql.SQLException%>;
    <%@page import oracle.jdbc.pool.OracleDataSource%>;
    <%@ page import="java.io.*" %>
    <% String jdbcUrl = "jdbc:oracle:thin:@localhost";
    Connection conn;
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(jdbcUrl);
    %>
    dose it have some problems there?
    thanks a lot.
    Message was edited by:
    Novice

  • Java application to connect to AP 7.00 (IPC)

    Hi,
    I have to develop standalone java application that connects to IPC and does configurations via the IPC Server (via the RFCs the IPC Server exports).
    I have JCo connection to the SAP ECC system (only one server. I assume the IPC server is running on the same host)
    I then tried to call the "CREATE_SESSION" command. Repository returned null.
    Do I need to set a special SystemNr in JCODestination? (To connect to the IPC Server)
    Or is it possible to make a connection to SAP ECC system and then call the IPC RFCs?
    Does SAP provide a function/transaction to retrieve a list of functions that a RFC destination supports?
    Is there a Howto document on how to call the IPC server from a standalone (Java) application?
    I hope somebody can help me!
    Thanks!
    BR Georg

    Error messages tell you everything you need to know (usually).
    Student.java:13: cannot find symbol
    symbol : class ControlPanel
    location: class Student
    private ControlPanel controls;
    ^
    This means that the compiler cannot find the class ControlPanel. Does it exists. Is it in the same directory as your other files. Has it compiled correctly.
    Student.java:38: cannot find symbol
    symbol: method GridLayout(int,int,int,int)
    frame.add(panel, GridLayout(4,2,5,5));
    ^
    This tells you it cannot find the method GridLayout. I presume you meant to have a new in front of it. Besides the layout manager code should have been done prior to this and your code should be
    frame.add(panel);Student.java:49: cannot find symbol
    symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
    location: class javax.swing.JMenuItem
    exititem.addWindowListener(
    ^
    Once again the method addWindowListener cannot be found. JFrame has this method not JMenuItem. Probably need an ActionListener.
    Student.java:69: cannot find symbol
    symbol : method JMenuItem(java.lang.String)
    location: class Student
    JMenuItem queryItem = JMenuItem("Query");
    ^
    Once again the compiler thinks you are trying to call a method called JMenuItem. You forgot new.
    Student.java:78: cannot find symbol
    symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
    location: class javax.swing.JOptionPane
    JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
    Spelling!

  • Java Application to connect to vdb3 database

    Hi Folks,
    I have to create a java application to connect to vdb3 oracle databse to support various transactions with menu options as below:
    File menu(ALT F)
    ---Connect (ALT L)
    ---Exit (ALT E)
    Data menu(ALT D)
    ---Query(ALT Q)
    ---Add Student(ALT A)
    ---Delete Student(ALT T)
    ---Update Student(ALT U)
    Option menu(ALT O)
    ---Color(ATL C)
    ---Font (ATL N)
    There is a STUDENT table with studid, firstname, lastname, major and age.
    I have the following code for the GUI. I am getting the following errors. How do I go about from here? Please help.
    Student.java:13: cannot find symbol
    symbol : class ControlPanel
    location: class Student
    private ControlPanel controls;
    ^
    Student.java:38: cannot find symbol
    symbol: method GridLayout(int,int,int,int)
    frame.add(panel, GridLayout(4,2,5,5));
    ^
    Student.java:49: cannot find symbol
    symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
    location: class javax.swing.JMenuItem
    exititem.addWindowListener(
    ^
    Student.java:69: cannot find symbol
    symbol : method JMenuItem(java.lang.String)
    location: class Student
    JMenuItem queryItem = JMenuItem("Query");
    ^
    Student.java:78: cannot find symbol
    symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
    location: class javax.swing.JOptionPane
    JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
    import javax.swing.*;
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Student extends JFrame
         private JTextArea out;
         private JDesktopPane desktop;
         private JTextArea queryoutput;
         private ControlPanel controls;
         public Student()
              super(" Student Database");
              //container c = getContentPane();
              desktop = new JDesktopPane();
              add(desktop);
              JMenu fileMenu = new JMenu("File");
              fileMenu.setMnemonic('F');
              JMenuItem connectItem = new JMenuItem("Connect");
              connectItem.setMnemonic('L');
              fileMenu.add(connectItem);
              connectItem.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
                        JInternalFrame frame = new JInternalFrame("Login", true, true, true, true );
                        MyPanel panel = new MyPanel();
                        frame.add(panel, GridLayout(4,2,5,5));
                        frame.pack();
                        desktop.add(frame);
                        frame.setVisible(true);
              JMenuItem exititem = new JMenuItem("Exit");
              exititem.setMnemonic('E');
              fileMenu.add(exititem);
              exititem.addWindowListener(
                   new WindowAdapter()
                        public void WindowClosing (WindowEvent event)
                             System.exit(0);
              JMenuBar bar = new JMenuBar();
              setJMenuBar(bar);
              bar.add(fileMenu);
              queryoutput = new JTextArea(5,20);
              JMenu dataMenu = new JMenu("Data");
              dataMenu.setMnemonic('D');
              JMenuItem queryItem = JMenuItem("Query");          
              queryItem.setMnemonic('Q');
              dataMenu.add(queryItem);
              dataMenu.addSeparator();
              dataMenu.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
                        JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
              JMenuItem addstud = new JMenuItem("Add Student");
              addstud.setMnemonic('A');
              dataMenu.add(addstud);
              dataMenu.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
              JMenuItem delstud = new JMenuItem("Delete Student");
              addstud.setMnemonic('T');
              dataMenu.add(delstud);
              dataMenu.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
              JMenuItem updatestud = new JMenuItem("Update Student");
              addstud.setMnemonic('U');
              dataMenu.add(updatestud);
              dataMenu.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
              JMenu options = new JMenu("Options");
              options.setMnemonic('O');
              JMenuItem color = new JMenuItem("Color");
              addstud.setMnemonic('C');
              options.add(color);
              options.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
              JMenuItem font = new JMenuItem("Font");
              addstud.setMnemonic('N');
              options.add(font);
              options.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent event)
    class MyPanel extends JPanel
              private JLabel L1;
              private JLabel L2;
              private JLabel L3;
              private JTextField userid;
              private JPasswordField pw;
              private JTextField database;
              private JButton ok;
              private Connection connect;
              private JTextArea output;
              private String url;
         public MyPanel()
              L1 = new JLabel("User Id:");
              add(L1);
              userid = new JTextField(10);
              add(userid);
              L2 = new JLabel("Password:");
              add(L2);
              pw = new JPasswordField(10);
              add(pw);
              L3 = new JLabel("Database Name:");
              add(L3);
              database = new JTextField(10);
              add(database);
              ok = new JButton("OK");
              add(ok);
              ok.addActionListener(     
              new ActionListener()
                   public void actionPerformed(ActionEvent event)
                   try {
         url = "jdbc:odbc:Student";
         Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
         connect = DriverManager.getConnection( url );
         output.append( "Connection successful\n" );
              catch ( ClassNotFoundException cnfex ) {     
         // process ClassNotFoundExceptions here
         cnfex.printStackTrace();     
         output.append( "Connection unsuccessful\n" +
    cnfex.toString() );
         catch ( SQLException sqlex ) {
         // process SQLExceptions here
         sqlex.printStackTrace();
         output.append( "Connection unsuccessful\n" +
    sqlex.toString() );
         catch ( Exception ex ) {
         // process remaining Exceptions here
         ex.printStackTrace();
         output.append( ex.toString() );
    import javax.swing.*;
    public class MainWindow
         public static void main( String args[])
              Student student = new Student();
              student.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              student.setSize(500,200);
              student.setVisible( true);
    }

    Error messages tell you everything you need to know (usually).
    Student.java:13: cannot find symbol
    symbol : class ControlPanel
    location: class Student
    private ControlPanel controls;
    ^
    This means that the compiler cannot find the class ControlPanel. Does it exists. Is it in the same directory as your other files. Has it compiled correctly.
    Student.java:38: cannot find symbol
    symbol: method GridLayout(int,int,int,int)
    frame.add(panel, GridLayout(4,2,5,5));
    ^
    This tells you it cannot find the method GridLayout. I presume you meant to have a new in front of it. Besides the layout manager code should have been done prior to this and your code should be
    frame.add(panel);Student.java:49: cannot find symbol
    symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
    location: class javax.swing.JMenuItem
    exititem.addWindowListener(
    ^
    Once again the method addWindowListener cannot be found. JFrame has this method not JMenuItem. Probably need an ActionListener.
    Student.java:69: cannot find symbol
    symbol : method JMenuItem(java.lang.String)
    location: class Student
    JMenuItem queryItem = JMenuItem("Query");
    ^
    Once again the compiler thinks you are trying to call a method called JMenuItem. You forgot new.
    Student.java:78: cannot find symbol
    symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
    location: class javax.swing.JOptionPane
    JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
    Spelling!

  • How connect an HTML page to a running Java Application?

    Hi,
    Exists a way to connect an HTML page to a running Java Application?
    the idea is, If we use SWT, the Browser widget have an instance of IE/Firefox attached to it, and we load local HTML pages inside, then i wish to have a way to bridge Java Application from HTML page. Then with that we can do follow JScript:
    var javaApp = document.getJavaApplication(); //here is the trick
    //below is like we do today with applets
    var person = container.create("myapp.Person");
    person.setName("Test");
    container.save(person);its great if we can Have an attribute for object tag or anything to conect HTML page to Java Application.

    I think that the better idea is to create a new mime type for that, maybe "application/x-java-connect-to-local-jvm", and use embed tag, to connect via plugin to a running JavaApp
    example:
    <embed type="application/x-java-connect-to-local-jvm" width="20" height="20" mainClass="mypackage.AppName"><br>
    <script>
    var javaApp = document.embeds[0];
    function createPerson()
      var person = javaApp.getNew("mypackage.Person");
      person.setName("test");
      javaApp.save(person);
    }The width and height, isnt necessary, but the view can be used to show red if connection failed and green for sucessfull connections, or maybe embed tag can have src to images for sucessfull and unsucessfull states.
    That's the idea, there is a way to extend Java Plugin to achieve that?
    any tip or idea or to achieve that, are welcome.
    Thanks

  • HOW COULD CONNECT FROM SAP SYSTEM TO THIRD PARTY JAVA APPLICATION

    HI expects,
            HOW COULD CONNECT FROM SAP SYSTEM TO THIRD PARTY JAVA or . DET APPLICATION.please provide me some scenarios and documents.please help me.

    Hi,
    In the sender side i.e. in SAP system you can use IDoc/RFC/Proxy to push the data to XI.
    IDoc supports only Async communication and in Sync case performace is good using Proxy.
    In the receiver side you can use Java Proxy to connect to the Java application or you can even bulid a webservice over the Java/.Net application and use SOAP adapter to post data to it.
    Thanks
    SaNv...

Maybe you are looking for

  • GR and payment in one shot

    Hi Friends, Is there a way to make GR in one shot so that stock account is updated and vendor is credited w/o GRIR clearing account? Please help if any way is there. Regards, Ram

  • Querying metadata vs data

    Hi There, Say I had the option of coming up with whatever schema that works best for BDB XML from a performance standpoint to persist xml documents. That said, I now have the option of storing metadata as metadata or as part of the regular data/conte

  • I accidently renamed image folders in bridge and cannot access the folder images.

    I accidently renamed image folders in bridge and can no longer access the folders. Is there a way to get the images back?

  • Elements 12 Organizer window frozen

    I run Elements 12 under Windows 7 64bit. The Window is cut and frozen, everything above the "person" (Personen), "location" (Orte), "event" (Ereignisse) bar is cut away -  and everything left of the button "Add Location" (Hinzufügen Ort) is also cut

  • Whatsapp Audio Note from Android, cannot be played after iOS6

    Hi, I update my 4S to iOS6 last night and today when my friend sent me an AUDIO NOTE on whatsapp - it said " Audio Fille Cannot Be Played " where as it use to play all the time earlier. I tried mailing it to my eamil add and then playing in Safri - b