How to bind Temporary Queue to Context in FioranoMQ

I have two JMS clients sending messages to each other via FioranoMQ.
And one client creates a temporary queue, for example
Temporary Queue auction1Queue = qSession.createTemporaryQueue();
My question is how to bind this auction1Queue to Context? so that the client on the side can lookup
I don't use the usual way of set/getJMSReplyTo() to message because it will change the logic of my program.
With SonicMQ, I just simply bind it like this
jndi.bind("auction1", auction1Queue);
then the other side just need to jndi.lookup("auction1")
and with ActiveMQ it is even simpler
Both side just need to lookup for the same name like that
jndi.lookup("dynamicQueues/auction1");
http://activemq.apache.org/jndi-support.html
But FioranoMQ does not support both of the above operations.
I don't really know how to do the same thing with FioranoMQ.
Hope that somebody can help me.
Thank you very much
Edited by: dannytrinh1 on Apr 16, 2009 5:53 AM

How to look up for temporary queue by using temporary queue name using JNDI context. I am getting lookup faild error" for temporary queue. While trying to bind this temporary queue name to jndi , it is throwing an exception as: notsupported exception. I am using ActiveMQ 5.2.
See below sample code...
tq = session.createTemporaryQueue();
jndiContext.bind("queue.MyTempQueue",tq);

