Two ear file communicating with each other

HI,
I have one doubt,
I Have two ear files (two webservices actually) deployed succesfully in the same application server (Weblogic7.0). Let us say them a.ear and b.ear
In a.ear there are class say A.class and B.class. In B.java file there is a staic HashMap which stores some object based on some id. Also in B.java there is static method which takes the id as a parameter and return the corrospojnding object stored in the static hasmap.
In b.ear file there class say B.class and C.class. Note that this ear file has its own copy of B.class file. In C.java file i create an object (though i dont need create being it a static method) of B.java and calls the static object passing it the id and expecting it that it will return me the object stored in the Hashmap. it returns me null though it has the objects stored for that id.
Is it because both ear files has their own copy of B.class. but i though that that they are running in the same jvm in application server so it should not be a problem. if this is the reason then my problem will be solved if i put them in same ear file.
Can anybody put his insights into his experiences and lemme know what is the cause of problem and solution and for my knowledge why it is happening.
Best Regards,
Akhil Nagpal

You're right that the two have different copies of the class. This is because the EJB container uses a different classloader for different applications, to prevent statics clashing with each other and other related security reasons.
Usually if you want to communicate from one to the other, you would use the EJB mechanism itself. The JNDI names should be global (from simple tests I did in the past, this seems to be the case) so that one application can look up an EJB from the other.

