EJB call across server instance with multiple Datasource

Hi,
          I posted in the EJB group and was told people here will be able to help.
          I'm currently facing a serious integration problem. The problem occurs when an EJB in my application (my instance) tries to call another EJB in a separate application (in another instance). Hope someone can help me to overcome this.
          My setup is WLS 8.1 SP2 (1 domain, 2 instances) with Oracle 9i.
          The scenario is as follows:
          EJB A (tx required) in instance A calls EJB B (tx required) in instance B.
          EJB A uses datasource A in instance A to update database A and EJB B uses datasource B in instance B to update database B.
          When I tried with both datasources using non-XA driver and both using XA driver the result is the same, EJB A executes fine and can successfully invoke the method on EJB B. But when EJB B tries to lookup the datasource B, it goes to instance A to do that and of course fails to find it.
          It only works when I create and deploy datasource B (XA) to instance A as well, meaning I now have datasources A and B in instance A.
          It all works well when I use a servlet(e.g.) in instance A to call EJB B. Leading me to suspect that the error could be due to some problems or behaviour which I may have missed out during the propagation of the transaction or the EJB context.
          This behaviour seems very illogical, can someone please enlighten me. Any help will be very much appreciated.
          Thanks,
          Kelvin

You might try asking this over in the transaction group:
http://forums.bea.com/bea/forum.jspa?forumID=2052
-thorick

