Persistant connection from Session EJB to MQ Series

          Hi Technocrats,
          In our Application we have deployed MDB and Stateless Session Bean to receive
          and send messages in asynchronous mode.MDB is asynchronous but we need our Session
          bean also to send messages without closing the session and connection.now we are
          doing the jms clean up by closing the session and connection and looking for persistant
          connection with Weblogic server to MQ through session bean.Is it possible?if so
          how?please let me know if u've some solution or from ur friends.
          advance thanx
          Subrahmanyam
          

My assumption is that your MQ installation is working fine, and you're able to send messages to it from MQ test scripts or tools. I'm not going to give a "tutorial", just a high-level description of what you'll have to do, along with some important details.
The most straightforward way to send messages to MQ from WLS/ALSB is to just use JMS to send a message. This requires two other steps.
You'll have to use the "JMSAdmin" tool in the IBM MQ client distribution, which is used to specify the connection information for your QueueManager and Queue. This information is written to a "JNDI repository" of some sort, most likely just a file in a specified directory (by specifying the File JNDI provider and the directory to store into, both in the JMSAdmin config file). It's possible to store the JNDI info in other repositories, like LDAP, but I don't have a clear feeling for whether that's practical (or used).
Then, in WLS, you define a "Foreign JMS Server", where you can specify the location of the JNDI settings file (the directory), and the JNDI provider class. Nothing in the WLS config or the app needs to know that it's communicating with MQ. It just uses JMS.

