A point to point communication between two EJB

How do we make a point to point communication between two ejb? Must i use mdb or session bean?
Because i have a problem: how can i send a message to a specific EJB that i choose?
Thanks

Yes....U should post a message from EJB1 to a queue and listener can be the second EJB (Better if its an MDB).
Whats the problem U r facing?
-Rais

Similar Messages

  • Communication between Two WebLogic instances on the same machine

    Hi,
    We're having a problem with communication between two copies of Weblogic on
    the same machine. They are configured with seperate ports (regular and SSL).
    Independantly, they run fine. I can access EJBs running on either of them.
    The problem is that a bean in one of them has code which attempts to access
    an EJB on the other one. The procude fails when trying to obtain the initial
    context. This same code works if compilied independantly of WebLogic on the
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

    Thanks for the prompt reply.
    There is one IP address (internal address 10.227.1.34) one the machine. WLS1
    is set up at ports 7001 and 5133. WLS2 is setup at ports 7004 and 7005.
    When WLS1 attempts to obtain a context to WLS2 with the URL
    t3://10.227.1.34:7004/ it pauses for a long period of time. Running truss
    on the both WLS processes shows communication occuring between the two
    followed by long periods of silence. Finally WLS2 spits out the error
    ConnectionException[7001,7001,5133,5133,7001,7001] (paraphrased, I can get
    the entire error if it would help).
    After another long pause, WLS1 quits trying with the error 'Server
    10.227.1.34:7004 not found' (again paraphrased).
    Among the things we've tried:
    * Changing the URL from the IP to 127.0.0.1
    * Enabling/disabling SSL on either or both WLSs.
    * Changing the server name in WLS2's copy of weblogic.properties from
    'myserver' to 'myserver2' (previously they were both 'myserver')
    * Upgrading WLS2 to 5.1.0sp5 (Tried upgrading WLS1, but was getting class
    not found errors and quit because that WLS is being used by other people)
    This is a Solaris server. WLS1 is running 5.1.0 and WLS2 is running 5.1.0sp5
    Any suggestions would be appreciated.
    Best,
    Randy Yarger
    marchFIRST
    [email protected]
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    There should not be. What is your network configuration? Are they on
    separate IP addresses?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Randy Jay Yarger" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We're having a problem with communication between two copies of Weblogicon
    the same machine. They are configured with seperate ports (regular andSSL).
    Independantly, they run fine. I can access EJBs running on either of
    them.
    The problem is that a bean in one of them has code which attempts toaccess
    an EJB on the other one. The procude fails when trying to obtain theinitial
    context. This same code works if compilied independantly of WebLogic onthe
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

  • Communication between two clients

    In Java Networking, communication between server-client or bwtween server-multiple clients is general. But How will be the communication between two cients, means two clients can send & receive messages to & from each other(being guided by server).

    Sorry,
    I didn't get your reply clearly.
    I want, if Server is running, and two clients(two instance of a same program) are opened, whatever message(string)client1 send to Server,then the Server needs to send those to client2.Again, the some response should come from client2 to client1 thru Server.
    How can I implement this?
    If you have idea, or some sample code about this, please let me know.
    Regards.

  • Communication between two portlets - Java Portlet JSR168

    Communication between two portlets
    Hi All,
    i want to be question how do communication between two portlets. Exam:
    I have 2 portlets in a portal together: a Menu portlet & a Content portlet, now i want when i click to an link of portlet Menu then my Content portlet will get param from link that.
    i'm develop by Oracle Jdeveloper tool & OracleAS 10g.
    Thank a lot !

    Hello,
    I assume you are not using Weblogic Portal, correct? If you are using Weblogic Portal, you could use events to communicate between two JSR168 portlets, but this only works in Weblogic Portal.
    If you are not using Weblogic Portal, the only way to communicate between two JSR 168 portlets is to put an attribute in the session in one portlet, and retrieve it from the session in the other portlet. For example, to set a value in your Menu portlet, given a javax.portlet.PortletRequest variable "request", and an object you want to send to the content portlet in the variable "menuChoice":
    javax.portlet.PortletSession session = request.getPortletSession(true);
    session.setAttribute("menuChoice", menuChoice, javax.portlet.PortletSession.APPLICATION_SCOPE);
    Then, in your content portlet to retrieve the value of the menuChoice variable you would do this:
    javax.portlet.PortletSession session = request.getPortletSession(true);
    Object menuChoice = session.retAttribute("menuChoice", javax.portlet.PortletSession.APPLICATION_SCOPE);
    Kevin

  • Communication between two Macs Server

    Communication between two Macs Server:
    Can they work together and communicate and interact normally in a PowerMac network, OS X 10.5.8 Server installed, and a MacPro computer that is running Server 4.0.3 on Yosemite? Had to do some additional implementation?
    Regards

    from the JavaDocs:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html
    getContext
    public ServletContext getContext(java.lang.String uripath)
    Returns a ServletContext object that corresponds to a specified URL on the server.
    This method allows servlets to gain access to the context for various parts of the server, and as needed obtain RequestDispatcher objects from the context. The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.
    In a security conscious environment, the servlet container may return null for a given URL.
    Parameters:
    uripath - a String specifying the context path of another web application in the container.
    Returns:
    the ServletContext object that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access.
    See Also:
    RequestDispatcher

  • Communication between two MVC's

    Hi.
    I want a communication between two MVC's, offcourse in one project.
    What I have:
    MainWindowView (MVC)
      |
      +--> MenuView (MVC)In my Menu MVC there is a button Logout. When this one is pressed the model had to tell the MainWIndowView that he can close.
    How can I do this?
    Statix.

    I have a solution... but I don't know if this is a neat one..
    This is my MenuModel:
              case 3:
                   MainWindowController.closeMainWindow();
                   LoginModel loginModel = new LoginModel();
                   LoginController loginController = new LoginController(loginModel);
                   break;
              ...This one communicates directly with a public static void closeMainWindow () method which disposes the view (JFrame)
         public static void closeMainWindow (){
              mvcView.dispose();
         }     Is this a solution so I stick to the MVC pattern??? I hope so... I wouldn't know another way...
    Thanks in advance!

  • Serialize DOM between two ejb's performance

    Hi,
    I am working with XML in a ejb container and I used JDOM Document (org.jdom.Document) to send the xml document between two ejb's, I picked JDOM because the Document implements the Serilizable interface. Then I did some performance tests on sending JDOM between two ejb's. I also did tests on sending a String rep. of the XML between the same ejb's. The result supprised me very much.
    Here is the testing code:
    // init
    dom.loadFromPath("C:\\booklist.xml");
    String xml = dom.getXML();
    org.jdom.Document doc = db.build(dom.queryDocument());
    // ... ejb lookup etc...
    // ejb test
    long start2 = System.currentTimeMillis();
    for ( int i = 0 ; i < 1000; i ++ )
    test.jdomTest(doc); // jdom doccument
    long end2 = System.currentTimeMillis();
    // string test...
    long start1 = System.currentTimeMillis();
    for ( int i = 0 ; i < 1000; i ++ )
    test.stringTest(xml); // String
    long end1 = System.currentTimeMillis();
    and the results:
    JDOM: 41703 msek
    String: 313 msek
    Send String and load him into a DOM in the receiving ejb: 5266 msek.
    I have always thought that working with xml on a string format would be to much overhead.
    Could somebody clearify this for me? Does this test results make any sense?
    - thanks, Lubbi Tik

    The serialisation process works at the object level, so to serialise an object you must first serialise every attribute of that object. The specification for serialisation states that every object which wants to be serialisable must have attributes which are primative types (eg int, long etc etc) or attributes which are objects which are serialisable. So to serialise a JDOM you must serialise each of the child nodes in the document, it would be a lot of object manipulation in this example. To serialise a String however, is much easier as it is a much less complex type.
    Cheers,
    Peter.

  • Using 1394 to perform communication between two PCs

    Hi all,
    Does anybody knows how to use a 1394 (firewire) to implement a communication between two computers using Labview ?
    Do I need a special toolkit for this ?
    Thanks
    Eduardo

    Currently, if you have installed NI-VISA, you should have the 1394 Passport already installed and running. This gives you the ability to communicate with 1394 instruments via your 1394 instruments. This is important because this helps determine how you will communicate from one computer to another. If you want to use the VISA and communicate using the FireWire INSTR, then you need to find or create drivers for your 1394 ports that allow you to communicate with them as 1394 instruments. There might be other ways to do this, but this is probably the most simple. Once you've got the pcs set up, you can just use VISA to communicate with your other devices.
    Logan S.

  • Communicating between two javafx files

    hi,
    i have two javafx files and i want the two to communicate
    that is on pressing a button in one i want the control to be transffered to the other...
    Hw can i do this,
    can any one help

    Hi,
    If you mean communicating between two database, you can create DATABASE LINK.
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_5005.htm
    Thanks

  • Communication between two Machines

    I just want to know whether is there any way possible where I can enable communication between two machines.
    To be more clear , suppose if i click on a button then it send a pop up or a message box on another machine in the network.

    Look for "Distributed Notifications".

  • Communicating between two machine

    hi all
    how in oracle i can communicate between two machine via ip address.
    my oracle version is--->
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
    PL/SQL Release 10.1.0.2.0 - Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
    NLSRTL Version 10.1.0.2.0 - Production
    Message was edited by:
    bp

    Hi,
    If you mean communicating between two database, you can create DATABASE LINK.
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_5005.htm
    Thanks

  • Share persistence.xml file between two EJB modules in EAR

    Hello, everybody!
    First of all, I would like to say that I already posted this question in another forum:
    [http://community.jboss.org/thread/154128?tstart=0]
    But as I haven't got any answer from there and this issue is very crucial to me I'm posting it here too in the hope that I get an answer. So, here it goes:
    I have two EJB modules in an EAR module. I would like to know how to share a single persistence.xml file with these two EJB modules. If I replicate the persistence.xml file in the two EJB modules, the EAR project deploys ok, but of course that's not what we want. If I remove the persistence.xml file from any of the EJB projects, the EAR doesn't deploy properly. I'm stuck with this. I've already tried many kind of configurations but none worked. I really would like to have some help with this issue to proceed working. This is my EAR structure:
    solicitacoes-ejb.jar       (EJB session beans)
    solicitacoes-dao.jar       (EJB interfaces)
    solicitacoes-dao-jpa.jar   (EJB session beans)
    solicitacoes-ejbClient.jar (entities and EJB interfaces)
    solicitacoes-web.war
    META-INF/This is my application.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <application
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
    version="5">
        <display-name>solicitacoes-ear</display-name>
        <module>
            <ejb>solicitacoes-ejb.jar</ejb>
        </module>
        <module>
            <ejb>solicitacoes-dao-jpa.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>solicitacoes-web.war</web-uri>
                <context-root>solicitacoes</context-root>
            </web>
        </module>
    </application>If I remove the persistence.xml file from one of the EJB modules, let's say solicitacoes-dao-jpa.jar, I get this error when deploying the EAR file:
    ... 39 more
    Caused by: java.lang.IllegalArgumentException: Can't find a persistence unit named 'null' in AbstractVFSDeploymentContext@28359170{vfs:///C:/jboss-6.0.0.20100429-M3/server/default/deploy/solicitacoes-ear.ear/solicitacoes-dao-jpa.jar/}
    at org.jboss.jpa.resolvers.BasePersistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(BasePersistenceUnitDependencyResolver.java:107) [:1.0.2-alpha-1]
    at org.jboss.ejb3.Ejb3Deployment.resolvePersistenceUnitSupplier(Ejb3Deployment.java:778) [:1.3.1]
    at org.jboss.ejb3.EJBContainer.resolvePersistenceUnitSupplier(EJBContainer.java:1517) [:1.3.1]
    at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:130) [:1.3.1]
    ... 43 moreI need help with this issue. As you could see, the EJB container doesn't like to see an EJB module without a persistence.xml file. This is clearly a dumb decision though. I agree with it if there was only one EJB module in an EAR. But the container should have been smart enough to require only one persistence.xml file in an EAR module with more than one EJB module, and share that persistece context with the whole EAR.
    Acting the way it is acting now, the container forces us to duplicate the persistece.xml file and kill our application modularity. This is clearly wrong. I've already tried to put the entity classes and persistence.xml file in the lib directory of the EAR, but it didn't work either. The container needs to have the persistence.xml file in both EJB modules.
    I don't know if this is a JBoss implementation decision or if it comes from the Java EE 6 specification. Whatever it is, it goes against all good modular and good design decision. Please if some of you know how to solve this, took a little time to tell me how. I would be very grateful.
    Thank you in advance.
    Marcos

    Dear Mr. gimbal2,
    In another occasion I would not reply to such a 'helpful' answer like the one you gave me (yes, it is undoubtedly an answer because that's how you classified it in the beginning of your reply), but as today I have plenty of time here in my job, for this week we're not working full time as usual, I decided to reply to it.
    You have to completely overhaul your attitude.I really didn't know I was taking so personal on this issue to have to 'completely overhaul my attitude'. Thank you for pointing that out.
    In stead of calling the technology dumb, admit to yourself that perhaps you don't understand it properly and that your ideas of what is correct design perhaps is a little lacking. I didn't call the technology dumb because I stated very clearly that I don't know for sure if it is working this way. I said in the last paragraph:
    +"I don't know if this is a JBoss implementation decision or if it comes from the Java EE 6 specification. Whatever it is, it goes against all good modular and good design decision."+
    So, I let implicit the fact that the technology or the implementation of the technology is dumb only if it doesn't allow this possibility. Regarding the fact that your said that I should
    admit to myself that perhaps I don't understand it properly, where did I stated in my question that I understand it completely? It's clear in the last paragraph that I don't. If I'm asking that's because I have doubts. Maybe my ideas of what is correct is wrong, and that's why I'm here in this forum. But everyone with a good sense knows that what I propose in this discussion is by no means a wrong design decision. Where is it a sin to have more than one EJB module in a EAR and a persisntece.xml file shared for the whole EAR? Does everyone that has more than one EJB module in an EAR module need to connect to more than one database? Is it wrong to want to have your DAO implementation in a separate EJB module in order to make deployment easy and also changes, if you later want to replace that implementation with another one without affecting
    the other modules? I don't think that a design decision that seeks this is lacking. I don't think that Java EE today is a dumb technoloby, but everyone knows that before it gets to the present level, it was a technology known to have made big dumb decisions that the community latter corrected, with ideas like O/R mapping (Hibernate), dependency injection (Spring), Struts and lots of other examples that we all know. No one can deny this and lots of wrong things will continue to be fixed in later releases.
    Maybe when you rise yourself back to that level, you open yourself up again to thinking in correct solutions in stead of trying to hammer through your own poorly chosen one.To be sincere, I see you took very personal about this issue. You really shows to be someone that has no respect to other people and you judge them too. I must say that I got surprised by the way you answered my post. I didn't expect to get such sarcastic answer to what I asked. I personally don't act this way. If I can't help a person, I also don't try to ridicularize him.
    Marcos

  • Communicating between two Computer via USB

    Hello,
    I want to connect two PCs to synchronize two different LabView VIs running on these Computers.
    The perfect way would be, that the VI on PC 1 sends boolean Value to the VI on PC 2, where this value is read out and can start some process.
    My Problem is that I do not have a 'normal' network and all serial Ports (but not USB) are occupied.
    I would appreciate any advice or suggestion.
    One of my ideas is going in the direction of an USB to 9pin serial Adapter plus a null modem adapter/cable. But I have no Idea if this would work.

    I would suggest USB-Ethernet adapters and an Ethernet cross-over
    cable.
    The communications between computers will be faster, and you can
    use your software across a larger network later on without
    modifications (just change IP addresses).  Your communications will be
    message based rather than character based, so you won't have to
    constantly poll the RS232 port for characters.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Communication between two network with the same IP segment

    Good Moorning:
    How can establish communication between the production environment and test environment with the same IP segment using switch Cisco Nexus 5548?

    Carlos
    The short answer is you can't as far as i know. You need to do NAT to able to do this and i don't think the Nexus switches support NAT.
    You need a device that can NAT both address ranges. If prod is always the one that initiates the connection then you need static NAT translations for the test machines and you can dynamicaly NAT prod addresses as they go into the test env.
    But if both prod and test can initiate connections then you need to have static NAT translations for both sides.
    We used a pix firewall for this when we connected our prod and test environments. A firewall is a good choice because you can make the test enviornment the outside interface where all traffic is denied by default. You do not want test affecting prod.
    Jon

  • Synchronous Communication between two Decoupled Orchestration

    Hi All,
    Is there a way I can achieve synchronous communication between 2 orchestrations (decoupled orchestrations) where I need to pass multiple parameters from calling orchestration to called orchestration.
    Thanks,
    Sumit
    Sumit Verma - MCTS BizTalk 2006/2010 - Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Hi Sumit,
    if you have hundreds of orchestration means lot of small small business processes which are tightly coupled...
    It is better to publish process / orchestration as service so it will  SOA base ..it will work isolate. but remember if you publish more web base service. it will be burden on IIS. we have only one Host instance to handle..we can't create more host
    instance to handle like in-process host in one server..we have to go for cluster environment..so first approach will be window base service (if possible achieve business process ) to handle by in-process host instance.
    If you have many small small services then we need one master service to watch/process all the services.
    Exmaple...
    Like one process A, need to execute five small services/processes a1,b1,a2,c1,c3
    and Process B need to execute four small services/processes b1,b2,a1,c1
    You have to go for canonical schema and master entry table where you can dynamically change or attached or remove small service.  
    Regards
    Suman

Maybe you are looking for

  • ITunes can't find my music library. Pleas help!

    I just upgraded my iTunes. Next time I tried opening it a window appeared that read: "Can't find your iTunes Library..." I tried searching by opening start/computer/iTunes but the file that has all my music was renamed to: bd4765ae206e5a7a782a28f0850

  • Used dc and public part concept not working in ess

    Hi, I tried using the ess address dc(of US country) as used dc in w4 dc(US country) and did all steps of making address dc as public part and added it as used DC in W4, when i tried to get the address dc context in to w4 by calling the read method( o

  • Disable of "Save Report" takes no effect in an interactive report

    Hello, when I disable the checkbox "Save Report" in the report attributes of an interactive report, this has no effect. The menue item "Save Report" is still shown when I press the "Actions" button. Is this a bug or do I miss something? Regards, Arnd

  • HDMI LCD as Monitor

    Searched the forum and found similar issues, but no definitive explanations or resolutions. Came into a free Power Mc G5 tower, recently, and thought I'd connect it to a 26" Toshiba LCD TV. The result was "no video signal". I plugged in a second (CRT

  • Problem with select query that includes a date

    I've been fighting with this for about 4 hours - yes, quite literally... I've never been good with date stuff. I have a brain block. Anyway, here's the situation: I have an Access database that has a time/date field. There are no times, just a date i