Flex with JMS Topic/Queue for Asynchronous messaging

I have been working on Flex and JMS integration using Data
Services for Asynchronous messaging. I am able to do this
successfuly. Now I am in need to do the same without using the Data
Services piece.
For doing this I have done the following ......
I have created a JMS Webservice in the Oracle JDeveloper 10G
along with Webservice Client.I am able to Listen to JMS Topic/Queue
( this has been created in the Oracle AS ) using this Webservice
and receive the messages from this JMS Topic/Queue
Asynchronously.....
But If I need to use the Flex Client , I am not able to
Communicate with this Webservice to listen to the JMS Topic/Queue.
Did any one in this forum tried to communicate with JMS
Topic/Queue without using Flex Data Service.If so please share your
inputs.

Here is my confusion (I'm using J2EESDK1.3).
On a local server I did the following
j2eeadmin -addJmsFactory jms/RemoteTCF topic -props url=corbaname:iiop:mars#mars
In the app client running on the local server I had the code
ic = new InitialContext();
// JNDI lookup. The resource factory ref points to the
// Remote Connection Factory I registered
tcf = (TopicConnectionFactory)ic.lookup("java:comp/env/jms/TopicConnectionFactory");
// The env ref points to jms/Topic of the local server
pTopic = (Topic)ic.lookup("java:comp/env/jms/PTopic");
So I'm assuming that I'm using a connection factory that connect to mars and a Topic on the local box.
On remote server mars, I deployed a MDB which use
jms/TopicConnectionFactory and jms/Topic. But I'm thinking this jms/Topic and the one I used on the local box are not the same one. Right? Then how could the app client and the MDB share messages?
Some of my explanation I don't if it makes sense or not.
ConnectionFactory is a way to tell what kind of connection it could generate (Queue, Topic, Durable etc) and Where the connection would go to (local or remote).'
As for as destination, I'm not sure. How could two server share one Topic?

Similar Messages

  • Issue with JMS inbound Adapter  and Asynchronous BPEL

    Hi Gurus,
    I am facing the below issue with JMS inbound Adapter and Asynchronous BPEL .
    I have 2 JMS Queues one inbound and one outbound . The Composite has multiple BPEL Components around 4 on an average and i have 4 composites similar to that .
    Totally 4 Composites * 4 BPEL Components = 16 Services
    Propoesd Solution :
    I have used MessageSelector in the JMS Adapter for selecting the incoming message. The BPEL gets invoked if the message selector is true and proceses the Message and writes the response to the other Queue.
    Initially i had no problems but intermittantly the BPEL processes are getting invoked but they are not processing the data ( Bpel process is supposed to invoke an external service and get the response in a sync call) and each BPEL processe instance is in running state for ever . This remains even if i restart the servers .
    The message gets read by the JMS Adapter , BPEL instace gets created but it wont proceed futher and remains in the runnign state for ever.
    If i redeploy the Composite then messages get processed but the issue creeps up again ( i tried to checl the logs but ino cluea about the issue .
    Getting frustrated day by day tried the bpel.config.transaction, increased the JMS Adapter threads , inreased the worker threads but all in vein..
    please let me know if any one has faced similar issue .
    Anticipating a quick response from the gurus.
    Lakshmi.

    We are also facing this issue in 11.1.1.5.
    Breifly the issue is : The BPEL process which polls an inbound JMSAdater ( consume_message) either stays in running state forever ( whatever we do) or go to the recovery queue. It doesnt recover even if i try to recover it. This happens intermittently. Redeploying the application / restarting servers sometime solve the issue but as know we cant do that on prod systems .
    Can some one look into this on priority and help us giving a solution/workaround.

  • Multiple Topics/Queue for Single MDB?

    Hi -
    Is it possible to configure single MDB to handle multiple Topic/Queue in JMS? I used two <jndi-name/> tags for two topics, but only the first one got picked up by the AS7 server. If one MDB can be configured to take multiple topics, how should I configure it? Some configuration example would be most helpful.
    Thanks!

    Hello,
    According to the Ejb 2.1 specifications, in section 15.4.12 "Association of a Message-Driven Bean with a Destination or Endpoint.
    A message-driven bean is associated with a destination or endpoint when the bean is deployed in the container. It is the responsibility of the Deployer to associate the message-driven bean with a destination or endpoint."
    Based on this sentence, I would be led to beleive that a single mdb reading on multiple destinations would not be supported. You can try x-posting this to the application server forum.
    If you desire the same behavior for the multiple topics, you could always use inheritance on your mdb class, or transfer the logic code into a helper class that is reused by multiple, independent MDBs classes....

  • JMS Provider Responsibilities For Concurrent Message Delivery

    Hi,
    (This question pertains to the JMS api, outside a j2ee container)
    Is it JMS-provider dependent on how concurrent message delivery is implemented? In other words, the code below sets up multiple consumers (on a topic), each with their own unique session and MessageListener and then a separate producer (with its own session) sends a message to the topic and I observer that only (4) onMessage() calls can execute concurrently. When one onMessage() method exits, that same thread gets assigned to execute another onMessage().
    The only thing I could find on the matter in the spec was section in 4.4.15 Concurrent Message Delivery and it's pretty vague.
    It's really important because of the acknowledgment mode. If it turns out that I need to delegate the real work that would be done in the onMessage() to another thread that I must manage (create, pool, etc), then once the onMessage() method completes (i.e., after it does the delegation to another thread), the message is deemed successfully consumed and will not be re-delivered again (and that's a problem if the custom thread fails for any reason). Of course, this assumes I'm using AUTO_ACKNOWLEDGE as the acknowledgment mode (which seems to make sense since using CLIENT_ACKNOWLEDGE mode will automatically acknowledge the receipt of all messages that have been consumed by the corresponding session and that's not good).
    My JMS Provider is WL 9.1 and the trival sample code I'm using as my test follows below. I also show the ouput from running the example.
    thanks for any help or suggestions,
    mike
    --- begin TopicExample.java ---
    import java.io.*;
    import java.util.*;
    import javax.naming.*;
    import javax.jms.*;
    import javax.rmi.PortableRemoteObject;
    class TopicExample {
    public final static String JMS_PROVIDER_URL = "t3://localhost:8001";
    public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    public final static String JMS_FACTORY="CConFac";
    public final static String TOPIC="CTopic";
    public final static int NUM_CONSUMERS = 10;
    public static void main(String[] args) throws Exception {
    InitialContext ctx = getInitialContext(JMS_PROVIDER_URL);
    ConnectionFactory jmsFactory;
    Connection jmsConnection;
    Session jmsReaderSession[] = new Session[10];
    Session jmsWriterSession;
    TextMessage jmsMessage;
    Destination jmsDestination;
    MessageProducer jmsProducer;
    MessageConsumer jmsConsumer[] = new MessageConsumer[10];
    MessageListener ml;
    try
    // Create connection
    jmsFactory = (ConnectionFactory)
    PortableRemoteObject.narrow(ctx.lookup(JMS_FACTORY), ConnectionFactory.class);
    jmsConnection = jmsFactory.createConnection();
    // Obtain topic
    jmsDestination = (Destination) PortableRemoteObject.narrow(ctx.lookup(TOPIC), Destination.class);
    // Reader session and consumer
    for (int i=0; i<NUM_CONSUMERS; i++)
    jmsReaderSession[i] = jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    jmsConsumer[i] = jmsReaderSession.createConsumer(jmsDestination);
    jmsConsumer[i].setMessageListener(
    new MessageListener()
    public void onMessage(Message msg) {
    try {
    String msgText;
    if (msg instanceof TextMessage) {
    msgText = ((TextMessage)msg).getText();
    } else {
    msgText = msg.toString();
    System.out.println("JMS Message Received: "+ msgText );
    System.out.println("press <return> to exit onMessage");
    char c = getChar();
    System.out.println("Exiting onMessage");
    } catch (JMSException jmse) {
    System.err.println("An exception occurred: "+jmse.getMessage());
    // Writer session and producer
    jmsWriterSession = jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    jmsProducer = jmsWriterSession.createProducer(jmsDestination);
    jmsMessage = jmsWriterSession.createTextMessage();
    jmsMessage.setText("Hello World from Java!");
    jmsConnection.start();
    jmsProducer.send(jmsMessage);
    char c = '\u0000';
    while (!((c == 'q') || (c == 'Q'))) {
    System.out.println("type q then <return> to exit main");
    c = getChar();
    for (int i=0; i<NUM_CONSUMERS; i++)
    jmsReaderSession[i].close();
    jmsWriterSession.close();
    jmsConnection.close();
    System.out.println("INFO: Completed normally");
    } finally {
    protected static InitialContext getInitialContext(String url)
    throws NamingException
    Hashtable<String,String> env = new Hashtable<String,String>();
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, url);
    return new InitialContext(env);
    static public char getChar()
    char ch = '\u0000';
    try {
    ch = (char) System.in.read();
    System.out.flush();
    } catch (IOException i) {
    return ch;
    --- end code --
    Running the example:
    prompt>java TopicExample
    JMS Message Received: Hello World from Java!
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    press <return> to exit onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    type q then <return> to exit main
    [you see, only 4 onMessage() calls execute concurrently. Now I press <return>]
    Exiting onMessage
    JMS Message Received: Hello World from Java!
    press <return> to exit onMessage
    [now once the thread executing the onMessage() completes, the JMS providor assigns it to execute another onMessage() until all 10 onMessage() exections complete).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I am too facing the same issue. but in my case I start getting this problem when the message size is about 1 MB itself.
    Any help is appraciated.
    Regards,
    ved

  • Example using of getMessage(s) with JMS error queues?

    Hi,
    I'm cobbling together various tools for easier management of replaying messages left in error queues and the likes, and whilst I've got messages being moved around the place on demand, I can't make any progress using getMessage() and getMessages() to print out vital statistics of a message / all the messages in a queue, including hopefully ripping out excerts of the XML payload in them. Can someone provide / point me to an example of these being in use? I can get a successful execution of getMessages() but am usure what to really do next with the object returned, how to iterate through and such.
    Thanks
    Chris.

    Hi Chris,
    There are open source solutions for message management.  In particular, you might want to investigate Hermes:
    http://blogs.oracle.com/jamesbayer/2008/01/hermes_jms_open_source_jms_con.html
    As for browsing messages via getMessages(), here's a code snippet.  Note that one should never attempt to get too many messages at a time via "getNext()" -- instead call getNext() multiple times.  Otherwise, if there are too many messages, the client or server might run out of memory.
    # create a cursor to get all the messages in the queue
    # by passing ‘true’ for selector expression, 
    # and long value for cursor timeout
    cursor1=cmo.getMessages(‘true’,9999999)
    # get the next 5 messages starting from the cursor’s
    # current end position
    # this will adjust the cursor’s current start position and
    # end position “forwards” by 5
    msgs = cmo.getNext(cursor1, 5)
    # print all the messages’ contents
    print msgs
    # get 3 messages upto the cursor’s current start position
    # this will adjust the cursor’s current start and end position backwards by 3
    # this will the current position of the message by 1
    msgs = cmo.getPrevious(cursor1, 3)
    # print all the messages’ contents
    print msgs
    Finally, here's code based on public APIs that can help with exporting messages to a file.   It uses Java, not WLST. I haven't tested it personally.  I'm not sure if there's away to do this in WLST.
      * pseudo code for JMS Message Export operation based on
      * current implementation in the Administration Console
      import java.io.File;
      import java.io.FileOutputStream;
      import java.io.OutputStreamWriter;
      import java.io.BufferedWriter;
      import java.io.Writer;
      import java.io.IOException;
      import java.util.ArrayList;
      import java.util.Collection;
      import org.w3c.dom.Document;
      import org.w3c.dom.Element;
      import org.w3c.dom.Node;
      import weblogic.apache.xerces.dom.DocumentImpl;
      import weblogic.apache.xml.serialize.OutputFormat;
      import weblogic.apache.xml.serialize.XMLSerializer; 
      import weblogic.management.runtime.JMSDestinationRuntimeMBean;
      import weblogic.management.runtime.JMSDurableSubscriberRuntimeMBean;
      import weblogic.management.runtime.JMSMessageManagementRuntimeMBean;
      import javax.management.openmbean.CompositeData;
      import weblogic.jms.extensions.JMSMessageInfo;
      import weblogic.jms.extensions.WLMessage;
      import weblogic.messaging.kernel.Cursor;
      public void exportMessages(
        String fileName,
        JMSDestinationRuntimeMBean destination,
        /* or JMSDurableSubscriberRuntimeMBean durableSubscriber */,
        String messageSelector) throws Exception {
        BufferedWriter bw = null;
        try {
          File selectedFile = new File(file);
          if (destination == null /* or durableSubscriber == null */) {
            throw new IllegalArgumentException("A valid destination runtime or durableSubscriber runtime mbean must be specified");
          JMSMessageManagementRuntimeMBean runtime = (JMSMessageManagementRuntimeMBean) destination /* durableSubscriber */;
          bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file),"UTF-8"));
          String xmlDeclaration = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
          String exportStart = "<JMSMessageExport>";
          final String exportEnd = "</JMSMessageExport>";
          final String indent = "    ";
          bw.write(xmlDeclaration);
          bw.newLine();
          bw.write(exportStart);
          bw.newLine();
          bw.newLine();
          bw.write(indent);
          CompositeData[] messageInfos = null;
          OutputFormat of = new OutputFormat();
          of.setIndenting(true);
          of.setLineSeparator("\n"+indent);
          of.setOmitXMLDeclaration(true);
          XMLSerializer ser = getXMLSerializer(bw, of);
          String cursor = JMSUtils.getJMSMessageCursor(runtime, selector,0);
          while ((messageInfos = runtime.getNext(cursor,new Integer(20))) != null) {
            for (int i = 0; i < messageInfos.length; i++) {
              JMSMessageInfo mhi = new JMSMessageInfo(messageInfos);
    Long mhiHandle = mhi.getHandle();
    CompositeData m = runtime.getMessage(cursor, mhiHandle);
    // need to get the message with body
    JMSMessageInfo mbi = new JMSMessageInfo(m);
    WLMessage message = mbi.getMessage();
    ser.serialize(message.getJMSMessageDocument());
    messageInfos[i] = null;
    bw.newLine();
    bw.write(exportEnd);
    bw.flush();
    bw.close();
    runtime.closeCursor(cursor);
    LOG.success("jms exportmessage success");
    } catch (Exception e) {
    try {
    if(bw != null)
    bw.close();
    } catch (IOException ioe) { }
    LOG.error(e);
    LOG.error("jms exportmessage error");
    throw(e);
    LOG.success("jms exportmessage success");
    private XMLSerializer getXMLSerializer(
    Writer writer,
    OutputFormat of) {
    return new XMLSerializer(writer, of) {
    protected void printText(
    char[] chars,
    int start,
    int length,
    boolean preserveSpace,
    boolean unescaped) throws IOException {
    super.printText(chars,start,length,true,unescaped);
    protected void printText(
    String text,
    boolean preserveSpace,
    boolean unescaped ) throws IOException {
    super.printText(text,true,unescaped);
    public static String getJMSMessageCursor(
    JMSMessageManagementRuntimeMBean runtime,
    String selector,
    int cursorTimeout) throws weblogic.management.ManagementException
    return runtime.getMessages(
    selector,
    new Integer(cursorTimeout),
    new Integer(Cursor.ALL));
    Hope this helps,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Using alsb for asynchronous messaging

    hello @ all,
    I like to implement a kind of asynchronous messaging.
    It is only possible with the Routing mechanism (see http://e-docs.bea.com/alsb/docs21/consolehelp/proxyactions.html).
    But the Client can not perform other works while the server prepares it response.
    The question is: How can I use asynchronous messaging, when a client send a request and can continue performing other work while the server prepares it response and the server can notify the client when the response is ready?
    The white paper from BEA (http://dev2dev.bea.com/2006/04/AL_Service_Bus_wp.pdf) and other documentation from BEA promise this kind of messaging style.
    I use only http for transform Messages. Accordingly I like to accomplish SOAP communications over http for asynchronous requirements.
    Can anybody help me to accomplish any scenario with the Aqualogic Service Bus in an asynchronously way?
    thanks a lot
    Fabio

    Asynchronous messaging using HTTP is possible.
    Please follow the below link for documentation
    http://e-docs.bea.com/wls/docs91/webserv/advanced.html

  • JMS Topic/Queue [oc4j]

    Hi,
    Can someone point me to a doc which explains how to develope a sample JMS application using standalone oc4j.
    And also what are the properties that are used to create the InitialContext for the oc4j JMS Directory service.
    i. e
    Properties env = new Properties( );
    env.put(Context.SECURITY_PRINCIPAL, "");
    env.put(Context.SECURITY_CREDENTIALS, "");
    env.put(Context.INITIAL_CONTEXT_FACTORY,"");
    env.put(Context.PROVIDER_URL,"");
    InitialContext jndi = new InitialContext(env);
    It will be of great help if u can share a sample for the above.
    Thx,
    Siddhardha.

    Nestor,
    If you are using the 9.0.3 Developers Preview, you can check out the Petstore 1.3 application that uses Oracle AQ queues and topics. Instructions and a pre-build version are available at http://otn.oracle.com/tech/java/oc4j/htdocs/oracle-petstore-readme.html
    Briefly, you don't use jms.xml, as this is used to configure the light-weight (in-memory) JMS. You add an entry to your orion-application.xml detailing a new resource-provider. You can then look up your queues and topics using a standard JNDI lookup using the resource provider.
    Thanks,
    Rob Cole
    Oracle

  • Why I cannot connect with Flickr on internet for sharing, message says I may have a firewall.?

    I cannot connect with Flickr for photo sharing, message says I may have a firewall blocking connection to internet, I have disables firewalls but still cannot connect.

    midghome12,
    Are you using Adobe Photoshop Elements?
    If so, just let us know, and someone can Move your post to that very active and helpful forum.
    As Chris points out, Adobe Photoshop does not have direct Internet uploading, so I suspect that you have PsElements.
    Just let us know the exact program, that you have.
    Good luck,
    Hunt

  • Help with an If Statement for a Message Dialog

    Hello all! I need help yet once again! I would prefer hints and nudges rather then the answer please, as this is for a homework assignment. Okay I am supposed to write a program that has 3 text boxes to enter a number between 0 and 255 (for red green and blue) and then the user should push the show button and the background color should change, which I have all working! But I am supposed to have a " gracefully handle the situation where the user enters an invalid color value (any number less than zero or greater than 255)" and I have the if statement written, but for some reason, whenever I hit the show button it always pops up that window, no matter what the user types in. So I need help figuring out how to make it stop popping up all of the time! Here is the code: Any other ideas on how to make the code better would be much appreciated!!! Thanks in advance!
    import java.awt.GridLayout;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.JPanel;
    import javax.swing.BorderFactory;
    public class ColorEditor extends JPanel {
         private JLabel labelRed;
         private JLabel labelGreen;
         private JLabel labelBlue;
         private JTextField textFieldRed;
         private JTextField textFieldGreen;
         private JTextField textFieldBlue;
         private JButton showButton;
         private JButton exitButton;
         private JOptionPane optionPane;
         public ColorEditor()
              super(new BorderLayout());
              labelRed = new JLabel("red: ");
              textFieldRed = new JTextField(5);
              labelGreen = new JLabel("green: ");
              textFieldGreen = new JTextField(5);
              labelBlue = new JLabel("blue: ");
              textFieldBlue = new JTextField(5);
              showButton = new JButton("show");
              exitButton = new JButton("exit");
              JPanel labelPane = new JPanel(new GridLayout(0,1));
              labelPane.add(labelRed);
              labelPane.add(labelGreen);
              labelPane.add(labelBlue);
              labelPane.add(showButton);
              JPanel fieldPane = new JPanel( new GridLayout(0,1));
              fieldPane.add(textFieldRed);
              fieldPane.add(textFieldGreen);
              fieldPane.add(textFieldBlue);
              fieldPane.add(exitButton);
              setBorder(BorderFactory.createEmptyBorder(40,40,40,40));
              add(labelPane, BorderLayout.LINE_START);
              add(fieldPane, BorderLayout.CENTER);
              TextFieldHandler handler = new TextFieldHandler();
              textFieldRed.addActionListener(handler);
              textFieldGreen.addActionListener(handler);
              textFieldBlue.addActionListener(handler);
              showButton.addActionListener(handler);
         private class TextFieldHandler implements ActionListener
              public void actionPerformed(ActionEvent event)
                   if (event.getSource() == showButton)
                        String textRed = textFieldRed.getText();
                        String textGreen = textFieldGreen.getText();
                        String textBlue = textFieldBlue.getText();
                        int a = Integer.parseInt(textRed);
                        int b = Integer.parseInt(textGreen);
                        int c = Integer.parseInt(textBlue);
                        if ((a < 0) || (a > 255)||(b<0)||(b>255)||(c<0)||(c>255));
                             optionPane.showMessageDialog(null, "Please enter a number between 0 and 255!");//HERE IS WHERE I NEED THE HELP!!
                        Color colorObject = new Color(a,b,c);
                        setBackground(colorObject);
         public static void main(String args[])
              JFrame frame = new JFrame("Color Editor");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
              frame.add(new ColorEditor());
              frame.pack();
              frame.setVisible(true);
    }

    Okay now Eclipse is giving me a really funky error that I cannot quite figure out (in the compiler) but my program is running fine.... Can you help me with this too?
    Here is what the compiler is giving me....
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Green
    +     at java.awt.Color.testColorValueRange(Unknown Source)+
    +     at java.awt.Color.<init>(Unknown Source)+
    +     at java.awt.Color.<init>(Unknown Source)+
    +     at ColorEditor$TextFieldHandler.actionPerformed(ColorEditor.java:80)+
    +     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)+
    +     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)+
    +     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)+
    +     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)+
    +     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)+
    +     at java.awt.Component.processMouseEvent(Unknown Source)+
    +     at javax.swing.JComponent.processMouseEvent(Unknown Source)+
    +     at java.awt.Component.processEvent(Unknown Source)+
    +     at java.awt.Container.processEvent(Unknown Source)+
    +     at java.awt.Component.dispatchEventImpl(Unknown Source)+
    +     at java.awt.Container.dispatchEventImpl(Unknown Source)+
    +     at java.awt.Component.dispatchEvent(Unknown Source)+
    +     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)+
    +     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)+
    +     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)+
    +     at java.awt.Container.dispatchEventImpl(Unknown Source)+
    +     at java.awt.Window.dispatchEventImpl(Unknown Source)+
    +     at java.awt.Component.dispatchEvent(Unknown Source)+
    +     at java.awt.EventQueue.dispatchEvent(Unknown Source)+
    +     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)+
    +     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)+
    +     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)+
    +     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)+
    +     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)+
    +     at java.awt.EventDispatchThread.run(Unknown Source)+

  • How to configure a error queue for weblogic jms topic

    Hi guys.
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration Policy: Redirect
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.
    Any suggestions for this topic? Can anyone provide some helps or any useful links.
    Thanks in advance.
    Mingzhuang

    Mingzhuang
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
    Let me know if we are not on same page.
    Cheers
    Manoj

  • Get back the Message from JMS Topic

    Hi,
    I want to Process message came to the JMS topic (say for past 10 days) in PRODUCTION environment . Is there any way i can get those messages from Persistent Store(File/JDBC).Any sugesstions????
    thanks in advance...

    As far as I think you can not directly read messages from persistence store without putting the message integrity at stake.
    Also, do you know if the messages are actually in the persistence store? Messages will persisted by the Topic only if there is any durable subscriber is there which has not read those messages. If there are no durable subscribers or if all durable subscribers have read their copy of the message from Topic the messages will be removed from persistence storage.

  • Jms adapter not polling messages from jms topic

    Hi
    We have a jms adapter configured in BPEL process which need to poll messages from JMS topic.Unfortunately its not polling message from JMS Topic if we add Message Selector and Durable Subscriber properties in jca file.Please find jca file content below
    <adapter-config name="SyncCustomerPartyListCDHJMSConsumer" adapter="JMS Adapter" wsdlLocation="oramds:/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/CDH/V1/ProviderABCS/SyncCustomerPartyListCDHProvABCSImpl.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/jms/aia/syncCustomerParty_cf" UIJmsProvider="WLSJMS" UIConnectionName="Dev"/>
      <endpoint-activation portType="Consume_Message_ptt" operation="Consume_Message">
        <activation-spec className="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec">
          <!--property name="DurableSubscriber" value="XYZ"/-->
          <property name="PayloadType" value="TextMessage"/>
          <!--property name="MessageSelector" value="Target in ('XYZ')"/-->
          <property name="UseMessageListener" value="true"/>
          <property name="DestinationName" value="jms/aia/Topic.jms.COMMON.CustomerParty.PUBLISH"/>
        </activation-spec>
      </endpoint-activation>
    </adapter-config>
    If we remove Durable subscriber and message selector properties,its able to poll messages.
    Any pointer will help
    thanks in advance
    Baji

    After changing below property in jca file.JMS adapter is able to poll messages from JMS Topic.
    <property name="UseMessageListener" value="false"/>
    But if i un comment below line and deploy my code again, it stop pulling the messages from topic.
    <property name="DurableSubscriber" value="XYZ"/>
    If i bounce the server after above change and deployment ,it will start polling the message.I am not sure why i need to restart my server after adding above property.
    Thanks
    Baji

  • In iOS8, my third party keyboards are working with every app except for the standard "Messages" app.  How do I fix this issue?

    I recently updated to iOS8 and downloaded a few third party keyboards.  These keyboards are usable and available with all apps except for the "Messages" app.  The third party keyboards don't even show up as an option while typing a text message or an iMessage.  I have allowed these keyboards Full Access and have turn off Guided Access.

    Hey everyone in Apple world!
    I figured out how to fix the flashing yellow screen problem that I've been having on my MBP!  Yessssss!!!
    I found this super handy website with the golden answer: http://support.apple.com/kb/HT1379
    I followed the instructions on this page and here's what I did:
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    I went through the 6 steps above twice, just to make sure I got rid of whatever stuff was holding up my bootup process.  Since I did that, my MBP boots up just like normal.  No flashing yellow screen anymore!!   
    (Note that I arrived at this solution when I first saw this page: http://support.apple.com/kb/TS2570?viewlocale=en_US)
    Let me know if this works for you!
    Elaine

  • Preparing Video for display message

    So starting within the last three days I have been having issues with a 'Preparing video for display' message/progress bar coming up whenever I move clips in a timeline, the same message that usually only comes up when a project is being loaded for the first time. This was never something I have had to deal with before, and each time it happens I have a three to five second delay for it to do whatever it is that it is doing. (It adds up.) Is this something that is supposed to happen or can I (please) make it stop somehow.
    Thanks for the help.
    .ryan.

    Im running with 1 1/2 gigs RAM right now, cutting in FCP 5.0.4
    There are usually between 2-5 layers of video in play, but never more than two at once (no overlays or mattes, just straight cuts right now.)
    Maybe it is just the project is getting too large for the RAM i have, and I need to buy more. I was hoping to avoid this as I have spent pretty much everything I have, but if it saves me bursting a capillary, I'll do it.

  • Registering for a Topic with own stream & queue in Pub/Sub

    Hi *.
    I'm working with MQSeries 5.3 on WinXP.
    I don't know, how to register a subscriber to a topic with the JMS-classes. I found a sample from IBM, but it uses the native (MQ)classes and it does not work, when I try to register an own queue or stream. Everything works fine with system-queues/streams, but I shouldn't work with the defaults in my application.
    Does anybody know, where I can find a sample to register a subscriber to a topic, which is based on JMS ?
    Thank you very much in advance.
    Jo

    Yes, the script is provided by IBM when you install the java for mqseries for websphere MQ. It is under MQ_JAVA_INSTALL_PATH/bin directory called MQJMS_PSQ.mqsc.
    I am copying the contents of the file if you want:
    * IBM Websphere MQ Support for Java Message Service */ */
    * Sample MQSC source defining JMS Publish/Subscribe queues. */
    * Installation Verification Test - Setup script */
    * Licensed Materials - Property of IBM */
    * 5648-C60 5724-B4 5655-F10 */
    * (c) Copyright IBM Corp. 1999. All Rights Reserved. */
    * US Government Users Restricted Rights - Use, duplication or */
    * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.*/
    * JMS Publish/Subscribe Administration Queue */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.ADMIN.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - admin queue') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Non-Shareable
    NOSHARE
    * JMS Publish/Subscribe Subscriber Status Queue */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.PS.STATUS.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - PS status queue') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED)
    * JMS Publish/Subscribe Report Queue */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.REPORT.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - Report queue') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED)
    * JMS Publish/Subscribe Subscribers Model Queue */
    * Create model queue used by subscribers to create a permanent */
    * queue for subsciptions */
    * General reply queue */
    DEFINE QMODEL('SYSTEM.JMS.MODEL.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - Model queue') +
    * Queue Definition Type
    DEFTYPE(PERMDYN) +
    * Shareable
    SHARE DEFSOPT(SHARED)
    * JMS Publish/Subscribe Default Non-Durable Shared Queue */
    * Create local queue used as the default shared queue by */
    * non-durable subscribers */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.ND.SUBSCRIBER.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - PS ND shared queue') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED) +
    * Maximum queue depth
    MAXDEPTH(100000)
    * JMS Publish/Subscribe Default Non-Durable Shared Queue for */
    * ConnectionConsumer functionality */
    * Create local queue used as the default shared queue by */
    * non-durable connection consumers */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - PS ND CC shared q') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED) +
    * Maximum queue depth
    MAXDEPTH(100000)
    * JMS Publish/Subscribe Default Durable Shared Queue */
    * Create local queue used as the default shared queue by durable */
    * subscribers */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.D.SUBSCRIBER.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - PS D shared queue') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED) +
    * Maximum queue depth
    MAXDEPTH(100000)
    * JMS Publish/Subscribe Default Durable Shared Queue for */
    * ConnectionConsumer functionality */
    * Create local queue used as the default shared queue by durable */
    * connection consumers */
    ** Create a local queue
    DEFINE QLOCAL('SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE') REPLACE +
    DESCR('Websphere MQ - JMS Classes - PS D CC shared q') +
    * Persistent messages OK
    DEFPSIST(YES) +
    * Shareable
    SHARE DEFSOPT(SHARED) +
    * Maximum queue depth
    MAXDEPTH(100000)

Maybe you are looking for

  • Where can I download a Windows 8.1 iso for Bootcamp?

    I bought Windows 8.1 Pro Retail, but my MacBook Pro doesn't have a DVD drive, and on Microsoft's website I could only find a download section for users who are already on Windows and want to upgrade. I got a valid key, I just need the iso for Bootcam

  • Create document set by workflow based on external list

    Hello, I'm wondering if the following is possible: I have a external list with all my projects. Next to that i have an document library where i place all the documents about the projects in document sets. Is it possible to automatically create the do

  • Third Party PO "No direct postings can be made to G/L"

    Hi, I am not able to create a PO from a Sales order/Pur.Req. and receive this error message "No direct postings can be made to G/L acct. 401201 in CoCode 0015. Message no. ME038. The G/L account you entered is a control account. Transactions cannot b

  • ICloud Photos beta: how to manage what photos show up on my AppleTV?

    How do I manage what photos show up on my AppleTV? With the old system, I would delete photos from my Photo Stream that I didn't want to show up on my AppleTV. I don't necessarily want to permanently delete the photos, though. Is there some easy way

  • High-load sql statement using v$sql

    Hi, Can any one please tell me, how do we find high load sql statement and it's user from v$SQL view. what is the query to find it. Thank you!