Similar Messages

  • How to create ErrorLog file from Session EJB

    Hi my friends,
    I have the need to write the Exception Errors from Session EJBs into log file. The problem is my project is the multi-user application and many EJBs' user transactions need to log the errors to only one log file, if I use EJB named ErrorLogWriter as the main component for log file writer and the other EJBs just reference to this EJB to log the errors, each request will create one instance of ErrorLogWriter therefore we can't access to only one log file. Somebody told me that it should be OK if we use servlet as the log file writer because only one servlet instance is initialized for multi-requests, and the other EJBs just call this servlet. Do you have any ideas or suggestion for this matter? If using servlet is the right solution, can I call servlet method from Session EJBs? and how?
    Thanks in advance for any help
    Quoc Nguyen

    Look for log4j -
    http://jakarta.apache.org/ ( then side menu )

  • Using external util JAR from Session EJB

    I have a Stateless Session EJB that uses some classes packaged in a utility jar. How do I package the EJB jar with this util jar, and get the app server to recognize this utility jar? including a /lib dir with the utils jar in it, like you would with a WAR, doesn't work.
    I've temporarily got this to work by modifying the startup scripts for my app server to ensure my jar is included in the -classpath arg, but this cannot be the intended way. (cannot find details on this in the tutorial).
    Thanks in advance!

    Well, the answer depends a lot on which appserver you're using, because it obviously depends on how the vendor implemented the containers' ClassLoaders. What usually works is dependent upon a portion of the JVM spec regarding the MANIFEST.MF file. If you package your ejb.jar and library.jar in an .ear file, you can put the following in the ejb.jar MANIFEST.MF:
    ClassPath: library.jarNote that there must be at least one blank line at the end of the MANIFEST.MF file.
    This works on WebLogic, but, as an example, JBoss uses a single ClassLoader, so I'm not entirely sure how you'd go about the same thing there.
    And you're quite right - putting it in the JVM ClassPath is not a good idea...

  • How to SCAN w. usb cable connected from my deskjet F 4580 series printer

    HOW TO SCAN  [WITH USB CABLE CONNECTED TO MY PC] FROM MY DESKJETF4580 ALL IN ONE PRINTER ?

    If you have the HP full software installed, just press that "Scan" button on the printer.
    ======================================================================================
    * I am an HP employee. *
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **
    ***Click on White “Kudos” STAR to say thanks!***

  • OID connections from Middle Tiers GROWING (not killed)

    Hi everybody,
         We are using Forms/Reports protected by SSO and we seeing GROWING connections from our Middle Tiers to the LDAP (OID). In order of 3 for every user connected and after it exit the connections persist.
    This is obviously a problem. In our search we found the following parameters that can be affect the duration of the connections:
    OID:
    orclLDAPconnTimeOut=n (minutes)
    SQLNET.ORA:
    names.no_persistent_resources=TRUE
    names.directory_path=(tnsnames, ldap, ...)
    Can anybody help us in this direction?
    1. Why the connections OPEN from MTs can be closed by OID?
    2. What is the adequate value for orclLDAPconnTimeOut parameter?
    3. What happen if we close the connecton in "orclLDAPconnTimeOut" minutes and the forms still running? Raise an error or reopen a connection?
    4. names.no_persistent_resources=TRUE drop the persistent connections from MTs to OID?
    Our numbers of users actually are in the order of 1000.
    We have 5000 forms and 2000 reports on AS 10gR2 AIX
    2 MTs (AIX 5.3 2 CPU 1.5Ghz dual core x 12Gb RAM) x 4 OC4J_BI_FORMS
    1 SSO/OID (AIX 5.3 * 2 CPU 1.5Ghz dual core x 12Gb RAM )
    Tx in advance for any help.
    diego.

    Pooled connections and VPD - anyone worked out the architecture to make this work?
    I posted a question in XML forum asking for ideas on how to use Virtual Private Database with XSQL or JDBC connection, where the connection is pooled across many users. I have not actually tested out the VPD policy yet, but I can see that each user is getting the same session id (from dbms_unique_session). I am therefore assuming VPD will not work - but haven't got around to testing yet (will very soon though).
    OCI seems to address proxy user access but its a leap into another product area (and C) that we don't really want to have to make. And I'm still not sure if this will enable VPD.
    null

  • Max streaming connections per session error

    I have a flex application that uses messaging with a streaming AMF connection, falling back to polling. When the max number of streaming connections on the server is reached, it does fall back to polling (at least it prints the max-streaming-clients error but the client connects, so I assume it is falling back - how can I tell?). However, occasionally the streaming connection will not initialize and it does not fall back - no messages are received on the client. The following error is logged on the server:
    [EMST]09/25/2008 13:43:18.231 [ERROR] Endpoint with id 'my-streaming-amf' cannot grant streaming connection to FlexClient with id 'D5B8E3A1-1A1C-063E-84A6-6A743A1E4EE0' because max-streaming-connections-per-session limit of '1' has been reached.
    This would make sense if the issue was caused by trying to initialize the streaming connection in two tabs of a browser, but I am only trying to initialize in one tab. Closing the browser (and thus destroying the session) does not fix it. The only solution I've found is to reboot the client machine. This has happened in both FireFox 3.0.2 and IE 7.
    (1) What could cause the client to get in this state?
    (2) When it happens, why doesn't it fall back to polling? Is the fallback only for when the server max connections is reached? When the streaming connection doesn't initialize, no messages are received.
    (3) Is there a way to explicitly close the streaming connection on the client so we can fix this without rebooting?
    Thanks!

    Hi Mary. If you turn on Debug level logging on the client and the server you should be able to tell if you have fallen back to a polling channel after the attempt to connect over the streaming channel has been rejected. In the client log, you will see the flex application sending poll requests to the server at the polling interval configured in the channel and in the server log you should see that the server is receiving these requests.
    The behaviour you are seeing seems very strange to me. The reason we have the max-streaming-connections-per-session limit on the server is because most browsers limit the number of active connections that can be made to a server from a single session. In IE for example, this is 2. What happens in most cases when the browser's connection limit is reached is that new connections are put on hold until one of the existing connections closes. This would cause your flex application to hang with no errors being reported on the client or the server. This is why we need the max-streaming-connections-per-session setting on the server. This prevents more than one persistent connection from being made from the same session, so the browser should never reach it's max connections per server limit and lock up.
    It looks like you are somehow getting the browser to lock up even though the server is only limiting you to one streaming connection per session. It may be possible to do this if you reload the flex application in the browser (by doing a page refresh) in which case the browser could possibly briefly leave the streaming connection open in the background and when you tried to create a new streaming connection, the browser's connection limit to the server would have been reached and the application could hang. When the application hangs are you reloading the swf/page in the browser?
    I really don't know why closing the browser wouldn't fix the problem. You're right that closing the browser should end the session. If you launch a new browser and load the swf do you get the same "cannot grant streaming connection" error on the server or is the browser just locked up, ie. no error is received on the client and the server?
    You're not using a proxy server or anything like that are you that might be holding a connection open to the server?
    -Alex

  • How to create persistent connections to windows shares

    Hi, I've looked and searched for an answer for this, but I think I haven't stumbled upon it yet. I'm trying to create persistent connection from my wife's iMac (Tiger) to a Windows 2000 box which is being used a file server. I can create the connection anytime I want and it works fine. However, when the computer logs off or reboots, the connection is lost and I have to re-establish it. I'd like the connection to be automatically made everytime she logs in to her iMac, or the machine reboots. I've also read that the connection can be lost when the iMac goes to sleep and I'd like to avoid that if possible.
    One forum I found said to put the connection into the startup item list in system preferences - accounts - user, but that didn't work.
    Any other ideas? Is there a script I need to run? Does anyone know of a discussion where this has been solved already?
    iMac   Mac OS X (10.3.9)  

    I know you said you tried the "login items", but when I did it it would not work when I dragged an alias or the icon in.
    It did work when I, 1) connected to volume, 2) opened the accounts system pref., login items, 3) click on plus + sign and then click on the volume, then click add.
    Powerbook G4 15 1.5GHz   Mac OS X (10.4.7)  

  • Error connecting to an EJB 3.0 Remote on OC4J 10.1.3.2 from Tomcat

    Hi, I want to connect to a Remote Session Bean running on the OC4J 10.1.3 and it doesn´t work.
    I have connected to it from a java standalone application using:
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    System.out.println(sessionEJB.mergeEntity(""));
    System.out.println( "hola" );
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Standalone OC4J connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "passw" );
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/ejb3jar");
    return new InitialContext( env );
    with this application-client.xml file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Model-app-client</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
    <ejb-link>SessionEJB</ejb-link>
    </ejb-ref>
    thats works fine, but when I try to use the same solution from a jsf proyect running on a Tomcat 5.5.20, it fails with this error:
    Caused by: java.lang.RuntimeException: Error while creating home.
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:32)
         at ar.com.mcd.fawkes.ui.locator.ServiceLocator$1.get(ServiceLocator.java:12)
         at net.sf.opentranquera.web.jsf.locator.ServiceLocatorBean.get(ServiceLocatorBean.java:42)
         at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
         ... 80 more
    Caused by: javax.naming.NameNotFoundException: Name ejb is not bound in this Context
         at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:28)
         ... 87 more
    Could you please help me with any tip?
    Mauricio
    Message was edited by:
    Mauricio

    Hi, Rick
    Thanks for your help.
    I deleted de application-client.xml file, added the following lines to the web.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
         </ejb-ref>
    and now I´m using oracle.j2ee.rmi.RMIInitialContextFactory
    there is no error, and it doesn´t throw any exception but the following line returns null.
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    Its seems the lookup method finds the remote ejb because it doesn´t fail, but it returns null.
    Any idea what is wrong?
    Mauricio.

  • Deploying Session EJB From Jdev9i(Beta) - OC4J 9i

    Hi All ,
    I wanted from u , i have recently Upgraded to Oracle 9i 1.0.2.2.1 (OC4J) . Now i want a simple Step wise process as how can i deploy my Ejb (Session Bean ) into the OC4J container and Use its DataSource .
    Is it possible to deploy using Jdev 9i (Beta) .
    Can any one please help me out to point to a Documentaion , give me a breif process .
    Regards
    Asif

    Asif -
    Yes you can use Jdeveloper 9i beta to deploy your session ejb.
    Step 1 should be setting up your Data Source. In the System
    Navigator Panel expand the "Connections" listing. Right-click
    on "Database" and select "New Connection..." - follow the
    wizard's instructions to set up your data source. Step 2 should
    be setting up a connection to the OC4J container - again on the
    System Navigator Panel ->Connections->Application Servers -
    follow the instructions there. I am assuming that you have
    developed your session ejb using Jdeveloper, right click on
    your .jpr entry (or wherever suits you) and choose "New..." then
    Deployment Profiles. You need to package your session ejb into a
    jar file and I would recommend packaging your jar file into an
    ear file (it really helps for clean deployment). If you have a
    web portion, package that and make it dependent on the jar file
    just to keep it straight. Once you have these, you will be able
    to right click on the jar or web file and deploy to an ear file,
    or straight to the server. If this is what you are looking for,
    you will then just select this and away you go.
    Apparently there are some howtos here:
    http://otn.oracle.com/docs/products/jdev/howto.html
    although I don't know how good they are.
    I wasn't quite sure what you were looking for so this post is
    vague. If you have specific questions, let me know and I will
    try and answer them!
    Cheers
    Ray

  • How to call a EJB method from Session bean method

    Hi all,
    I'm new to J2EE programming. I have a simple doubt .
    I have already created a lookup method for EJB bean in Session bean .
    My question is how to call a method of an ENTITY bean (say insertRow) from SESSION bean method(Say invoke_insertRow) .
    Please provide me an example code .
    Thanks in advance.

    InitialContext ctx = new InitialContext();
         GeneralEditor editor = (GeneralEditor) ctx
                        .lookup("GeneralEditorBean/remote");
              GeneralService service = (GeneralService) ctx
                        .lookup("GeneralServiceBean/remote");
              LanMu lm = new LanMu();
              lm.setName("shdfkhsad");
              editor.add(lm);

  • How to connect to remote EJB 3.0 deployed on Glassfish from ADF application

    Hello, as we haven't managed to deploy ADF app with EJB 3.0 on Glassfish AS, nor on tomcat 6 with openEJB, nor on JBOSS 5GA, we're trying to deploy our app with remote interface on tomcat 6. We're using ADF, JSF and EJB 3.0 (Eclipselink as JPA).
    When the model project is deployed on WLS 10.3, everything works fine. Here is a part from DataControls.cpx
    <Source>
    <ejb-definition ejb-version="3.0" ejb-name="MySession"
    ejb-type="Session"
    ejb-business-interface="model.MySession"
    ejb-interface-type="remote"
    jndi-name="MySessionBean#model.MySession"
    provider-url="t3://localhost:7001"
    initial-context-factory="weblogic.jndi.WLInitialContextFactory"
    xmlns="http://xmlns.oracle.com/adfm/adapter/ejb"
    DataControlHandler="oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler"/>
    </Source>Now the model project is deployed on Glassfish 2. I had to change DataControls.cpx
    <Source>
    <ejb-definition ejb-version="3.0" ejb-name="MySession"
    ejb-type="Session"
    ejb-business-interface="model.MySession"
    ejb-interface-type="remote"
    jndi-name="MySessionBean#model.MySession"
    provider-url="iiop://localhost:3700"
    initial-context-factory="com.sun.enterprise.naming.SerialInitContextFactory"
    xmlns="http://xmlns.oracle.com/adfm/adapter/ejb"
    DataControlHandler="oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler"/>
    </Source>But I get the following error:
    SEVERE: Exception:
    oracle.jbo.JboException: JBO-29000: Выявлено непредвиденное исключение: javax.naming.NameNotFoundException, сообщ.=Exception in lookup.: `DocJournalService' could not be found.
         at oracle.adfinternal.model.adapter.ejb.EjbDataControl.<init>(EjbDataControl.java:171)
         at oracle.adfinternal.model.adapter.ejb.EjbDefinition.createDataControl(EjbDefinition.java:142)
         at oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:173)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:166)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.naming.NameNotFoundException: Exception in lookup.: `DocJournalService' could not be found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
         at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:58)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:252)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:230)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.adfinternal.model.adapter.ejb.EjbDataControl.<init>(EjbDataControl.java:148)
         ... 60 more
    Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
         at org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:406)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:241)
         ... 63 more
    ## Detail 0 ##
    javax.naming.NameNotFoundException: Exception in lookup.: `DocJournalService' could not be found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
         at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:58)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:252)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:230)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.adfinternal.model.adapter.ejb.EjbDataControl.<init>(EjbDataControl.java:148)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
         at org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:406)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:241)
         ... 63 more
    Could you tell me where is my mistake?

    http://www.alexnet.fr/doc/oracle/oas10132/web.1013/b28221/undejdev003.htm

  • Problem with connecting from Netweaver Session Bean to SAP R/3

    Hi,
    i just want a connection to RFC in SAP R/3 and with help of sap ("Proxy generation" etc) and wizard in NWDS i get the rfc. Now i want to connect and use it (like in handbook) but: Every time i create and use jcoclient.connect() system gets an error like:
    "Class File Editor
    Source not found
    The jar file jrfc.jar has no source attachment."
    I have add all files that are used to "Used DCs" or bind library into projekt as "Third party library", but the error is still there.
    Any idea? Do i have to make something else? Some failure made?
    thx
    Here is text for connection:
    Created on 26.06.2008
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.XXXXXXXXXXXXXXXXX;
    import com.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
    import com.sap.aii.proxy.framework.core.ApplicationFaultException;
    import com.sap.aii.proxy.framework.core.SystemFaultException;
    import com.sap.mw.jco.JCO;
    @author XXXXX
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class MyMainClass extends Object
         public static void main(String[] args)
              throws ApplicationFaultException, SystemFaultException
              JCO.Client jcoclient =
                   JCO.createClient(
                        "XXX", //Client
                        "XXX", //User
                        "XXX", //Password
                        "XXX", //Language
                        "XXX", //Server
                        "XXX", //System
                        "XXX"); //Group
              jcoclient.connect();
              jcoclient.disconnect();
    Edited by: Torsten on Aug 27, 2008 10:43 AM
    Where can we download SAP NW7.0 (2004s) as Java Trial for testing? We only find ABAP Trial... Link? thx

    So we tested some things that are described in the SDN or by SAP with Connectors.
    We tested JCO version 2.0.12, 2.1.18 and 3.0 in J2EE Projects in netweaver and in Eclipse (Standalone).
    For version 2.0.12 there is a failure that this version is not compatible with the other things in netweaver.
    This version is for standalone and integrated sytems.
    For version 2.1.18 is only described as standalone and so failure happened in netweaver that other classes are coruppted or missed. The internal test in "content administrator" (Ping and Test) do not work and had the same error.
    For version 3.0 (that displace the other two versions) there is many to do in  settings and coding that we do not have tested yet because project is not that small to write it for JCO 3.0 only for testing. When we only displaced files in netweaver the server do not start any more.
    So:
    Is there a way to call R/3 from session bean and 1. create an JCO client or 2. add a client to the "standard" pool of netweaver to use it?
    Any ideas? help? links?
    Project have to be complete in september...
    Our combi is SAP Netweaver 2004 SP21 on Windows XP SP2 / Server 2003 Standard SP1 with JVM 1.4.2_16... need of any more info?
    thx

  • Connecting to an ejb from another appserver

    Hello,
    I need to connect to an EJB running on a company's REMOTE Weblogic
    appserver. I have done so using normal class files but now I wish to use an
    EJB to do so. I am using Jboss but am getting errors from Jboss saying that
    it cannot find certain files. Should I be able to connect to the remote
    Weblogic server simply by giving JBOSS the url/t3 of it? This is what I am
    doing in the JBOSS deployed ejb:
    Properties properties = new Properties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    properties.put(Context.PROVIDER_URL, "t3://xxx.xxx.xx.xx");
    InitialContext ctx = new InitialContext(properties);
    should I just be using JBOSS context factory in my bean code or do I need
    weblogic's? Doing this the way I am above, Jboss says it cannot find
    "weblogic.jndi.WLInitialContextFactory". So I jared up the parent directory
    inserting it into jboss and the next time it told me it couldn't find
    com.java.util.collections.ArrayList. So I jarred up the com directory from
    weblogic and gave jboss access to it. I now get a classnotfound for a class
    which IS contained in the com directory which is now available to Jboss.
    This tells me that I am going about this THE WRONG WAY. If anyone can help
    or point me to a tutorial telling me how I can use another appserver to
    connect to a remote Weblogic Server I would greatly appreciate it.
    Troy Harris

    Easier said then done (getting the higher ups to spend money on an expensive
    ejb server right now).
    Thanks,
    Troy Harris
    "Rob Woollen" <[email protected]> wrote in message
    news:[email protected]..
    No, you would need the weblogic classes on the client-side. You'd be
    better off developing your ejb in wls.
    -- Rob
    Troy Lejuan Harris wrote:
    Hello,
    I need to connect to an EJB running on a company's REMOTE Weblogic
    appserver. I have done so using normal class files but now I wish to
    use an
    EJB to do so. I am using Jboss but am getting errors from Jboss sayingthat
    it cannot find certain files. Should I be able to connect to the remote
    Weblogic server simply by giving JBOSS the url/t3 of it? This is what Iam
    doing in the JBOSS deployed ejb:
    Properties properties = new Properties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    properties.put(Context.PROVIDER_URL, "t3://xxx.xxx.xx.xx");
    InitialContext ctx = new InitialContext(properties);
    should I just be using JBOSS context factory in my bean code or do Ineed
    weblogic's? Doing this the way I am above, Jboss says it cannot find
    "weblogic.jndi.WLInitialContextFactory". So I jared up the parentdirectory
    inserting it into jboss and the next time it told me it couldn't find
    com.java.util.collections.ArrayList. So I jarred up the com directoryfrom
    weblogic and gave jboss access to it. I now get a classnotfound for aclass
    which IS contained in the com directory which is now available to Jboss.
    This tells me that I am going about this THE WRONG WAY. If anyone canhelp
    or point me to a tutorial telling me how I can use another appserver to
    connect to a remote Weblogic Server I would greatly appreciate it.
    Troy Harris

  • How to call session EJB from EP service in EP 7.0?

    Hi,
    I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
    I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
    Can anyone please help me?
    Regards,
    Tomas

    Hi Satya ,
              please go though following blog for used DC concept.
    Componentization of Webdynpro Application in CE7.1
    In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller

  • Connectivity from ejb to Resource Adapter at run time

              I am facing a problem regarding the look-up of the Resource Adapter from the Ejb.
              To explain :
              1.I have The <resource-ref> tag in ejb-jar.xml set at follows :
              <resource-ref>
              <description>The Resource Adapter</description>
              <res-ref-name>eis/RitResourceAdapter</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
              </resource-ref>
              and the <resource-description> tag in weblogic-ejb-jar.xml as follows:
              <resource-description>
              <res-ref-name>eis/RitResourceAdapter</res-ref-name>
              <jndi-name>eis/RitResourceAdapterConnectorJNDINAME</jndi-name>
              </resource-description>
              2.Even though I have mentioned the res-ref-type as javax.sql.Datasource , in my
              code I have done :
              rcf = (RitConnectionFactory) c.lookup ("java:comp/env/eis/RitResourceAdpapter");
              Where rcf is the my Resource Adapter specific Connection Factory (one which
              I have prepared and not
              the javax.resource.cci.ConnectionFactory). So this means the connection
              object which I get is casted to
              get my own application specific connection object.
              3.When I run my servlet (which looks up the Ejb and which in turn looks-up the
              Resource Adapter) it works fine to the point that it looks-up the bean successfully
              but fails when it tries to do so for Resource Adapter. The Server exception is
              as follows :
                        javax.ejb.EJBException
                        - with nested exception:
              [javax.naming.NameNotFoundException: Unable to resolve comp/env/eis/RitResourceAdpapter/
              Resolved: 'comp/env/eis' Unresolved:'RitResourceAdpapter' ; remaining name '']
              It will be great to hear about any solution from you people.
              For your information :
              I am using Weblogic 6.1, both the ejb jar and the RitResourceAdapter.rar has been
              deployed and the relevant portion of the weblogic-ra. xml is :
              <connection-factory-name>LogicalNameOfRitResourceAdapter</connection-factory-name>
              <jndi-name>eis/RitResourceAdapterConnectorJNDINAME</jndi-name>
              Regards,
              Ritwik
              

    > My question here is that is there any way where I do not put the queue name in the sender adapter at design time and based on the data availability in the queue let the sender adapter know the queue name to be processed at run time.
    Unfortunately for JMS Sender CC it is not possible, but other way around is possible. I.e. you can dynamically choose the receving queue names by using ASMA "JMSReplyTo" in JMS Sender CC.
    Regards,
    Sarvesh

Maybe you are looking for