Need the JNDI name for Destinations present in JMS Modules

Hi all,
I need JNDI`s of all the Destinations present in JMS Modules. With this code i am able to get all info about the JMS Modules, Destinations and as well as information about messages, but still not able to extract JNDI of Destination. Can some one give me pointer on this ?
try {
JMXServiceURL serviceUrl =
new JMXServiceURL(
"service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.runtime");
System.out.println("Connecting to: " + serviceUrl);
Hashtable env = new Hashtable();
env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
"weblogic.management.remote");
env.put(javax.naming.Context.SECURITY_PRINCIPAL, "weblogic");
env.put(javax.naming.Context.SECURITY_CREDENTIALS, "welcome1");
jmxCon = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
jmxCon.connect();
MBeanServerConnection con = jmxCon.getMBeanServerConnection();
Set<ObjectName> mbeans = con.queryNames(queryObjectName, null);
for (ObjectName mbeanName : mbeans) {
String temp = mbeanName.toString();
System.out.println(temp);
String[] mBeanAttributes = {"Name", "DestinationType", "MessagesCurrentCount",
"MessagesPendingCount", "MessagesReceivedCount", "MessagesHighCount" };
queryObjectName = new ObjectName("*:*,Type=JMSDestinationRuntime");
mbeans = con.queryNames(queryObjectName, null);
for (ObjectName mbeanName : mbeans) {
AttributeList attributes = con.getAttributes(mbeanName, mBeanAttributes);
System.out.println((Attribute) attributes.get(0)+ "" +
(Attribute) attributes.get(1)+
(Attribute) attributes.get(2)+
(Attribute) attributes.get(3)+
(Attribute) attributes.get(4)+
(Attribute) attributes.get(5));
String temp = mbeanName.toString();
ObjectInstance inst = con.getObjectInstance(mbeanName);
System.out.println(temp);
finally {
if (jmxCon != null)
jmxCon.close();
But Nowhere i am getting the JNDI of destination Queues or Topics.
Edited by: mdev on Feb 21, 2012 5:21 PM

You are accessing the runtime mbean of a JMS destination. The JNID name of a destination is not available on the runtime destination MBean.
If you are using jms-system-resource to deploy your JMS module, you should be able to access the deployment mbean of the destination. The starting MBean for JMS is JMSSystemResourceMBean in this case.

Similar Messages

  • I NEED THE TABLE NAME FOR THE  FIELD DESCRIPTION GIVEN!

    I NEED THE TABLE NAME FOR THE  FIELD DESCRIPTION GIVEN!
    Partner Type
    Partner Type Desc
    Partner no
    Partner Name
    Partner Address 1
    Partner Address 2
    Partner Address 3
    Partner Address 4

    Hi Jyotirmoy ,
                        You can get all partners and their type in table EDPP1, depending of the partner type you need to go to specific table for address and other details, like for partner type KU(customer) goto KNA1,etc for partner type LI(vendor) goto LFA1 etc for partner type B(bank) goto BNKA etc ....
    Sirish

  • Format of the JNDI name for lookup in DataSource

    Hi
    a) I have made a datasource in Weblogic 10.3 called SQL and its JNDI name as jdbc/SQLDS.
    The driver was BEA'S Type 4 Driver for MS SQL Server
    Now I am trying to lookup the datasource through an application. I have used the following
    lines of code:
    InitialContext context = new InitialContext();
    DataSource ds = context.lookup("jdbc/SQLDS");
    Connection conn = ds.getConnection();
    The Application was a success.
    I saw in some articles that you can refer to the datasource by even java:comp/env/jdbc/SQLDS,
    instead of just jdbc/SQLDS. I tried both ways and I was able to run the application.
    b) Then I made another datasource in Weblogic 10.3 called SQL1 and its JNDI name as jdbc/SQL1.
    The driver was MS SQL Server Type 4 Driver for versions 2000, 2005
    Now I am trying to lookup the datasource through an application. I have used the following
    lines of code:
    InitialContext context = new InitialContext();
    DataSource ds = context.lookup("jdbc/SQL1");
    Connection conn = ds.getConnection();
    The Application was a success.
    I saw in some articles that you can refer to the datasource by even java:comp/env/jdbc/SQL1,
    instead of just jdbc/SQL1. I tried the first way and it didnt work. It gave me a NullPointerException
    at the line Connection conn = ds.getConnection();
    c)Then I made a 3rd datasource in Weblogic 10.3 called SQL2 and its JNDI name as jdbc/SQL2DS.
    The driver was MS SQL Server Type 4 Driver for versions 2000, 2005
    Now I am trying to lookup the datasource through an application. I have used the following
    lines of code:
    InitialContext context = new InitialContext();
    DataSource ds = context.lookup("jdbc/SQL2DS");
    Connection conn = ds.getConnection();
    The Application was a success.
    I saw in some articles that you can refer to the datasource by even java:comp/env/jdbc/SQL2DS,
    instead of just jdbc/SQL2DS. I tried the first way and it didnt work. Again, it gave me a NullPointerException
    at the line Connection conn = ds.getConnection();
    I was confused why the 2nd and 3rd way didnt work . Is it becaue I used Microsoft's MS SQL Server Type 4 Driver?
    I have added the jar file in the WEBLOGIC_CLASSPATH. Why is it not recognising java:comp/env/jdbc/SQL2DS ?
    I would be grateful if somebody could give me ideas on this...
    Thanks
    Neeti

    To use application scoped or indirect JNDI lookups (i.e. java:comp/env/...) you usually need to define a &lt;resource-ref&gt; entry in your deployment descriptor(s). Not sure what type of application you are using to test (web-app, EJB,) but for java:comp/env/ lookups to work, you need to define resource references. The fact that your first test succeeded is somewhat strange. Without the resource reference definitions, I would have expected your JNDI lookups to fail with a NamingException instead of the lookup returning NULL for the datasource.
    Assuming you are doing your test from a web-app, you need to add &lt;resource-ref&gt; definitions to your web.xml file similar to the following:
    &lt;resource-ref&gt;
    &lt;res-ref-name&gt;*jdbc/SQL2DS*&lt;/res-ref-name&gt;
    &lt;res-type&gt;java.sql.DataSource&lt;/res-type&gt;
    &lt;res-auth&gt;Container&lt;/res-auth&gt;
    &lt;/resource-ref&gt;
    and then add &lt;reference-descriptor&gt; definitions to your weblogic.xml file similar to the following:
    &lt;reference-descriptor&gt;
    &lt;resource-description&gt;
    &lt;res-ref-name&gt;*jdbc/SQL2DS*&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;*jdbc/SQL2DS*&lt;/jndi-name&gt;
    &lt;/resource-description&gt;
    &lt;/reference-descriptor&gt;
    Once you do these steps your lookup("java:comp/env/jdbc/SQL2DS") should function properly from within your web-app.

  • Need the API Name for OPM tables

    Hi,
    I need the public / private API to populate data into the following Tables.
    Table Name :
    QC_SPEC_MST
    QC_SMPL_MST
    QC_RSLT_MST
    I didnt get any reference from Metalink.
    Can anyone help us to identify the API or any workaround to solve this ?
    Thanks & Regards,
    Anik Datta

    Hi Anik;
    All APIs are listed in Oracle Integration Repository
    http://irep.oracle.com/index.html
    API User Notes - HTML Format [ID 236937.1]
    R12.0.[3-4] : Oracle Install Base Api / Open Interface Setup Test [ID 427566.1]
    Oracle Trading Community Architecture API User Notes, June 2003 [ID 241320.1]
    Technical Uses of Customer Interface and TCA-API [ID 269121.1]
    Pelase also check below:
    Api's in EBS
    Re: Api's in EBS
    http://sairamgoudmalla.blogspot.com/2009/05/script-to-find-oracle-apis-for-any.html
    API
    Fixed Asset API
    List of API
    Re: List of APIs
    Oracle Common Application Components API Reference Guide
    download.oracle.com/docs/cd/B25284_01/current/acrobat/jta115api.pdf
    List of APIs and open interface R12
    Re: List of APIs and open interface R12
    Regard
    Helios

  • Need the SMARTFORM name for Purchase Order in ECC 6.0

    Hi experts,
              I have been working on ECC 6.0 version and I need your help in finding out the name of the SMARTFORM for Purchase Order. Please let me know the SmartForm name if anybody knows. Waiting for your replies.
    Regards,
    Ravi

    HI,
    We have the Smartforms in the Service.sap.com, you need to download from this one. in our SAP we do not have these smartforms .
    smartform name is /smb40/mmpo_l. Look at the SAP Note 695891
    Look at the below link
    Re: PURCHASE ORDER SMARTFORM   IN ECC 6.0
    <i>Mark all the helpful answers</i>
    Regards
    Sudheer

  • How to get the JNDI name of an EJB from within itself

    Hello,
    I'm trying to find a way to get the JNDI name of a session bean from
    within itself.
    In the application I'm working on we need to support multiple
    customers. In order to do that, each EJB has a normal home and remote
    interface, a base class bean implementation and different children
    bean implemetations for each customer (when the logic for the
    customers is different). JNDI is used to get the proper implementation
    based on the customer.
    I've got an EJB that provides some services that are the same for all
    customers, except for the fact that it contains one variable that
    should have a different value depending on the customer. I don't want
    to creat subclasses just for that. What I want is to be able to get
    the JNDI name and set the variable based on the it.
    Is there a way to get the JNDI name for the EJB from within itself?
    TIA
    MJ

    Hi Pradeep,
    Please try referring to this post which is discussed earliar and seems its also answered.
    http://forums.adobe.com/thread/504861
    Thanks,
    Bhasker Chari

  • Specify JNDI Name For EJB Module

    Hi folks, please I need to know how I can specify the Jndi name for an ejb module I am creating in netbeans 5.0, to be accessed by a web application.
    If this can be done using the sun java system application server 9 admin consle (just as for JDBC Resources), i'll also like to know how.
    Thanks.

    Thanks Jay. I went through the links, it seems that if you have the JNDI name set in the weblogic-ejb-jar.xml, there is no need to set the same in the weblogic admin console. I am using ejb 2.x version. Particularly if you get the WLInitialContextFactory in your code , then there is no need to set the JNDI name in the JNDI tree in weblogic admin console.
    Like:-
    Context ctx = null;
    java.sql.Connection conn = null;
    Hashtable<String,String> ht = new Hashtable<String,String>();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
    This will take care of JNDI tree, hence there is no need to set the JNDI name explictly in the weblogic admin console.
    Please correct me if i am wrong. Whether for datasource also whether we can do the same, by setting the resource-ref with datasource in the ejb-jar.xml and not set anything in weblogic admin console? Thanks.

  • JNDI name for TransactionManager?

    What is the JNDI name for TransactionManager on Oracle9ias? I thought
    it was "java:comp/UserTransaction" but everytime I try to get the
    TransactionManager I get a javax.naming.NamingTransaction, root exception is java.lang.NullPointerException. Any help would be appreciated. :-)
    TransactionManager trans = null;
    String name = null;
    try {
    InitialContext ctx = new javax.naming.InitialContext();
    name = "java:comp/UserTransaction";
    trans = (TransactionManager) ctx.lookup( name );
    out.println("<p>*** class of TransactionManager is: " + trans);
    trans.begin();

    Srini,
    You mention EJB client -> is the EJB an entity bean? Is it BMT or CMT? If its an entity bean with CMT then you cannot (and should not) be starting the transactions. If however this is BMT then you can use a Sesssion Bean to start and commit the transaction.
    I have a feeling that you are using a remote client to access the EJB and then would like to start and commit a transaction. I would like to point out that this kind of transaction demarcation is not supported in OC4J. Here is quote from the OC4J documentation:
    "Client-side transaction demarcation is not supported in the application client container: OC4J does not support client-side transaction demarcation. This form of transaction demarcation is not required by the J2EE specification, and is not recommended for performance and latency reasons."
    I would recommend that you start using SLSB instead of remote clients.
    Hope this helps.
    Deepak

  • Help needed on allocating a JNDI name for MYSQL on Glassfish

    Hi,
    I am trying to invoke my database (MYSQL) through a JNDI lookup on GlassFish Server. I copied the MySQL connector into the GLASSFISH_HOME/lib directory and went into Admin console (http://localhost:8080/login.jsf) to create a ConnectionPool. After this, I am not sure what I should do, inorder to associate a "jdbc/mysql" JNDI name for this pool. Can anybody point me to what has to be done?
    Thank you.

    Figured it. After you've setup your pool, you need to go to Resources -> JDBC -> JDBC Resources and then create an new mapping of the pool that you've just created to some name (ex: "java/mysql"); This should integrated Glassy with Mysql
    Thanks.

  • JNDI name for a JMB is not replicatet to other servers in the cluster

    Hi,
              wl6.1sp7, two server cluster
              When I look at the JNDI Tree for a server I can't find JNDI names of JMB's from the other server in the cluster.
              I get an exception when trying to send to a destinaton on the other server. (Unable to resolve 'xlink.jms.service.report.biztalk-lab.Report' Resolved: 'xlink.jms.service.report' Unresolved:'biztalk-lab')
              Setting are same as explained in this thread...
              http://forums.bea.com/bea/thread.jspa?threadID=600003492&tstart=0
              And JNDINameReplicated is set to true....
              Why is the JNDI names not replicated?
              <JMSQueue JNDIName="xlink.jms.service.report.biztalk-lab.Report"
              JNDINameReplicated="true" Name="Report" StoreEnabled="default"/>
              This is the DD of a JMB:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.biztalk-lab.Report</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>3</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>xlink.jms.service.report.biztalk-lab.Report</destination-jndi-name>
              <connection-factory-jndi-name>xlink.jms.factory.commerceFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.biztalk-lab.Report</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ~b

    1. yes
              <JMSConnectionFactory AllowCloseInOnMessage="false"
              DefaultDeliveryMode="Persistent" DefaultPriority="4"
              DefaultTimeToLive="0"
              JNDIName="xlink.jms.factory.commerceFactory"
              MessagesMaximum="10" Name="xlink.jms.factory.commerceFactory"
              OverrunPolicy="KeepOld" Targets="bluej,biztalk-lab,devtestCluster"/>
              2. No I am just using the jndi name of the queue.
              This is an example of how I send a message:
                   Context ctx = new InitialContext();
              QueueConnectionFactory qconFactory;
              QueueConnection qcon;
              QueueSession qsession;
              QueueSender qsender;
              Queue queue;
              ObjectMessage msg;
              qconFactory = (QueueConnectionFactory) ctx.lookup("xlink.jms.factory.commerceFactory");
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup("xlink.jms.queue.biztalk-lab.OrdrspImport");
              qsender = qsession.createSender(queue);
              msg = qsession.createObjectMessage(reportExecutorContainer);
              qcon.start();
              qsender.send(msg);
              qsender.close();
              qsession.close();
              qcon.close();
              3. I don't know those setting (wl 6.1sp7)

  • Could take the same JNDI-names for both tags: jndi-name and local-jndi-name

    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

    if you have two separate interfaces, you cant bind them to the same jndi
    name. you will have a local home that extends EJBLocalHome and a remote
    home called EJBHome. also you need to know which one you are looking up
    so you can cast it properly, and use it property (remote interfaces need
    PortableRemoteObject, remote parameters are passed by value, ...)
    joern kirch wrote:
    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

  • Getting jndi name for jms queue via jmx?

    All,
    I'm trying to write a utility that will do a 9.2-style message export against 8.1 I think I have it all figured out except that I don't know how to get the jndi name of a queue or topic via jmx. I'm using jmx to find queues and subscriptions that have messages waiting, then trying to connect to them to siphon off the messages. I can't just browse jndi for any queue I find because I also want to access the durable subscriptions, for which I need the client and subscriptions ids. Is there a way to map from the jms destination runtime mbean to the jndi name? The getDestination() method isn't supported (throws an exception.)
    thanks

    Hi John,
    You can get destination JNDI names by looking up their value in the JMX configuration mbeans rather than the runtime mbeans. The client-id and subscription-name are available on the JMSDurableSubscriberRuntime mbean.
    Regards,
    Tom

  • Jndi name for AqAdaptor

    Hi
    I have implemented an ESB in Oracle Jdeveloper 11g.
    AqAdaptor-> Mediator -> File Adaptor.
    The default jndi name which has come up while adding Aqadaptor didn't work. Then I looked iinto the SOADataSource.xml file and saaw that the jndi name was jdbc/SOADataSource. Even with this, when I deploy the ESB, it is giving the error that it cannot recognise the jndi name.
    Could anybody tell me if I need to create connection pool for the default adaptors?
    Thanks
    Praveena
    Edited by: Jakarta on Oct 23, 2009 4:52 AM

    Srini,
    You mention EJB client -> is the EJB an entity bean? Is it BMT or CMT? If its an entity bean with CMT then you cannot (and should not) be starting the transactions. If however this is BMT then you can use a Sesssion Bean to start and commit the transaction.
    I have a feeling that you are using a remote client to access the EJB and then would like to start and commit a transaction. I would like to point out that this kind of transaction demarcation is not supported in OC4J. Here is quote from the OC4J documentation:
    "Client-side transaction demarcation is not supported in the application client container: OC4J does not support client-side transaction demarcation. This form of transaction demarcation is not required by the J2EE specification, and is not recommended for performance and latency reasons."
    I would recommend that you start using SLSB instead of remote clients.
    Hope this helps.
    Deepak

  • Multiple JNDI names for EJB?

    If I'm deploying a webapp that references an EJB, do I have to use the same JNDI
    name that is configured in the EJB descriptor?
    Why can't I reference the EJB using a seperate name (as in some J2EE examples)?
    Thanks,
    Darren

    darren <[email protected]> wrote:
    If I use a new JNDI name, rather than the one defined in weblogic-ejb-jar.xml,
    it does not show up in the JNDI tree.
    Does the JNDI name referenced in weblogic.xml need to be the same as that defined
    in weblogic-ejb-jar.xml? No. ejb-ref mechanism allows you to map an actual ejb jndi name to one used by your
    application - so, in theory, system administrator can change jndi names without
    touching your application code. You do not see it in the global JNDI tree because
    this mapping exists only in the context of your application.
    <[email protected]> wrote:
    That's what ejb-ref in web.xml is for - you can create an ejb-ref in
    web.xml
    and map it to an actual jndi name in weblogic.xml ejb-reference-description.
    Darren <[email protected]> wrote:
    If I'm deploying a webapp that references an EJB, do I have to usethe same JNDI
    name that is configured in the EJB descriptor?
    Why can't I reference the EJB using a seperate name (as in some J2EEexamples)?
    Thanks,
    Darren--
    Dimitri
    Dimitri

  • When I attempt to import some regular, commercial CD's, iTunes returns the message "The song names for this CD could not be found online.  Do you still want to import the songs?"   This has happened for four CD's in a row now, Eagles - Hotel California.

    Hi All,
    When I attempt to import some regular, commercial CD's, iTunes returns the message "The song names for this CD could not be found online.  Do you still want to import the songs?"   This has happened for four CD's in a row now.  Today, after importing some other CD's in the regular way, all of a sudden, iTunes won't recognize the Eagles - "Hotel California" CD, the Eagles "**** Freezes Over" CD,  "The Best of Roy Orbison" or "Milestones" by Miles Davis.
    What happened?  Anybody know?

    We've gotten the same error at the same time. I guess we need to let this play out. In the meantime, I'm gonna update iTunes.

Maybe you are looking for

  • K7N2 Delta (ILSR) incompatible with 200FSB?

    Is the K7N2 Delta (Nforce2 Chipset) incompatible with 200FSB??... Ive seen many problems when trying to upgrade the CPU, and use a 200FSB in various forums. So, why does it keep hanging/crashing?? Might it be not really supported even though it speci

  • CS6 Master Collection trial download not available?

    I have CS6 Master Collection that is currently installed on my iMac and I need to install it on my new laptop. My serial number is valid and registered with Adobe, but because this was a downloadable version only (no disc), the way it was installed w

  • Reflection in  Numbers and Primitive Arguments  in a Method

    Hi , I am trying to invoke a method which has primitive or Number arguments, my problem is that when i do method.invoke( ) it gives an instantiation exception, because it was trying to do clazzT.newInstance( ) where clazzT happened to be int.class ..

  • Reading data from Lookup [qualified flat] (multi-valued) table

    I have a main table u2019ABCu2019 which has a Lookup [qualified flat] (multi-valued) field u2018XYZu2019 along with some other text fields. I am able to read data from table ABC including lookup field data, but I do not see the relation For Ex: If fo

  • No Toolbar Group - How to remove buttons

    Hi Everyone I am working in CRM 4.0 In sales order application, detail area 2 from prices tab i have to remove buttons of "Add Entry", "Delete Entry", "Update Prices". However BLueprint application builder and CRMC_PCUITOOLS transaction does not give