Similar Messages

  • How to bind UI Element with Context Node Attribute Element

    Hi,
    I'm building my view dynamically in the wdDoModifyView method.
    Is it possible to bind a "TextView" element to a specific element of an attribute node?
    Scenario:
    Node_Employees
    |
    +- Attribute_Code
    |
    +- Attribute_Name
    Node Contents:
    Employees
    |
    +- Code: 1, Name: Employee 1
    |
    +- Code: 2, Name: Employee 2
    |
    +- Code: 3, Name: Employee 3
    I need to do something like binding a TextView UI element to the "Name" attribute of the element #2, what would result to show "Employee 2" on my view.
    How can I do this?
    Thanks in advance,
    Geraldo.

    Hi Saravanan,
    First I populate the context node and it won't change during view's lifecycle.  After that, I build my view and bind the TextView UI elements to the node context attributes elements.
    If the node has 10 elements, I will build 10 TextView UI elements and bind them to each attribute element.
    Regards,
    Geraldo Brígido.

  • How to bind a UI element to the context

    Hi Experts,
               I have a problem binding UI element to the context. In my code i have to create TabStrips dynamically and under this tabstrip number of UI elements would be there. For this i have a code like this..
    IWDTransparentContainer theActionContainer =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         IWDTabStrip ts = (IWDTabStrip) view.createElement(IWDTabStrip.class,"TabStrip");
              IWDTab tab1 = (IWDTab) view.createElement(IWDTab.class,"Tab1");
              IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
              IWDCaption header1 = (IWDCaption) view.createElement(IWDCaption.class,"Header1");
              header1.setText("Tab1");
              tab1.setContent(in);
              ts.addTab(tab1);
              IWDTab tab2 = (IWDTab) view.createElement(IWDTab.class,"Tab2");
              IWDInputField in2 = (IWDInputField) view.createElement(IWDInputField.class,"in2");
              IWDCaption header2 = (IWDCaption) view.createElement(IWDCaption.class,"Header2");
              header2.setText("Tab2");
              tab2.setHeader(header2);
              ts.addTab(tab2);
              theActionContainer.addChild(ts);
    <b>when i run this code it is giving following exceptions..</b>
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
        at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
        ... 63 more
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
         at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripItemContentFragment(TabStripRenderer.java:1867)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripFragment(TabStripRenderer.java:838)
    From these exceptions what  i understood is, i need to bind these UI elements to context.
       Can any body tell me how to bind a UI element to the context if I understood the exceptions correct..
    Thanks in Advance,
    Murthy.

    HI,
    lets say Ctx is your context attribute,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getAttribute("Ctx");
    then , as per your code,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    if your contex attribute is child of some other node then do like this,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getChildNode("SalesOrder",0)getAttribute("Ctx");
    //this is when Ctx is child of node SalesOrder, and we are taking Ctx from its 0th element
    then ,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    include this in your code ,
    let me know if you face any problem
    regards
    reward points if it helps

  • MDBs responding via Temporary Queue

    Hello,
    I've been attempting to get this working in test code, but i seem to be missing something. I want a message producer to send a message to an administered queue, have the message processed by a Message Driven Bean, and have the bean post a response back to a temporary queue that was setup in the original producer. All over the net i find statements that this can be done and is reasonably normal, but i have not found a single code snippet to this effect, nor can i apparently get it to work on my own. I am using JMS with J2EE 1.3 on websphere 5.0.
    Within the message producer, i create the temporary queue and pass it in the JMSReplyTo field.
    <code>
    TemporaryQueue tempq = queueSession.createTemporaryQueue();
    message.setText("Temporary Queue Test Message");
    message.setJMSReplyTo(tempq);
    queueSender.send(message);
    </code>
    The MDB sees the message and onMessage is called normally. From within the MDB code, i have the temporary queue object (i print out the name of the queue in the message ReplyTo field with toString() to confirm) and i have the MDB context from getMessageDrivenContext() supplied by javax.ejb. Unfortunately, javax.ejb.MessageDrivenContext is not the same or similar to javax.naming.Context.
    To send a message, i need the send() method from the QueueSender interface, which is generated from the QueueSession interface, which is generated from the QueueConnection interface, which is generated from a QueueConnectionFactory, and is ultimately reliant upon javax.naming.Context. So, i have the (temporary) queue object, but see no method to put a message on it for consumption by the creator of the temporary queue. (messages on temporary queues can only be consumed by the creator of said queue. if no other producer can use it, too, perhaps i am missing the point on temporary queues)
    I can easily get the MDB to fire off messages to other administered queues. How do i get it to respond with a message on a temporary queue?
    Could somebody please enlighten me?
    thanks,
    cam

    Thanks Andreas, your answer sent me off on new trails to read, but something is still missing. I hope that you (or anybody else) is able to see what i do not.
    Your code was J2EE 1.4 (beta), but Websphere 5.0 still uses J2EE 1.3.1. I was able to translate most of your code back to the older form but some doesn't fit, which may be part of my problem (as shown below).
    I have connection factories and queues already setup on the server. they work fine as far as all other non-temporary queue usage is concerned.
    Using your code, here's some of the problems i have crossed while trying to sort this out
    public void onMessage(Message inMessage)
      Destination dest = (Destination) ctx.lookup("jms/t0");
      MessageProducer producer = session.createProducer(dest);
      producer.send(msg);
    }My first question is how are you looking up a temporary (i.e. dynamically created) queue with some hard-coded string ("jms/t0")? I assume that your string was meant to be arbitrary but it must still represent the destination, which is the temporary queue that doesn't have a hardcodable name (AFAIK). I have tried using the name inMessage.getJMSReplyTo().toString(), which in my case gives me "queue://WAS_localhost_server1/AMQ.10000009?persistence=1", but this only throws a NamingException (not found) when trying to do a lookup() on it.
    If you already had the Destination object from inMessage.getJMSReplyTo().toString(), why would you bother to go through a String lookup just to get the object again? (for use in the createProducer() call)
    To get past the above naming exception, i commented out the Destination getting line and used the object from the getJMSReplyTo() message method. In 1.3.1, the equivalent Producer line looks like:
    QueueSender producer = session.createSender(replyTo);which is pretty much like what i already had. Unfortunately, an error is reported that it is unable to open the specified queue. (J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$MyMDBConnectionFactory$JMSManagedConnection@580144656. The exception which was received is MQJMS2008: failed to open MQ queue)
    I double checked to make sure both the creator of the temporary queue and the MDB were both using the same administered Connection Factory. They are. I don't know if it's relevant.
    Any further ideas?
    Thanks,
    cam

  • How to bind dynamic data to JNet

    Develop tools: NWDS 7.1
    Server: Windows2000
    Does anyone have experiences with using JNET within Webdynpro Project ?
    In our case, we use JNet to generate a hierachical network diagram in the Webdypro's GUI. The data source is from the tables in a DB. However, till now, we only know how to let JNet generate the network diagram from a static XML file.
    Since the data in the DB changes all the time, how to let the network diagram reflect the newest data status automatically? That is, how to bind JNet to a dynamic data source then?

    Hi,
    Network UI element is related with Jnet. What you need to start up working with this is you need to create a context structure mentioned below.
    Node:Source
    Element--- xml -> this should be of type binary.
    Place the following code in the init.
    ISimpleTypeModifiable mod = wdContext.nodeSource().getNodeInfo().getAttribute("xml").getModifiableSimpleType();
    IWDModifiableBinaryType bin = (IWDModifiableBinaryType)mod;
    bin.setMimeType(new WDWebResourceType("xml", "application/octet-stream", false));
    ISourceElement element =wdContext.nodeSource().createSourceElement();
    wdContext.nodeSource().addElement(element);
    try
    fileName = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "jnettest.xml");
    element.setXml(readFile(fileName));
    catch (WDAliasResolvingException e)
    You have to place the Jnet test.xml under the mimes folder of your application.
    Place the network element in the view and in the data source specify the context attribute source.xml
    if your xml file complies with the jnet schema your application will render it.
    Pl go through this
    Using the "Network" UI Element
    Regards
    Ayyapparaj

  • When Broker Restarts None of the Temporary Queues Are Created

    Somehow when the broker restarts none of the temporary queues are getting recreated. The queues were created successfully the 1st time and the applications were happily exchanging messages. Things just fall apart when the broker restarts.
    I'm able to reproduce this problem consistently by doing the following:
    1. Start imqbrokerd (mq start)
    2. Start client application
    3. Shutdown imbrokerd (mq stop)
    4. Start imqbrokerd (mq start)
    After the producers in the client application have reconnected the following messages are displayed in the console. I'm only able to get the client app to work again is if I restart the client apps.
    [02/Mar/2009:23:01:01 CST] attempting to set Message Bytes Limit to 10485760K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
    [02/Mar/2009:23:01:01 CST] attempting to set Message Size Limit to 10240K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
    [02/Mar/2009:23:01:01 CST] [B1065]: Accepting: [email protected]:57123->jms:37646. Count: service=9 broker=9
    [02/Mar/2009:23:01:01 CST] [B2083]: Unable to create destination temporary_destination://queue/192.168.20.14/49823/1 [Queue], autocreation is forbidden
    Do you guys have any idea on what's going on? Does anybody know of an existing workaround?
    Environment:
    - OpenMQ 4.3
    - CentOS 5.2
    - Sun JDK 1.6_05
    - Spring 2.5.5
    - Camel 1.3.0
    I also looked at the code and found only one location where the error message is used. I still need to figure our how I can get the conditional expression to evaluate to false.
    share/java/com/sun/messaging/jmq/jmsserver/core/Destination.java
    1395 if (!DestType.isAdmin(type) && !canAutoCreate(DestType.isQueue(type),type) && !BrokerMonitor.isInternal(destination)) {
    1396 throw new BrokerException(
    1397 Globals.getBrokerResources().getKString(
    1398 BrokerResources.W_DST_NO_AUTOCREATE,
    1399 getName()),
    1400 BrokerResources.W_DST_NO_AUTOCREATE,
    1401 (Throwable) null,
    1402 Status.FORBIDDEN);
    -bash-3.2$ /tmp/openmq-4.3/mq/bin/imqcmd query bkr -t q -n MYQUEUE -u admin
    Password: admin
    Querying the broker specified by:
    Host Primary Port
    localhost 7676
    Version 4.3
    Instance Name imqbroker
    Broker ID
    Primary Port 7676
    Broker is Embedded false
    Instance Configuration/Data Root Directory /tmp/openmq-4.3-data/var/mq
    Current Number of Messages in System 202
    Current Total Message Bytes in System 317483
    Current Number of Messages in Dead Message Queue 201
    Current Total Message Bytes in Dead Message Queue 316444
    Log Dead Messages true
    Truncate Message Body in Dead Message Queue false
    Max Number of Messages in System unlimited (-1)
    Max Total Message Bytes in System unlimited (-1)
    Max Message Size 70m
    Auto Create Queues true
    Auto Create Topics true
    Auto Created Queue Max Number of Active Consumers unlimited (-1)
    Auto Created Queue Max Number of Backup Consumers 0
    Cluster ID
    Cluster is Highly Available false
    Cluster Broker List (active) mq://192.168.1.123:7676/
    Cluster Broker List (configured)
    Cluster Master Broker
    Cluster URL
    Log Level DEBUG
    Log Rollover Interval (seconds) 604800
    Log Rollover Size (bytes) 268435456
    Successfully queried the broker.
    I also tried versions 4.4 and 4.2 and received the same behavior :(

    The application is inside an app server but we're not using a resource adapter as we're using Spring and Camel to hide the JMS details. Spring (JMSComponent) manages the connection directly. (We current don't have any JMS connection pooling as well.)
    <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    </bean>
    <bean id="jmsConnectionFactory" class="com.norvax.framework.jms.OpenMQConnectionFactory">
    <property name="openmqBrokerConfiguration">
    <props>
    <prop key="imqBrokerHostName">$remoting{openmq.hostName}</prop>
    <prop key="imqBrokerHostPort">$remoting{openmq.hostPort}</prop>
    <prop key="imqReconnect">true</prop>
    </props>
    </property>
    </bean>
    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    </bean>
    I'm going to write a very basic producer using Spring without using Camel and see if I'll get the same behavior. I'd like to see if the way Camel uses JMS is what's making OpenMQ broker to deny creation of temporary queues.
    Thanks,
    Jeff

  • I don't understand how to bind a node

    Hi guys
    I don't understand how to bind a node
    I want to bind a mandatory parameter for my model (ex: Bapi_Delete_Travel_Expense_Input)
    if  the parameter is a node ,not a attribute,how to bind it I don't understand yet.
    Please give me some suggest
    Thanks
    Best Regards
    Yan

    Context--
    Z_Hr_Ess_Delete_Travel_Expense_Input (node)
    Framedata (node)  
    Outpute   (node)
    Employeenumber (attribute)
    Tripno (attribute)
    The Framedata's structure is Bapitrmian
    The mandatory parameter is " Framedata" ,  "Employeenumber "  , "Tripno"
    The  Framedata  need  through other  RFC "Z_Hr_Ess_Read_Travel_Details_Input"   to get  
    Context--
    Z_Hr_Ess_Read_Travel_Details_Input
    Output  (node) 
    Framedata (node) 
    Employeenumber (attribute)

  • Temporary queue problem

    Hi,
    I cannot create a receiver for the temporary queue. It throws "Invalid Destination"
    exception. I disassembled the session class and the reason is the session class casts the
    temporary query to Query and it throws null pointer exception as the temporary queue does not extend this
    interface. The code I used is written as I had read in Sun's JMS tutorial, why it does not work?
    Context ctx = new InitialContext();
    QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("jms/QueueConnectionFactory");
    QueueConnection connection = factory.createQueueConnection();
    QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    Queue tempQueue = session.createTemporaryQueue();
    QueueReceiver receiver = session.createReceiver(reportQueue); <-- this is the place where the exception is thrown
    receiver.setMessageListener(new ReportQueueListener());
    connection.start();
    Exception:
    javax.jms.InvalidDestinationException: Invalid queue
         at com.evermind.server.jms.EvermindQueueSession.createReceiver(EvermindQueueSession.java:145)
         at com.evermind.server.jms.EvermindQueueSession.createReceiver(EvermindQueueSession.java:134)
    Thanks, Zbynek
    P.S. I found similar questions in this forum but no answer ???

    You already have a reference to the Queue from msg.getJMSReplyTo(). There
              should be no need to look it up again.
              I don't think you are supposed to be able to look up a temporary queue in
              this fashion anyway.
              Bob
              "Chuck Kiefriter" <[email protected]> wrote in message
              news:3d209522$[email protected]..
              >
              > I send an object message to a queue with the JMSReplyTo set to a temporay
              queue the
              > client uses to sit and listen for a response. When the MDB tries to do a
              lookup
              > on the temporary queue to send a response, it gives me the following
              error:
              >
              > javax.naming.NameNotFoundException: Unable to resolve
              eDailiesJMSServer.TemporaryQueue56
              > Resolved: '' Unresolved:'eDailiesJMSServer' ; remaining name
              'TemporaryQueue56'
              > <<no stack trace available>>
              >
              > I checked in the WebLogic console while the client was still listening for
              a response
              > and it shows a temporay queue up and running called
              eDailiesJMSServer.TemporaryQueue56
              >
              > Is there something else I should do to resolve the JNDI name? I used the
              following
              > code in the MDB to get the temporary queue name:
              >
              > (Queue)msg.getJMSReplyTo()).getQueueName()
              >
              > Any ideas?
              >
              

  • OTMQ- Issue on creating temporary Queues

    Hi,
    I'm experiencing some issues when trying to create a temporary queue by using Oracle Tuxedo Message Queue. What is happening is:
    1- I call tpqattach without any queuename and setting the qattachctl parameters:
         qattachctl.attachmode = TMQ_ATTACH_TEMPORARY;
        qattachctl.qtype = TMQ_ATTACH_PQ;
    2- The tpqattach runs successfully (return is different than -1) but it does not set my queue name with the temporary queue name that has been assigned for my process.
    Is there any parameter that I'm missing in order to create a temporary queue? How can I get the temp queue name?
    Thanks in advance,
    Brunno Attorre

    Hey Bob,
    Thanks for the answer!
    That's exactly it.
    Thank you,
    Brunno Attorre

  • MDB for Temporary Queues?

    I have a need for MDB functionality on temporary queues (either with an actual MDB, or by doing the functionality myself, inside the app server). Is that possible?
    The context is as follows:
    An application is deployed to multiple application servers. The application recceives requests that are session oriented. In other words, after the first message of a sequence, subsequent messages from the original sender must go to the same instance that received the first request.
    Hence the goal is to have a queue, unique to the instance, dynamically created (to avoid administrative headaches), that is used to receive the subsequent messages. That queue needs to have multiple consumers on it, each in its own session for parallelism.
    This is sort of like to the standard synchronous messaging pattern, except that the replyTo queue is send on the reply and used on subsequent requests. Also, the application needs to be able to handle a number of these at once (separate threadds).
    Thoughts?

    The broker property imq.autocreate.destination.useDMQ (default set to true) controls whether to use DMQ for temporary destinations as well as for all auto-created destinations. Alternatively you can control at per message level before sending to a destination whether the message should use DMQ by setting the boolean property "JMS_SUN_PRESERVE_UNDELIVERED" (set to false to not use DMQ) to the message.

  • Temporary Queue - Multithreaded Consumption?

    I would like to create a single temporary queue, and then have multiple message listeners to process messages from it in parallel (i.e. using multiple JMS threads)
    Is this doable? Are there any gotchas?
    Will the following work?
    Tks
    Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
    javax.jms.Queue tq = session.createTemporaryQueue(); then
    In loop:
    for ( int i = 0 ; i < numListeners ; i++ ) {
         // Session comes with new thread
       Session ses = connection.createSession(...);
       MessageConsumer con = session.createConsumer(tq );
       // listener for that thread
       con.setMessageListener(new MyMessageListener());

    I still am having problems creating a consumer. The following test code gets a Naming Exception looking up the temporary queue. If I use the tempQueue object itself, it fails because the object belongs to a different connection.
    Note: this code is being invoked by a ServletContextListener.
    protected void doTest() throws Exception {
        Context ctx = new InitialContext();
        queueConnectionFactory = (QueueConnectionFactory) ctx.lookup("jms/queueConnectionFactory");
        sendCon = queueConnectionFactory.createQueueConnection();
        sendCon.start();
        sendSession = sendCon.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue tempQueue = sendSession.createTemporaryQueue();
        tempQueueName = tempQueue.getQueueName();
        logger.info("Temp Q Name:"+tempQueueName);
        producer = sendSession.createProducer(tempQueue);
        rcvCon = queueConnectionFactory.createQueueConnection();
        Session rcvSes = rcvCon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        logger.info("Looking up queue:"+tempQueueName);
        Queue dest = (Queue)ctx.lookup(tempQueueName); // <<<<<FAILS - NAMING EXCEPTION     
        MessageConsumer consumer =     rcvSes.createConsumer(dest)
        rcvCon.start();
        consumer.setMessageListener(new MyMessageListener(me, "Test"));
        TextMessage msg = sendSession.createTextMessage("Test message");
        producer.send(msg);
    }Looking up queue:temporary_destination://queue/138.113.193.36/52744/1
    javax.naming.NameNotFoundException
    at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:268)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:191)
    at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
    at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at TesterThreadUsingTempQueue.doTest(TesterThreadUsingTempQueue.java:112)

  • Example of using Temporary Queue

    **Plz tell how temporary queue can be created and used by sender and receiver to communicate with each other.
    **Will it will be feasible if single queue is used by clients with ID attached with each message.
    Thanx

    **Plz tell how temporary queue can be created and
    used by sender and receiver to communicate with each
    other.Have a look at:
    http://java.sun.com/j2ee/1.4/docs/api/javax/jms/QueueSession.html#createTemporaryQueue()

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • How to bind two Items?

    Hello,
    on my page I have 2 items:checkbox and text area. How to bind its work processes together? For example, when checkbox is checked then Text area is disable and when not then enable.
    Thanks' for help.
    Karina.

    hi karina--
    this, too, is javascript question. please see my answer to your previous post...
    Multiselect list (LOV)
    ...regards,
    raj

  • How to clear outbound Queue in  SXMB_MONI

    HI Experts,
    Unable to process the file in SXMB_MONI as a result the files are getting strucked with the QUEUE and now how to clear this queues for processsing the file...
    and another i have configure the server with 611 client but while executing the client of the server is showing 001 and we didn't observe initially as it is working fine but when we observed now it is found
    is this has an impact..
    do we need to do any other certain configurations at the Server end..
    regards,
    Kishore

    > There is no URL in SXMB_ADM, how to provide an url there, and even before we didn't get this problem as the files are successfully processsing for the past 3 months in PDN, and now we are getting this problem.
    >
    Hello,
    I have understood your problem but you are not following the steps which we are mentioning here.
    For your above problem you need to follow ONLY step no1 & 2 mentioned in the blog since steps are common for acitvating the proxy and thats way you are getting confused that why I am asking you to follow that blog.
    In the blog step 1 will simply help you creat the RFC destination.
    Step 2 will help you to use the above RFC destinaiton as an url.
    In opionion if you resolve this problem first then it will be easier to solve your queue problem.
    Please let me know if you need more help/clarification in this regard i will help you.
    Regards,
    Sarvesh

Maybe you are looking for

  • ITunes for Windows 8 does not see iPhone and iPad

    In my HP Envy notebook, iTunes (last version) does not connect to iPhone and iPad. Note that the PC connects to both. Only iTunes does not. I think this version of iTunes for windows does not use the correct USB driver.

  • How to configure MSI RG54SE II as Access Point ?

    I have an msi router: Firmware Version:    3.5.2 Build 070402 Rel.60023n Hardware Version:    RG54SE II v1 081520C2 And i want it to configure it as an access point to a wireless network/ or another access point . Can you help me on how i do this ? R

  • Changing links? Multi-file find-and-replace?

    So Dw has some sort of global link change tool, doesn't it? If I want to change "assets/video/banner.gif" to "assets/animation/banner.gif" everywhere it occurs in all of my local files -- how would I do that? Thanks!

  • How to crash WMI in 2008 server

    Friends, how to crash WMI manually for testing purpose. The following steps i have done but once i started the WMI console, it automatically recover the data :( Help me friends. 1. Stopped the WMI service, opened the objects.data file in notepad, del

  • Selected Set codes problem in QS41

    Dear Experts I am working in a support environment. I need to change the description of selected set code which has already created in QS51. The problem here is, the codes under a particular code group is shown in QS51 but it is missing in QS41. Norm