Similar Messages

  • VM Machines not communicating with each other on Hyper-V 2012

    In Hyper-V 2012 on Server 2012 I have created two VM's Server 2008 64-bit & Server 2012 64-bit.
    The problem is both VM's are not communicating with each other.
    Regards
    Ganesh Parte

    Hello,
    seems this belongs to the Hyper-V networking configuration settings. Please ask this in http://social.technet.microsoft.com/Forums/en-US/home?forum=winserverhyperv
    and also describe how you have the network settings configured in the Hyper-V MMC.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • BODS / SAP : what set-ups are required for communicating with each other ?

    Hi.
    There is a new SAP system
    And there is a new BODS installation.
    Both on independent server machines but on the same lan network.
    On the test system of BODS. We tried to see how the communication happens with SAP.
    While we try some test jobs by trying to pull a simple table on SAP R/3
    In Dataflow, we used simple SAPR/3 ABAP flow. And put it into target database thro query transformation.
    In the datastore,
    We used the Generate and Execute option,
    with a path on the local directory of BODS server for creating the ABAP program and the dat file.
    However,
    We are always getting error on batch job schedule.
    Although the user is having rights on the R/3 table
    And can login into SAP R/3 system and check the table.
    Still we get an error saying Databstore unabel to connect to R/3 system. Check for user login etc.
    For anyone whose login we use. We get the error.
    However, if i directly generate the code on the ABAP flow (without running the job),
    make the program available on R/3 system.
    and then run the job as execute preloaded
    this works fine without any error.
    and we are able to see the data in the target table.
    Now both the systems are new.
    And am not aware of the initial set-ups which are required for communication between SAP / BODS.
    Are WE missing something on the SAP side setups - for generate and execute option to be used?
    Is there anything specific to be done for ease of the communication between SAP server and BODS server in this regard.
    Can anyone share some inputs on this.
    Actually for any user with full admin rights too, on the sap side, if we use the user login for R/3 connectivity for this particular "generate and execute" option,  it errors out after nearly 10 minutes. Then the error says, login info not correct.
    So basically, the communication channel by itself between SAP R/3 and BODS seems to be locked somewhere.
    If anyone with SAP admin expertise - can help or advise on this.
    Many thanks
    Indu
    Edited by: Indumathy Narayanan on Sep 13, 2011 9:20 PM

    Getting data out of R/3 requires two distinct setup tasks, and they don't have much to do with each other.
    The first basic task is to get the little ABAP extraction programs loaded and run in R/3.  You can pre-load them and then call them, or generate, upload, and execute them all on-the-fly, at BODS runtime.  During development, use "Generate and Execute" for your ABAP.
    Once that's done, you have four different choices to get the data back: "Direct download", "Shared directory", FTP, and "Customer Transfer". Normally, you'll use either FTP or "Shared directory".  Refer to the documentation (the BODS SAP Supplement) for a description of all this.
    In all cases (or at least, quite certainly, using the FTP and Shared Directory methods), the ABAP extraction programs are directed to plop their output as flat files in the "Working directory on SAP server."  For testing, you can look in that folder to see if any flat files are appearing when you submit an ABAP data flow.  If not, then either 1) your ABAP program isn't getting in there (a Basis admin should be able to tell you), or 2) it's not running (ditto), or 3) it's running but unable to generate the output file (ditto), because a) SAP isn't permitted to write to that folder, or b) the folder doesn't exist (it needs to be defined from the perspective of the SAP server).
    If you do see files appear in the "Working directory on SAP server" when you run a BODS job w/ an ABAP dataflow, then the problem is that BODS can't fetch them.  If you're using the "Shared directory" method, which is suitable for and often used in all-Windows environments, then the account under which the Job Server in question is running must have access to the "Working directory on SAP server," but this time from the perspective of the Job Server.  So if, for instance, SAP was directed to put the flat files on a local folder, say, "E:\USR\SAP\BODS", then you might want to share this folder out as, for instance,
    sapdev1\bods (for an SAP host called "sapdev1"), and then enter "
    sapdev1\bods" in the "Application path to shared directory" field, in your SAP datastore configuration.  If your Job Server service is logging-in as "Local System," though, it won't be able to get there -- it needs to log-in as an AD domain account w/ rights to that share.  Get it?  Try logging in to your BODS job server computer with the AD "service account" setup for use by the Job Server service, and try to open a file on the "Application path to shared directory". If you can't, then BODS won't be able to get data from ECC, either.  FTP works similarly -- if you're using that and having trouble, please re-post.
    Best wishes,
    Jeff Prenevost
    Data Services Practice Manager
    itelligence

  • 2 AIR applications directly communicating with each other in real time

    Building a installation that requires 2 different kiosks to communicate with each other. I'd like to use Adobe AIR to create the individual applications.
    My question is
    Is it possible for 2 separate AIR applications to DIRECTLY communicate with each other in real time, without any server to act as mediator?
    Ideally the only data that would be transferred would be json based.

    Not sure whether this helps; http://www.adobe.com/devnet/air/flex/articles/creating_socket_server.html

  • Two programers not interfering with each other

    Hello,
    I was asked this today and I did not know the answer.
    If I have two programers, which are modifying (let's say) a package at the same time and each one of them is modifying a different part of it. Does Oracle provide any method (except some verbal aggrement) to insure that these two guys will not be modifying the same thing.
    Thanx for replies.

    In order to modify a package, the developer would need to acquire a lock on the package. So Oracle would prevent two developers from modifying a package simultaneously. It would do nothing, though, to prevent two developers from serially overwriting each other's changes. That's one of the many reasons that you use an external source control system when developing any code, including database packages.
    Justin

  • Getting 4  swf files comunicate with each other on server

    Hallo
    I would like to ask anybody, may be a bit hard question.
    Firstly the example I'm talking about
    issue">http://www.kiamotors.cz/showroom/ceed_test.aspx
    home">issue
    site. See the flash movie on the bottom. That's it. Those are 4
    diferent swfs. The problem is, as you could noticed, load time of
    each other. If you want to ask why the hell you just wount make 1
    falsh video, put that white cross on top of it if u like the effect
    and ur done. But believe me or not I just simply can't. Site's
    useing special CMS where is 4 divs for 4 swfs... Here u can see it
    more clear [L=http://www.kiamotors.cz/[L=home page ... so here is
    my question.....
    Is ther any posibility to make swfs communicate with each
    other on server. Let's say... swf 1 don't start till swf 2,3,4 load
    aswell a.s.o.
    P.S.: sorry for my grammer ...

    You could use ExternalInterface to have javascript act as a
    middleman to communicate things across swf's, but if you don't have
    the ability to change the page code, which seems to be the case,
    then that probably will not owrk as a solution for you.

  • Two docking containers interact with each other

    Hello everyone!
    I have almost the same problem like here: [ALV tree & Docking container ???;
    I need to have ALV tree on the left, and on the right need to display ALV grid filtred with the tree nodes.
    but i need more specific help...
    I really need an working example program with two docking containers, where clicking on some object inside one, changeing something in another one.
    in se83 and dwdm there's no such thing.
    RSDEMO_DOCKING_CONTROL only shows two docing containers, no interaction
    SAPSIMPLE_TREE_CONTROL_DEMO does not use docking containers.
    Do you know any simple example where two docking cointaners doing somethig like that?
    Thanks & Regards
    Przemek

    Hi hamsterman,
    You can use this code source after some modification. I hope it helps you.
    http://wiki.sdn.sap.com/wiki/display/Snippets/Dispaly%20ALV%20report%20output%20in%20the%20SAME%20Selection%20Screen
    http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html
    Regards,
    Orhan

  • Objects communicating with each other

    Suppose I have a main class that has a Thread instance variable. What is the best way to notify the main class that something has happened in the thread?
    Example:
    I have a main class, a Producer, and a Consumer. Both the Producer and the Consumer extend Thread.
    The main class is supposed to keep track of when the Producer produces something, and when a Consumer consumes something.
    What is the best way for the Producer/Consumer to tell the main class that something has been produced/consumed?

    example of Vistor parttern from Wikipedia
    interface Visitor {
        void visit(Wheel wheel);
        void visit(Engine engine);
        void visit(Body body);
        void visitCar(Car car);
        void visitVehicle(Vehicle vehicle);
    class Wheel {
        private String name;
        Wheel(String name) {
            this.name = name;
        String getName() {
            return this.name;
        public void accept(Visitor visitor) {
            visitor.visit(this);
    class Engine {
        public void accept(Visitor visitor) {
            visitor.visit(this);
    class Body {
        public void accept(Visitor visitor) {
            visitor.visit(this);
    abstract class Vehicle {
        protected Engine  engine = new Engine();
        protected Body    body   = new Body();
        protected Wheel[] wheels;
        public Engine getEngine() {
            return this.engine;
        public Body getBody() {
            return this.body;
        public Wheel[] getWheels() {
            return this.wheels;
        public void accept(Visitor visitor) {
            visitor.visitVehicle(this);
    class Car extends Vehicle {
        public Car() {
            super();
            this.wheels = new Wheel[]
              { new Wheel("front left"), new Wheel("front right"),
                new Wheel("back left") , new Wheel("back right")  };
        public void accept(Visitor visitor) {
             visitor.visitCar(this);
    class PrintVisitor implements Visitor {
        public void visit(Wheel wheel) {
            System.out.println("Visiting "+ wheel.getName()
                                + " wheel");
        public void visit(Engine engine) {
            System.out.println("Visiting engine");
        public void visit(Body body) {
            System.out.println("Visiting body");
        public void visitVehicle(Vehicle vehicle) {
            System.out.println("Visiting vehicle");
        public void visitCar(Car car) {
            System.out.println("Visiting car");
            car.getEngine().accept(this);
            car.getBody().accept(this);
            for(Wheel wheel : car.getWheels()) {
                wheel.accept(this);
    class DoVisitor implements Visitor {
        public void visit(Wheel wheel) {
            System.out.println("Steering my wheel");
        public void visit(Engine engine) {
            System.out.println("Starting my engine");
        public void visit(Body body) {
            System.out.println("Moving my body");
        public void visitCar(Car car) {
            System.out.println("Starting my car");
            car.getEngine().accept(this);
            car.getBody().accept(this);
            for(Wheel wheel : car.getWheels()) {
                wheel.accept(this);
        public void visitVehicle(Vehicle vehicle) {
            System.out.println("Starting my vehicle");
    public class VisitorDemo {
        static public void main(String[] args){
            Car car = new Car();
            Visitor printVisitor = new PrintVisitor();
            Visitor doVisitor = new DoVisitor();
            car.accept(printVisitor);
            car.accept(doVisitor);
    }

  • How can I have threads communicate with each other?

    I'm working on a project that requires a group of classes communicating with each other. I decided on using a server and carrying out communication that way. However, my app only has communication between the client and server. I need the clients to be able to communicate with each other. Does anyone know how I can do this or point me to a good tutorial?

    Sorry, here's a bone stock example of my server and client:
    <SERVER>
    package testserver;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class TestServer
    static int portOpen;
    public static void main(String[] args)
    portOpen=4000;
    try
    ServerSocket portListener = new ServerSocket(portOpen);
    TestServer userThreads = new TestServer();
    while (1==1)
    Socket userConnection=portListener.accept();
    userThreads.new PortConnection(userConnection);
    catch (Exception e)
    System.out.println("The server encountered a serious error. Server shut down.");
    e.printStackTrace();
    System.exit(0);
    class PortConnection extends Thread
    //Declare variables to handle connections.
    Socket ourConnection;
    BufferedReader serverInput;
    PrintWriter serverOutput;
    PortConnection(Socket userConnection)
    try
    ourConnection=userConnection;
    serverInput=new BufferedReader(new InputStreamReader(userConnection.getInputStream()));
    serverOutput=new PrintWriter(userConnection.getOutputStream(),true);
    start();
    catch (Exception e)
    System.out.println("An error occurred when a user attempted a connection.");
    public void run()
    serverOutput.println("Welcome to the Server.");
    try
    serverOutput.close();
    serverInput.close();
    ourConnection.close();
    catch (Exception e)
    </SERVER>
    <CLIENT>
    package testclient;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class TestClient {
    static BufferedReader userInput;
    static Socket quizServer;
    static BufferedReader serverInput;
    static PrintWriter serverOutput;
    static String serverData;
    public static void main(String[] args) {
    userInput = new BufferedReader(new InputStreamReader(System.in));
    try {
    quizServer=new Socket("localhost",4000);
    catch (Exception e) {}
    try
    serverInput=new BufferedReader(new InputStreamReader(quizServer.getInputStream()));
    serverOutput=new PrintWriter(quizServer.getOutputStream(),true);
    catch (Exception e) {}
    try {
    serverData=serverInput.readLine();
    catch (Exception e) {}
    System.out.println(serverData);
    </CLIENT>

  • Migration between two environments which can't communicate with each other

    My customer is intending to do migration from test environment to production environment using CCM.
    But the two environments are not in the same network.
    The environments' setting is as blew.
    BO TEST Repository can communicate with Web BO Server.
    BO PRODUCTION Repository (Cluster environment) can communicate with Web BO Server.
    BO TEST Repository and BO PRODUCTION Repository (Cluster environment) are in the different network, they can't communicate with each other.
    Setting Target Repository manually in CCM.
    Questions are:
    1. In CCM, as long as both Source Repository and Target Repository can communicate with Web BO Server, the migration will be successful.
       Is that right?
    2. If 1 is not right, is there additional setting should I do?
       For example, If I need to open some firewall port?
    3. Is there other attentions should I notice?
    Thanks

    Questions are:
    1. In CCM, as long as both Source Repository and Target Repository can communicate with Web BO Server, the migration will be successful.
    Is that right?
    Yes that is correct
    2. If 1 is not right, is there additional setting should I do?
    For example, If I need to open some firewall port?
    You have another option which is to use the BIAR files. Export your objects to a BIAR file in source environment, and import them from BIAR into the target environment
    3. Is there other attentions should I notice?
    when using BIAR files as solution, Make sure that you keep them < 1GB size to avoid corruption
    you may have to increase or adjust timeouts on input and output repository servers as well

  • I have two location one is Delhi(IP-192.168.100.*) and another is Mumbai(IP-192.168.1.*) and both are connected by MPLS line and ping with each other. We have one DC in Delhi location and domain name is CAPLDC and Delhi location all PC is member of this

    I have two location one is Delhi(IP-192.168.100.*) and another is Mumbai(IP-192.168.1.*) and both are connected by MPLS line and ping with each other.
    We have one DC in Delhi location and domain name is CAPLDC and Delhi location all PC is member of this domain and working properly.
    now i am trying join the Mumbai location PC with my Domain(CAPLDC) but they are not join with my DC and generate the error.
    I have chek the DNS and nslookup all are correct but this is generate error. 
     Is this possible Mumbai location join with this Domain(CAPLDC)???
    One more thing when i have created another DC with this name (papldc.com) then Mumbai location is joined properly.
    Pls find the error message below and also find the attachment.
    Note: This information is intended for a network administrator.  If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt.
    The domain name "capldc" might be a NetBIOS domain name.  If this is the case, verify that the domain name is properly registered with WINS.
    If you are certain that the name is not a NetBIOS domain name, then the following information can help you troubleshoot your DNS configuration.
    DNS was successfully queried for the service location (SRV) resource record used to locate a domain controller for domain "capldc":
    The query was for the SRV record for _ldap._tcp.dc._msdcs.capldc
    The following domain controllers were identified by the query:
    capldcserver.capldc
    win-dyfq2poc88q.capldc
    However no domain controllers could be contacted.
    Common causes of this error include:
    - Host (A) or (AAAA) records that map the names of the domain controllers to their IP addresses are missing or contain incorrect addresses.
    - Domain controllers registered in DNS are not connected to the network or are not running.
    Pankaj Kumar

    Why are you using a single labeled domain? I would recommend renaming the domain name to be something like domain.com.
    Please refer to the articles below to fix your current issue:
    http://www.wincert.net/tips/networking/1614-cant-join-pc-to-a-domain-with-single-label.html
    http://www.itgeared.com/articles/1128-using-single-label-dns-names-for-active/
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • How do I enable two wireless clients to communicate with each other?

    I have a WRT54GL with the latest firmware.  I have two computers which are both connected to the router, with IP addresses assigned via DHCP.  Neither has a firewall running.  I cannot get them to communicate with each other -- even ping doesn't work.  I can ping the router itself using the IP address assigned to it on the WAN side by my ISP.   Both computers have no problem reaching the internet through the router.
    What settings on the router will enable the communication to occur?  I can't find anything in the router's user interface which appears to control this. 
    Thanks.
    Solved!
    Go to Solution.

    Hi annie25,
    I think it would be best to check on netgear or belkin technical forums how to make these two talk. 
    Yesterday is history. Tomorrow is mystery. Today is a gift.

  • I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    You can't merge accounts or copy content to a different account, so anything that you bought or downloaded via the old account is tied to that account - so any updates that those apps get you will only be able to download via that account. You can change which account is logged in on the iPad via Settings > Store

  • Link two LRT224 with each other using VPN

    What's the best way to connect two LRT224 with each other, which are in two different citys?
    Open VPN or IPSec?
    I think Gateway to Gateway should be the right mode, but I am very unsure with the lot of settings ...
    Solved!
    Go to Solution.

    Try the EasyLink VPN feature of LRT214/LRT224, which simplifies the site-to-site VPN setup.
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=03cf456383fc4d958cf918110c7fcd42_How_to_configure_...
    EasyLink VPN works in the following way conceptually.
    1. At the primary site, enable EasyLink VPN Server (inbound tab on the Web GUI) and create an account (username/password) for each remote site.
    2. At a remote site, enable EasyLink VPN Client (outbound tab on the Web GUI), and enters the matching account credentials (username/password).
    3. The remote site will automatically reach out to the primary site to establish an IPsec tunnel.
    Note: LRT224 can support up to five EasyLink VPN peers in a star VPN topology.

  • Can two apple devices registered to same apple ID face time with each other. My scenario is face time between IPAD and IPHONE both registered in my apple ID

    Can two apple devices registered to same apple ID face time with each other? My scenario is face time between IPAD and IPHONE both registered in my apple ID

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
    http://tinyurl.com/32drz3d
     Cheers, Tom

Maybe you are looking for

  • What's wrong with adobeDPS.dialogService.open??

    I try to open link via adobeDPS.dialogService.open, but it doesnt work at all. Whats wrong with my code? In Safari call to adobeDPS.dialogService.open show "udefined", but I can find a function via Inspector... <!DOCTYPE html> <html> <head> <meta htt

  • Annotating InDesign CS6 pages - Can I use a Wacom?

    Hi, I've got a Wacom tablet which I use to draw and annotate. Can I use it to make quick sketches and notes on top of my work in InDesign CS6? It would be unbelievably quick and useful to be able to get a (raster) pencil and sketch my thoughts on lay

  • Using jdbc with oracle-for-win95

    i am using oracle thin driver to connect my java code with oracleforwin95 i think it is called as personal oracle, while getting conection DriverManager.getConection("drivername@host:port(1521):sid","user","password") there is no sid for oracleforwin

  • Non-group-by expression in select clause

    Hi ya'll.  I am new at writing SQL commands and am running into an error that I don't understand.  I am trying to insert a simple 'GROUP BY' clause and keep getting the above error.  I can insert the ORDER BY clause without any error, but when I add

  • I updated my  iPhone 5  its goes to Apple ID Security

    Apple ID Security (page) Not Now   (checked) hit next it does not move