Similar Messages

  • JNDI Lookup for multiple server instances with multiple cluster nodes

    Hi Experts,
    I need help with retreiving log files for multiple server instances with multiple cluster nodes. The system is Netweaver 7.01.
    There are 3 server instances all instances with 3 cluster nodes.
    There are EJB session beans deployed on them to retreive the log information for each server node.
    In the session bean there is a method:
    public List getServers() {
      List servers = new ArrayList();
      ClassLoader saveLoader = Thread.currentThread().getContextClassLoader();
      try {
       Properties prop = new Properties();
       prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
       prop.put(Context.SECURITY_AUTHENTICATION, "none");
       Thread.currentThread().setContextClassLoader((com.sap.engine.services.adminadapter.interfaces.RemoteAdminInterface.class).getClassLoader());
       InitialContext mInitialContext = new InitialContext(prop);
       RemoteAdminInterface rai = (RemoteAdminInterface) mInitialContext.lookup("adminadapter");
       ClusterAdministrator cadm = rai.getClusterAdministrator();
       ConvenienceEngineAdministrator cea = rai.getConvenienceEngineAdministrator();
       int nodeId[] = cea.getClusterNodeIds();
       int dispatcherId = 0;
       String dispatcherIP = null;
       String p4Port = null;
       for (int i = 0; i < nodeId.length; i++) {
        if (cea.getClusterNodeType(nodeId[i]) != 1)
         continue;
        Properties dispatcherProp = cadm.getNodeInfo(nodeId[i]);
        dispatcherIP = dispatcherProp.getProperty("Host", "localhost");
        p4Port = cea.getServiceProperty(nodeId[i], "p4", "port");
        String[] loc = new String[3];
        loc[0] = dispatcherIP;
        loc[1] = p4Port;
        loc[2] = null;
        servers.add(loc);
       mInitialContext.close();
      } catch (NamingException e) {
      } catch (RemoteException e) {
      } finally {
       Thread.currentThread().setContextClassLoader(saveLoader);
      return servers;
    and the retreived server information used here in another class:
    public void run() {
      ReadLogsSession readLogsSession;
      int total = servers.size();
      for (Iterator iter = servers.iterator(); iter.hasNext();) {
       if (keepAlive) {
        try {
         Thread.sleep(500);
        } catch (InterruptedException e) {
         status = status + e.getMessage();
         System.err.println("LogReader Thread Exception" + e.toString());
         e.printStackTrace();
        String[] serverLocs = (String[]) iter.next();
        searchFilter.setDetails("[" + serverLocs[1] + "]");
        Properties prop = new Properties();
        prop.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
        prop.put(Context.PROVIDER_URL, serverLocs[0] + ":" + serverLocs[1]);
        System.err.println("LogReader run [" + serverLocs[0] + ":" + serverLocs[1] + "]");
        status = " Reading :[" + serverLocs[0] + ":" + serverLocs[1] + "] servers :[" + currentIndex + "/" + total + " ] ";
        prop.put("force_remote", "true");
        prop.put(Context.SECURITY_AUTHENTICATION, "none");
        try {
         Context ctx = new InitialContext(prop);
         Object ob = ctx.lookup("com.xom.sia.ReadLogsSession");
         ReadLogsSessionHome readLogsSessionHome = (ReadLogsSessionHome) PortableRemoteObject.narrow(ob, ReadLogsSessionHome.class);
         status = status + "Found ReadLogsSessionHome ["+readLogsSessionHome+"]";
         readLogsSession = readLogsSessionHome.create();
         if(readLogsSession!=null){
          status = status + " Created  ["+readLogsSession+"]";
          List l = readLogsSession.getAuditLogs(searchFilter);
          serverLocs[2] = String.valueOf(l.size());
          status = status + serverLocs[2];
          allRecords.addAll(l);
         }else{
          status = status + " unable to create  readLogsSession ";
         ctx.close();
        } catch (NamingException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (CreateException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (IOException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (Exception e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
       currentIndex++;
      jobComplete = true;
    The application is working for multiple server instances with a single cluster node but not working for multiple cusltered environment.
    Anybody knows what should be changed to handle more cluster nodes?
    Thanks,
    Gergely

    Thanks for the response.
    I was afraid that it would be something like that although
    was hoping for
    something closer to the application pools we use with IIS to
    isolate sites
    and limit the impact one badly behaving one can have on
    another.
    mmr
    "Ian Skinner" <[email protected]> wrote in message
    news:fe5u5v$pue$[email protected]..
    > Run CF with one instance. Look at your processes and see
    how much memory
    > the "JRun" process is using, multiply this by number of
    other CF
    > instances.
    >
    > You are most likely going to end up on implementing a
    "handful" of
    > instances versus "dozens" of instance on all but the
    beefiest of servers.
    >
    > This can be affected by how much memory each instance
    uses. An
    > application that puts major amounts of data into
    persistent scopes such as
    > application and|or session will have a larger foot print
    then a leaner
    > application that does not put much data into memory
    and|or leave it there
    > for a very long time.
    >
    > I know the first time we made use of CF in it's
    multi-home flavor, we went
    > a bit overboard and created way too many. After nearly
    bringing a
    > moderate server to its knees, we consolidated until we
    had three or four
    > or so IIRC. A couple dedicated to to each of our largest
    and most
    > critical applications and a couple general instances
    that ran many smaller
    > applications each.
    >
    >
    >
    >
    >

  • How to configure single web server instance to multiple application servers..

    Hi all,
    we are running single instance of IWS6.0 SP2 on solaris, we want to comfigure this single instance to multiple application servers(JRun). Can any one advise me whether it is possible to do.
    Thanks
    Raj

    Hi Raj,
    "how to configure single web server instance to multiple application servers.."
    It's not possible for setting up multiple applicataion servers for Single iWS instance.
    Thanks,
    Dakshin.

  • Upgrade 32–bit Sun DSEE Server Instances with 64-bit RHEL 4.6?

    I want to update 32–bit Sun DSEE Server Instances with 64-bit RHEL 4.6 to 64-bit ODSEE 11.1.1.5.0 with 64-bit RHEL 4.6.
    Thanks

    But it will be on the same physical machine or on a separate server? How big will be the DB?
    Will be in the same topology? Separate topologies?
    If you can afford some downtime and you've got different machines, you could plan a 'cold' migration:
    - Stop the old DS instance
    - Export to LDIF with NO REPLICA INFORMATION (this will also clean up a bit the DB!)
    - Copy schema and indexes definition from source to target environment.
    - Import from LDIF to the new DS topology
    After that you'll have to tune the new environment, in terms of memory , entry cache, indexes, etc...
    HTH,
    Maco

  • Can we link one application instance with multiple databases ?

    We have R12.1.1 and db is 11.1.0.7 on redhat 5.3 ( 64 bit).
    Can we link one application instance ( apps / , inst / ) with multiple database ( db / ),
    is this possible ?
    if yes how ?

    >
    Can we link one application instance ( apps / , inst / ) with multiple database ( db / ),
    is this possible ?
    No. You cant link application tier with more than one database.
    Similar query already answered by Hussein in detail in the forum :Re: Multiple instances, single Apps tier Please check that for more details
    -Rk

  • Accessing specific app server instance with proxy

    We are running WLS 6.1 SP4 and WebLogic Portal 4.0 SP3. We are running a cluster
    with an apache web server out front acting as a proxy. We have HTTP_PORT defined
    as 80 in web.xml for the Apache server. The app servers are running on port 8501.
    We've noticed that when we try to access our application on a specific app server
    by going to the app server address and port directly, the URL's that are created
    in the response HTML pages by the createWebflowURL tags contain the web server
    port instead of the app server port.
    We're wondering if there is anything that we can configure so that a client can
    come in through the web server or through a specific app server instance and have
    the application URL's still work (i.e. handle both cases dynamically). While
    the createWebflowURL tag seems to use request.getServerName() it does not seem
    to use request.getServerPort() as we'd expect. Instead, it uses the hard-coded
    HTTP_PORT or the app server port if HTTP_PORT is not specified.
    Any ideas? Without this, it appears difficult to execute tests on a specific
    app server for monitoring purposes when running with a proxy server and a cluster.
    Regards,
    Jeff

    For anybody who reads this expecting a resolution, I eventually found out the cause of the problem... Dodgy nvram. After looking a little closer, I noticed the date had reset to pre-epoch and was not getting more than 3 seconds past the hour. After resetting the date/time, the same problem was apparent. I reported this to Sun who swapped out the nvram and everything is back to normal.
    Oh, and when I set the date to post-epoch, the JVM worked fine again.

  • Security  issue when mi server interacts with multiple backend.

    hii all,
    i wanted to know that if suppose mi server is interacting with multiple backend then how to maintain application access
    security for differnt back end and how & where to customize or configure it.
    thanks in advance.

    Hi Dev,
    Every syncBo has a RFC destination which represent the target system (backend) on which the bapi wrappers for that particular syncBo resides. This RFC destination  is configured in the transaction SM59, which provides you with various secuirty configurations.
    For more info consult your basis consultant in this regards.
    Regards,
    Rahul
    If this helps, do not forget my points

  • EJB calls in clustered environment with load balancers

    Hi,
    I am using WebSphere 6.1 (WAS) as my AppServer.
    Lets say I have two nodes, node A and node B, as my APPSERV nodes in a cluster.
    From a shell script, present on a node (lets say node A), I am invoking a business method in my EJB (lets say Bean.methodToBeCalled()) using the connection as "localhost", as my requirement is that through this call, I need to have the EJB call to node A only, i.e. only the bean on the current node should get invoked. Not the bean on node B.
    However, I am not getting the expected result as the call is randomly getting directed to either node A or node B depending on the load balancer logic implemented by WAS.
    I referred to the link which explained how EJB clustering works in WAS.
    Is there some way I can achieve the desired result?
    Thanks.

    Do you have an entry in the table for the corresponding primary key in the Staging database?
              Thanks
              Seshi

  • EJB 3.0 Cache Issue With OC4J Instance With Multiple JVM's

    I created an EJB 3.0 project in JDeveloper 10.1.3.3.0 and everything works fine in the embedded OC4J server. I am deploying the application to an OC4J instance consisting of 3 Java Virtual Machines in Oracle Application server 10.1.3 and seem to be getting a different persistence context for each virtual machine. i.e. I'll have 3 browsers that can view the same data even after updating, another 2 browsers that can't see the first 3's changes but can see changes by any browser in this group, etc.
    I tried adding the below to the persistence-unit tag in the persistence.xml but it didn't seem to help.
    <properties>
    <property name="toplink.cache.shared.default" value="true"/>
    </properties>
    How do you get all connections to use the same cache?

    here is the code for my bean.
    package com.ups;
    import java.util.logging.Logger;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.EJBException;
    import javax.ejb.MessageDriven;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    * Message-Driven Bean implementation class for: MessageBean
    @MessageDriven(
              activationConfig = { @ActivationConfigProperty(
                        propertyName = "destinationType", propertyValue = "javax.jms.Queue"
    public class MessageBean implements MessageListener {
         private MessageDrivenContext mdc;
    * Default constructor.
    public MessageBean() {
    // TODO Auto-generated constructor stub
    * @see MessageListener#onMessage(Message)
    public void onMessage(Message message) {
         TextMessage tmsg = null;
    try {
    tmsg = (TextMessage) message;
    System.out.println("MESSAGE BEAN: Message received: " + tmsg.getText( ));
    System.out.println ("The onMessage() is called");
    } catch (JMSException e) {
    e.printStackTrace( );
    mdc.setRollbackOnly( );
    catch (Throwable th) {
    th.printStackTrace();
    public void ejbRemove( )throws EJBException{
         System.out.println("ejbRemove() is executed >>>>>>>");
    I have configured my JMS Distributed queue in the Weblogic.
    If possible please provide more details so that I can get rid of this error as soon as possible.
    Thanks for reply.
    Piyush

  • Application Server slowdown with multiple proxy servers ?

    Our environment has our iAS boxes talking to iWS web servers which are front-ended with iPlanet Proxy servers (Proxy 3.53 I believe). We are seeing significant slowdown if we try and hit our web apps through the proxy as opposed to going directly to the web server (bypassing the proxy servers). One of our "proxy" guys recalls hearing that there is an issue with the app server's handling of sessions if requests from the same user come in to the web server (and by extension the app server) from multiple proxy servers with different ip's. Has any body ever encountered this or does any body know if the app server has an issue handling the same sessions whose requests come from different ip addresses (different proxies)?

    The proxy work with HTTP 1.0 and the webserver with HTTP 1.1.
    This difference could be the cause of your problems.
    "David Fuelling" <[email protected]> escribio en el mensaje
    news:[email protected]..
    Our environment has our iAS boxes talking to iWS web servers which are
    front-ended with iPlanet Proxy servers (Proxy 3.53 I believe). We
    are seeing significant slowdown if we try and hit our web apps through
    the proxy as opposed to going directly to the web server (bypassing
    the proxy servers). One of our "proxy" guys recalls hearing that
    there is an issue with the app server's handling of sessions if
    requests from the same user come in to the web server (and by
    extension the app server) from multiple proxy servers with different
    ip's. Has any body ever encountered this or does any body know if the
    app server has an issue handling the same sessions whose requests come
    from different ip addresses (different proxies)?
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Windows Server CNA with multiple NICs needed

    I have a Windows server in which I am teaming two CNA connections for Networking and Storage.  They are teamed using the Emulex teaming utility.  I want to set up a primary network and a backup network, but I cannot seem to edit the current
    configured team to allow for multiple connections.  Can anybody help out?

    Hi,
    To resolve your problem as soon as possible, please consult the teaming utility manufacturer about this issue.
    To configure NIC Teaming on Windows Server 2012R2, please follow the steps below,
    Click the server name in the list of servers (even if there is only a single server).
    From the Tasks drop-down menu in the
    Teams section, click New Team.
    In the Add Team dialog box, type a team name and select the network adapters in the team.
    If you are using VLANs, clear the Default check box and specify the VLAN ID. By default, the team will deliver up all traffic received regardless of VLAN ID (though the VLAN ID is passed with the packet so that
    other components in the stack can sort them appropriately).
    If you want to use a mode other than the default, click
    Advanced and specify the teaming mode (Switch Independent, Static Teaming, or LACP) and load distribution mode (Address Hash) as needed.
    Click OK to create the team.
    You can change the Active/Standby adapter in step 5
    For detailed information, please view the link below,
    NIC Teaming Overview
    http://technet.microsoft.com/en-us/library/hh831648.aspx
    Hope this helps.
    Steven Lee
    TechNet Community Support

  • CSM health probe for server farm with multiple vservers

    Is there a way to specify the vserver port that a health probe monitors when multiple vservers are configured for the same serverfarm? Let's say I have a serverfarm named farm1. farm1 services two ports www and https so two vservers vserver_www and vserver_https are configured and bound to farm1. I would like to enable http health probe on farm1 with the intention of only monitoring vserver_www http port but, instead, the health probe monitors both www and https and since a http probe on https fails it takes farm1 reals and both vservers vserver_www and vserver_https out-of-service. Is there a way to configure a health probe to monitor a specific port? Or, should I create two duplicate serverfarms farm1 bound to vserver_www and farm2 bound to vserver_https and only enable http health probe on farm1? Any other ideas welcomed.

    Appreciate the feedback. I also found what I was looking for in configuration examples. To summarize I've borrowed the comment from the URL below:
    # The port for the probe is inherited from the vservers.
    # The port is necessary in this case, since the same farm
    # is serving a vserver on port 80 and one on port 23.
    # If the "port 80" parameter is removed, the HTTP probe
    # will be sent out on both ports 80 and 23, thus failing
    # on port 23 which does not serve HTTP requests.
    http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/mod_icn/csm/csm_4_2/config/cfgxpls.htm

  • How to fix a report textbox aggregate expression error in SQL server reporting with multiple datasets?

    I have a SQL Server Reporting Services report that has a textbox within a Report with variations of the following expression 
    =Sum(IiF(Fields!RegisterID.Value = 6000, 1, 0) 
    and 
    Iif(Fields!PointID.Value = 500, 1, 0)) / Sum(Iif(Fields!PointID.Value = 500, 1, 0)) 
    I see the following error when I try to preview the report: 
    The Value expression for the text box ‘Textbox2’ uses an aggregate expression without a scope. A scope is required for all aggregates used outside of a data region unless the report contains exactly one dataset. 
    What am I missing in this this expression to make it run incorrectly

    Can you include dataset name in your sum functions? e.g. Sum(IiF(Fields!RegisterID.Value = 6000, 1, 0) 
    and 
    Iif(Fields!PointID.Value = 500, 1, 0)) should include your dataset name as Sum(IiF(Fields!RegisterID.Value = 6000, 1, 0) and Iif(Fields!PointID.Value = 500, 1, 0),"datasetname")Like wise  Sum(Iif(Fields!PointID.Value = 500, 1, 0))  should also have dataset name Sum(Iif(Fields!PointID.Value = 500, 1, 0),"datasetname") 
    Gaur

  • Using as ITS instance with multiple SAP systems

    Hello,
    Despite the recommendation of note 731679, I´m looking for some documentation or tips related to an ITS configuration to support two different SAP systems.
    The note refers to "setting the relevant parameters in the service files or by using URL parameters" but I didn´t found a clear recipe.
    Did someone there implement this scenario?
    Thanks in advance,
    Rodrigo

    This works fine for a single host system (development) but when I try with a dual-host my new instance u201CBu201D reads the service files of instance u201CAu201D when I try to start an IAC.  I gone through all the xml config files and canu2019t find anything wrong.  I have instance B configured to use different ports then A.  Separate IIS sites for each instance running on WIN2003.
    How do the wGate know the correct Agate process to connect to?
    Thanks,
    Ron

  • Finder Wants Permission Every time File is moved on Server (issue with multiple users)

    The Situation: I have a team of seven coworkers that uses a file structure on a server to move job folders from the 'active jobs' folder to "coworker x's" folder and then to a "waiting" folder once the job has been completed. Pretty much just moving folders into different folders. Seems pretty simple.
    The Problem: At times, some folders will not move from one folder to another, and a message pops up asking "Finder wants to make changes. Type your password to allow this" and then it shows my computer's name and asks for a password. Now if typing in the password meant that the file would be moved, I would be fine with it, but when I type in my password in and accepts it, it does nothing! Like I said, there are seven of us that are using this system, and everyone has the same issue with the same folders, it is not like one person can move it and another cannot. To make it even harder to define where the issue is coming from: if you go back after a few minutes / hours, the folder will randomly be able to move with no issue. If you take the files out of the folder, you can move them, and when you move the now empty folder, it will gladly move into any folder, but when the files remain in the folder it asks for the password. And in some cases, folders that were just made and are empty have the same issue, which leads me to believe that this issue is not a result of the contents of the folder, but something else.
    It is seemingly impossible to nail down the cause of our dilemma so I have come here in hopes of a great break through. The worst part is is that we are not doing anything that difficult, we are simply moving folders around. This is a windows based server, that might be important. Also, some of us are running Mavericks and others are still on Snow Leopard. Thank you for any information you might have! ( I have already tried the boot in recovery, resetpassword trick with no luck >_< )

    If we're going to fix this, we will have to concentrate on one person to start with. Can that be you?
    Some more information is required, only from you, your Mac and your windows user account on the server:
    On the Windows server, are the 3 folders in question within the one shared folder?
    What is the name of the Volume (share) that appears in Finder?
    Are any of the folders being copied or moved to the local drive of the Mac?
    On the windows server, what are the permissions that you have to:
      The top-level shared folder
      The 3 folders underneath the top-level shared folder
    Do a Get Info of the Volume (share) in Finder and do a screen shot of both the area above Preview and the area below Preview (Preview itself is not required. Make sure all right-pointing arrows are expanded to down-pointing arrows so all info in each section can be seen.
    (Did this discussion get re-assigned to the OS X Server Community? I've never been there, and I thought I found it in the OS X Mavericks community.) Are you actually running OS X Server on the Macs?
    Message was edited by: SilverSkyRat: Additional Question

Maybe you are looking for

  • Lock NOT set for: Loading master data attributes error

    Hi experts, We were encountering this error before when trying to load master data.  When we checked the system we could not find any locks at the time, and activation or kicking off the attribute change run failed again.  We finally solved the probl

  • How to enter values in JList box and JTable ???

    Hi friends... i am new to Swing SInce i am using Netbeans IDE 5.5 and there is easy to do swing programming using this IDE now i am confused using JTable and JList box since i used method Insert in AWT but how to add values in LIST BOX ( JList ) ex.

  • How do i output a table in a teststand report

    I'm using TestStand 3.0 and Labview 7.0. I have a string table in my labview step that i want to see in the teststand report. How do i do this? thanks

  • How to avoid mutating error when insert or update record

    Hi , I have one transaction table which is having some detail record under one transaction number, after the one transaction number is over by insert or update, i want to check the total amounts of one flag should be matched on same table if it is no

  • Connecting a Thunderbolt external HDD to FW800 port

    Can I read/write from my late 2009 iMac to a Thunderbolt external HDD by connecting from the FW800 port on the iMac through a Thunderbolt to FW800 adaptor on the external HDD? I have a new MacBook Pro and want to be able to swap an external HDD betwe