What is "Context.INITIAL_CONTEXT_FACTORY" for SunOne 7?

Hi
This is the env I used for IBM WebSphere 5. What is the equivalent for SunOne 7?
Jirong
protected Context getInitialContext() throws javax.naming.NamingException {
          Properties p = new Properties();          
          p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
p.put(Context.PROVIDER_URL, "iiop://localhost:900/");
          return new InitialContext(p);
     }

Hai,
When i m conencting to database im getting a problem if any one can suggest help me
Hashtable parms = new Hashtable();
parms.put(
                    Context.INITIAL_CONTEXT_FACTORY,
                    "com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(parms);
DataSource ds1 = (DataSource) ctx.lookup("jdbc/ds1");
its showing these exception
javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost
     at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1422)
     at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:368)
     at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
     at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
     at javax.naming.InitialContext.lookup(InitialContext.java:359)
     at com.telstra.mnp.foh.database.MNPFoHDataSource.main(MNPFoHDataSource.java:68)
Thanks in advance
Regards
Inderjeet

Similar Messages

  • What to use for INITIAL_CONTEXT_FACTORY for Sun AppServer Platform Ed 8x

    I've got an external java JMS client trying to connect to Sun Java System Application Server Platform Edition 8.1 2005Q1 and I need to know what to use for the Context.INITIAL_CONTEXT_FACTORY (and what jar it's in) plus the PROVIDER_URL for the following code:
    Properties p = new Properties();
    p.setProperty(Context.INITIAL_CONTEXT_FACTORY, ????);
    p.setProperty(Context.PROVIDER_URL, ????);
    Context ctx = new InitialContext(p);
    QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup(factory);

    I experienced similar problems while trying to create a Message Driven Bean
    and send a message to it from a standalone client program.
    After much guddling around (and finally finding some helpful information in
    the App Servers Troubleshooting Guide) I managed to get this to work by doing
    the following:
         1) Including the following jars at client compile time:
              appserv-rt.jar
              j2ee.jar
         2) Including the following jars at client run time:
              appserv-rt.jar
              j2ee.jar
              appserv-admin.jar
              imqjmsra.jar
         3) Passing in the following arguments at client run time:
              -Dorg.omg.CORBA.ORBInitialHost=localhost
              -Dorg.omg.CORBA.ORBInitialPort=3700
         4) Creating the context using the no-arg InitialContext method � i.e.
              Context ctx = new InitialContext();
         Note that this method picks up the initial context factory
         as com.sun.enterprise.naming.SerialInitContextFactory from
         a jndi.properties file in appserv-rt.jar.
    I have included my client code below FYI.
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.JMSException;
    import javax.jms.MessageProducer;
    import javax.jms.Queue;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Date;
    * @author dlowe8
    public class JmsTest2 {
    /** Creates a new instance of JmsTest2 */
    public JmsTest2() {
    public static void main(String[] args) {
    Connection c = null;
    try {
    Context ctx = new InitialContext();
    String factoryJndiName = "jms/ConnectionFactory";
    String queueJndiName = "jms/Queue";
    System.out.println("Factory JNDI Name = " + factoryJndiName);
    System.out.println("Queue JNDI Name = " + queueJndiName);
         ConnectionFactory cfa = (ConnectionFactory)ctx.lookup(factoryJndiName);
         c = cfa.createConnection();
    Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
    Queue q = (Queue)ctx.lookup(queueJndiName);
    MessageProducer producer = s.createProducer(q);
    TextMessage m = s.createTextMessage();
    m.setText("Helloooo from standalone program at " + new Date());
    producer.send(m);
    s.close();
    Object o = ctx.lookup(factoryJndiName);
    System.out.println("Factory object class [" + o.getClass().getCanonicalName() + "]");
    o = ctx.lookup(queueJndiName);
    System.out.println("Queue object class [" + o.getClass().getCanonicalName() + "]");
    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    if (c != null) {
    try {
    c.close();
    } catch (JMSException e) {}
    System.exit(0);
    }

  • HT1338 I'm trying to download mountain lion, I've got an icon in the dock saying "OSX Mountain Lion waiting..." What is it waiting for? I can't seem to find any context menu or information.

    'm trying to download mountain lion, I've got an icon in the dock saying "OSX Mountain Lion waiting..." What is it waiting for? I can't seem to find any context menu or information.

    I got it to download by going to the App Store, Purchases, and download.
    This was after a false start thanks to Apple Help (total misnomer) which sent me to iTunes.
    It is an amazingly slow download, so pack a lunch.
    Thanks everyone.

  • JNDI look up failure from JUnitEE for Sunone AppServer 8

    Hi, Dear All:
    I am trying to set up a test framework for developing J2EE application, I successfully deployed the EJB components, see the sun-ejb-jar.xml below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <unique-id>0</unique-id>
    <ejb>
    <ejb-name>CounterEJB</ejb-name>
    <jndi-name>ejb/Counter</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <is-one-one-cmp>false</is-one-one-cmp>
    </cmp>
    <ior-security-config>
    <transport-config>
    <integrity>SUPPORTED</integrity>
    <confidentiality>SUPPORTED</confidentiality>
    <establish-trust-in-target>SUPPORTED</establish-trust-in-target>
    <establish-trust-in-client>SUPPORTED</establish-trust-in-client>
    </transport-config>
    <as-context>
    <auth-method>USERNAME_PASSWORD</auth-method>
    <realm>default</realm>
    <required>true</required>
    </as-context>
    <sas-context>
    <caller-propagation>SUPPORTED</caller-propagation>
    </sas-context>
    </ior-security-config>
    <is-read-only-bean>false</is-read-only-bean>
    <gen-classes/>
    </ejb>
    <ejb>
    <ejb-name>UniqueIdGeneratorEJB</ejb-name>
    <jndi-name>ejb/UniqueIdGenerator</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <ior-security-config>
    <transport-config>
    <integrity>SUPPORTED</integrity>
    <confidentiality>SUPPORTED</confidentiality>
    <establish-trust-in-target>SUPPORTED</establish-trust-in-target>
    <establish-trust-in-client>SUPPORTED</establish-trust-in-client>
    </transport-config>
    <as-context>
    <auth-method>USERNAME_PASSWORD</auth-method>
    <realm>default</realm>
    <required>true</required>
    </as-context>
    <sas-context>
    <caller-propagation>SUPPORTED</caller-propagation>
    </sas-context>
    </ior-security-config>
    <is-read-only-bean>false</is-read-only-bean>
    <gen-classes/>
    </ejb>
    <cmp-resource>
    <jndi-name>jdo/pickdirector</jndi-name>
    <default-resource-principal>
    <name>rp3data</name>
    <password>rp3data</password>
    </default-resource-principal>
    <create-tables-at-deploy>false</create-tables-at-deploy>
    <drop-tables-at-undeploy>false</drop-tables-at-undeploy>
    <database-vendor-name>mssql</database-vendor-name>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    and also I made up a deployable war with developed JUnitEE testcase, the code below is a simple example:
    public class UniqueIdGeneratorEJBTest extends TestCase
    //private UniqueIdGeneratorEJBRemote uidBean;
    private UniqueIdGeneratorLocal uidBean;
    public UniqueIdGeneratorEJBTest()
    super();
    // TODO Auto-generated constructor stub
    * @param arg0
    public UniqueIdGeneratorEJBTest(String arg0)
    super(arg0);
    // TODO Auto-generated constructor stub
    protected void setUp() throws Exception
    Context jndiContext = new InitialContext();
    ServiceLocator sl = ServiceLocator.getInstance();
    (JNDINames.UID_EJBHOME);
    UniqueIdGeneratorLocalHome uidHome = (UniqueIdGeneratorLocalHome)sl.getLocalHome("java:comp/env/ejb/UniqueIdGenerator");
    this.uidBean = uidHome.create();
    protected void tearDown() throws Exception
    this.uidBean = null;
    public void testSimpleIntId() throws RemoteException
    int currentId = uidBean.getUniqueIntId("WORKASSN");
    int nextId = uidBean.getUniqueIntId("WORKASSN");
    assertEquals(nextId, currentId + 1);
    assertTrue("NextId should be currentId plus 1.", nextId == currentId + 1);
    then I created deployable war file with the testcase, and deployed it onto SunOne Server, But I got error :
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/UniqueIdGenerator
    I have been try to fix this problem for days, could anybody help, what I have done wrong?

    Could you please give an example (full code). I'm having the same problem.
    I can connect remotely from any client console application but as soon as I try to access a remote EJB via a servlet under Sun AppServer 8 I get the following error:
    java.lang.NullPointerException at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.sentFullMessage(CorbaMessageMediatorImpl.java:394) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.sendCancelRequestIfFinalFragmentNotSent(CorbaMessageMediatorImpl.java:359) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.endRequest(CorbaClientRequestDispatcherImpl.java:851) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.releaseReply(CorbaClientDelegateImpl.java:140) at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:115) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1112) at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340) at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289) at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245) at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209) at com.sun.jndi.cosnaming.CNCtx.(CNCtx.java:69) at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.init(InitialContext.java:219) at javax.naming.InitialContext.(InitialContext.java:195) at Test.TestServlet.processRequest(TestServlet.java:57) at Test.TestServlet.doGet(TestServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:748) at javax.servlet.http.HttpServlet.service(HttpServlet.java:861) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647) at java.lang.Thread.run(Thread.java:534)
    I have configured my InitialContext properties like so:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.PROVIDER_URL, "iiop://slavezero:3700");
    InitialContext ic = new InitialContext(props);
    As far as I can see there is no reason for this to be handing back a NullPointerException.
    Please, please HELP!!!!!!!

  • What are context properties to use with sun imq ?

    Hi
    Thank you for reading my post.
    what are Context properties that we should use to connect an application to sun IMQ ?
    I mean :
    INITIAL_CONTEXT_FACTORY
    PROVIDER_URL
    Thanks

    You can purchase music using multiple accounts within the same Windows profile & using the same iTunes library. I think when you log into the store it remembers the last account name used, but provided you don't let it remember your password then you have the opportunity to enter the correct details for each purchase.
    If you're going to place these purchases on your respective iPod's the following may help.
    *How to use multiple iPods with one computer*
    The Apple support document How to use multiple iPods with one computer suggests a number of ways. I use method two (Sync with selected playlists) with a slight twist. Rather than regular playlists I set the grouping field to indicate which users should receive which tracks and create smart playlists based on the content of this field.
    e.g.
    "Alice's Tracks" is "Grouping contains Alice" + "Kind contains audio"
    "Bob's Videos" is "Grouping contains Bob" + "Kind does not contain audio"
    Tracks that both Alice & Bob want on their iPods have the grouping set to "Alice/Bob"
    etc.
    I currently manage our family's five iPods using this system, each getting a different selection to suit their tastes and the capacity of their iPod. An advantage of using the grouping field is that it is stored in file tags (for non-wav audio files anyway) so that it is relatively easy to recreate the playlists should the iTunes library get trashed. Also useful if you move files about manually as playlist membership is preserved when you delete & re-import the tracks.
    tt2

  • Select Option's Context Element for the REPORT_ATTRIBUTE_ERROR_MESSAGE

    Hi,
    We're on 7.0 ehp1.
    I found a thread on same subject u201Cwdr:select_options and highlight Error Message with a Link to Inputfield u201C, Jul-23-2008, in which Thomas Jung gave an explanation of how to get the context element of the Select Options on a view.
    I tried to follow it, but Iu2019m still not getting it.  Please show how to get the context element of a Select Option for the u201CREPORT_ATTRIBUTE_ERROR_MESSAGEu201D .
       wd_comp_controller->go_message_manager->report_attribute_error_message(
             exporting
              message_text   = ls_messaga_text
                  element        = ?????
               attribute_name = ls_option_id
    Thomas' explanation:
    I gave you the code that gets you to the interface controller. From there you call the GET_API to get the component controller. After you have the component controller it is normal context coding to read the context of the Select-Options context. Run the debugger and use the Web Dynpro view to see what your context looks like at runtime. When I test this with one of my applications, the names of the context nodes that were dynamically generated was really straight forward - as it uses the names of the select-option itself. Nothing special once you reach this point - just normal context coding...."
    Kind regards,
    Huntr

    Hi ,
    Use the below approach to achieve this,
    data:
        lr_context_node       type ref to if_wd_context_node,
        lr_element            type ref to if_wd_context_element,
        message_text          type string.
      get the node and leadSelection of that field
        lr_context_node = get_node_of_sel_field( <field>-m_id ).
        lr_element = lr_context_node->get_lead_selection( ).
    case <field>-m_type.
    For Select option field
                when if_wd_select_options=>mc_sscreen_item_type_field.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'LOW'
                    message_text   = message_text ).
    "For Parameter field
                when if_wd_select_options=>mc_sscreen_item_type_parameter.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'VALUE'
                    message_text   = message_text ).
                when others.
              endcase.

  • Using Static Variable against Context Attribute for Holding IWDView

    Dear Friends,
    I have a method which is in another DC which has a parameter of the type IWDView. In my view, I will have an action which will call the method in another component by passing the value for the view parameter. Here, I can achieve this in 2 types. One is - I declare a static variable and assign the wdDoModifyView's view as parameter value and I can pass this variable as parameter whenever calling that method or the second way - create an attribute and assign the same wdDoModifyView's view parameter as its value. Whenever I call this method, I can pass this attribute as parameter. What is the difference between these two types of holding the value since I am storing the same value i.e., wdDoModifyView's view parameter. But when I trigger the action from different user sessions, the first type of code (using static variable) prints the same value in both the sessions for view.hashCode() and View.toString(), but the same is printing the different values when I pass the attribute which holds the view parameter.
    Clarification on this is highly appreciated
    The problem I face is when I use static variable to get the view instance and export the data using the UI element's id, the data belonging to different user sessions is mixed up where as when I use Context Attribute, the same problem doesn't arise. I want to know the reason why it is so. Is there any other place or way where I can get the current view instance of each session instead of wdDoModifyView?

    Hi Sujai ,
    As you have specified the problem that we face when we use  static attributes, when end users are using the application .
    Static means i  have n number of objects but the static variable value will remain same every where.
    when it is context attribute for every object i.e nth object you have a nth context attribute i mean nth copy of the context attribute.
    so every user has a unique Iview parameter , when context is used and
    when static is used  , assume you have userA , his iview is set this intially  and u have another user B , when he is using  , since the variable is static and when you access this variable you will get the value of userA.
    Regards
    Govardan Raj

  • Context menu for .exe and .lnk slow becaus of nv3dappshext.dll

    Hi
    I recently made a fresh install of Windows 7 and I'm now noticing that the context menu for .exe and .lnk files opens very slow. With the help of ShellExView it looks like it is caused by C:\Windows\system32\nv3dappshext.dll. If i disable nv3dappshext.dll the
    problem goes away. So my first try was to reinstall all Nvidia drivers but that didn't help. I'm now thinking that there is some other file that makes nv3dappshext.dll corrupt.
    Is there anyone here that might know what's wrong?
    //Simon

    Hi Simon, did you keep this disabled? Did you report to NVID.support?
    NVIDIA are as bad as Microsoft are as bad as Intel, all kinds of application errors (going for the cleanest build on the planet :) so, given that I don't
    have
    any 3D-ready devices (ergo)
    any superfluous NVIDIA programs*
    the DISPLAY DRIVER's all I need, and still I get app issues (recently, disconcertingly, the ominous,
    snail-mode 'Kernel Processing Power' event (cores are disabled because of some event/temp?)
    BSOD/Shell Crash when extending display to AOC 2036 monitor @ 1920x1080, not gaming!
    FIXED by installing NVIDIA's 'system tool' {nTune} (THANKS!!! to Haider
    Ali Khan for the tip! TdrDelay QWORD:8 failed to fix, almost bought a new AC Adapter!) 
    New nTune issues now being monitored....
    * Custom install NVIDIA, only select the driver if you're not a gamer, sterescopic not
    {yet} required if you're in 2D, Physx Engine only for Steam(online) gamers,
    HD AUDIO not required (if you've also got HD Intel doing that for ya :D
    I will fix NVIDIA's and Microsoft's mistakes :D I might even upload my (native virtualised) build when done. It's so slick, so nice to have a tool that works, and one that can keep up with your imagination!)

  • Table Context Menu for Word 2010

    I want to create a context menu for Word 2010. I'm using the code below, that works fine if I'm entering text, but menu doesn't show when entering text inside a table cell.
    I tried also the following contextMenu idMso: ContextMenuTable, ContextMenuTableCell, ContextMenuTableCellWhole, and ContextMenuTableCellWholeLinked; but still doesn't work.
    What am I doing wrong? Thanks.
    XML:
    <contextMenus>
    <contextMenu idMso="ContextMenuText">
    <menuSeparator id="CMenuSeparator1" />
    button id="BtnCMenu1" label="Block Text" imageMso="TextToolMenu" visible="true" onAction="StyleBlockText" />
    </contextMenu>
    </contextMenus>
    VBA:
    Sub StyleBlockText(control As IRibbonControl)
    Selection.Style = ActiveDocument.Styles("My Style")
    End Sub

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, you'd better post your question to the MSDN forum for Word
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Context menu for customized selfwritten VI

    Hallo!
    Maybe someone knows and has time to share: is it possible to create a customized popup/context menu for a customized - self written VI (vide .jpg)? And as working with LV 2011 I have realised it's impossible to create a polymorphic VI out of other polymorphic vi-s right?  If anybody knew any walk through, I will be thankfull
    A.

    Dear Aleph,
    information about creating run time context menus can be found here: http://www.ni.com/white-paper/3171/en/
    Another soultion, is to create your own VI that will po up when a user uses his RMB on a specific object. This can be achieved by properly using the Event Structure. Let me know if you need more information.
    What do you mean by creating a polymorphic VI from a polymorphic VI?
    Best regards,
    Mateusz Stokłosa
    Applications Engineer
    National Instruments

  • What's best practice for logging messages in pageflow?

    What's best practice for logging messages in pageflow?
    Workshop complains when I try to use a Log4J logger by saying it's not serializable. Is there a context similar to JWSContext that you can get a logger from?
    There seems to be a big hole in the documentation on debug logging in workflows and JSP pages.
    thanks,
    Rodger...

    Make the configuration change in setDomainEnv.cmd. Find where the following variable is set:
    LOG4J_CONFIG_FILE
    and change it to your desired path.
    In your Global.app class, instantiate a static Logger like this:
    transient static Logger logger = Logger.getLogger(Global.class);
    You should be logging now as long as you have the categories and appenders configured properly in your log4j.xml file.

  • Finding intial context factory for java naming connect to DS5

    I'm a newbie to LDAP programming using the JNDI interfaces to connect to my
    DS 5 implementation. I can't seem to find any reference as to where the
    correct factory for the initialDirContext is! I need the factory classname
    for this call:
    env.put(Context.INITIAL_CONTEXT_FACTORY,"factory classname goes here");
    which is neccesary to set the initialDirContext.
    As far as I can tell there is no default context for an LDAP connection that
    would make this easier and I don't know where or if I can find one remotely
    located on my DS5 box.
    Any help would be appreciated,
    -Jake

    I'm a newbie to LDAP programming using the JNDI interfaces to connect to my
    DS 5 implementation. I can't seem to find any reference as to where the
    correct factory for the initialDirContext is! I need the factory classname
    for this call:
    env.put(Context.INITIAL_CONTEXT_FACTORY,"factory classname goes here");
    which is neccesary to set the initialDirContext.
    As far as I can tell there is no default context for an LDAP connection that
    would make this easier and I don't know where or if I can find one remotely
    located on my DS5 box.
    Any help would be appreciated,
    -Jake

  • Why does Context.INITIAL_CONTEXT_FACTORY has to be vendor specific?

    I have a standalone Java app that reads messages from a JMS queue, and when I create a InitialContext, I give it the property Context.INITIAL_CONTEXT_FACTORY = weblogic.jndi.WLInitialContextFactory.
    Why? I mean, should I as a client not be able to connect to any JMS queue without any knowledge about what vendor this JMS server runs on? Can I give it some Sun standard factory instead that will work?
    Thank you
    Søren

    The problem here is JMS is not a protocol specification like say SOAP, in which the size and format of every message is well defined, written in stone. Neither is JDBC nor JPA, they are just API specifications. We are given a library of interfaces to which we program, and every vendor will give us a concealed form of their implementation. Because of that, there is some point in every one of those APIs where we must specify the implementing clasess, which are free to define their own implementation.
    Does this answer your question? Hope it has been useful.
    Regards
    Jorge

  • What is Context Change

    Hi
    experts plz tell me what is context change

    Hi
    Context : Context of an element is nothing but just the level, where
    the XML tag appears in the given XML
    document. Level of any element is set to the immediate parent node by
    default.
    Context Change : Context change is just changing the level of XML
    tag(element level in XSD) in the XML document.
    This means when we map one source field to one target field then that
    both field segments should be at same
    level.
    Example
    The reason that context changes can occur in mapping is because sometimes you want to manipulate the structure of the message that's being transferred between systems. For example, lets say you have a message being sent from one system as an XML file, and the structure looks similar to the following:
    code
    <header>
    <field1></field1>
    <field2></field2>
    </header>
    [/code]
    However, the system that the message is being sent to has a requirement that each field be split into individual <header> format (I know, this is not a real world example), then you want to use context changes to make the format look something like this instead:
    code
    <header>
    <field1></field1>
    </header>
    <header>
    <field2><field2>
    </header>
    [/code]
    Essentially, you use context mapping when your requirements ask you to change the structure of the XML message, not just strictly apply transformations to each field. You can also check this blog that incorporates user-defined functions for advanced context changes: Mapping Context Changes in XI
    Message Mapping Simplified - Part I
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Hope this info is useful to you..
    Thanks
    Saiyog
    Edited by: Saiyog Gonsalves on Aug 1, 2008 10:00 AM

  • Initial Context Factory for same OC4J EJB access in 10.1.3.1

    What should the INITIAL_CONTEXT_FACTORY be set to when you try to access an EJB from within the same OC4J instance? Should it be:
    a) ApplicationClientInitialContextFactory
    b) RMIInitialContextFactory
    c) Nothing at all
    d) Something else completely
    I ask because I am try to move from 10.1.3.0 to 10.1.3.1 and I have a thread spawned during startup that is unable to access the EJB
    2007-05-25 07:22:50.862 WARNING J2EE RMI-00009 Exception returned by remote server: {0}
    07/05/25 07:22:50 Unknown service: MySessionHome
    javax.naming.NameNotFoundException: MySessionHome not found
    It does not set the INITIAL_CONTEXT_FACTORY because it has been my understanding that this is not necessary. Did something change in 10.1.3.1?

    Has anyone found a solution for this problem? I tried adding the following entry to my orion-application.xml file with no luck. I was able to fix the problem by adding commons-digester.jar,commons-logging.jar, and log4j-1.2.15.jar to the /BC4J/lib folder on the server. Unfortunately this fix caused errors when trying to launch the BPEL console. Any help would be greatly appreciated.
    <imported-shared-libraries>
    <remove-inherited name="apache.commons.logging"></remove-inherited>
    </imported-shared-libraries>
    I am unable to deploy my application due to the error below.
    Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@6b8c38 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@6b8c38 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
            at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
            at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
            at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
            at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
            at com.sun.faces.config.ConfigureListener.<clinit>(ConfigureListener.java:212)
            ... 19 more
    Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@6b8c38 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
            at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
            at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
            ... 23 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.getConstructor(Class.java:1629)
            at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
            ... 24 more                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for