Calling EJBs from other EJBs in other J2EE Server?

How can I call one EJB on one J2EE Server from other
EJB on other J2EE Server?
Help me, please.
Dmitry Tumanov

Basically call the beans as if you were calling them in the same server through their remote interfaces. Get a InitialContext into the other appserver and then get the home object, narrow it and create a remote reference. You can follow the standard implementation just make sure that the InitialContext you create has the right properties, ie. context factory, urls, etc to the OTHER appserver.

Similar Messages

  • Calling EJB from other EJB on other J2EE Server

    Can I call EJB from other EJB on other J2EE Server
    Servers - Websphere 5.0
    Do i require home & remote interface of that ejb on client side also
    Help me, please

    the problem is actually i require that is specific to websphere
    for example i want to call a method ion that ejb
    say my ejb name is myejb
    so the normal way i should call is
    InitialContext initialContext = new InitialContext();     
    Object homeObject = initialContext.lookup("ejb/MyEjbHome");
    MyEJBHome myEJBHome =(MYEjbHome )javax.rmi.PortableRemoteObject.narrow(homeObjectMYEjbHome.class);
              myEJB = lSHome.create();
    myEJB.someMethod();
    but here i am having class for home and remote available
    now if other app server i am not having this classes then what to do

  • Deploy oracle java app to other j2ee server

    hello
    i follow the tutorial at:
    http://otn.oracle.com/products/jdev/collateral/tutorials/9050/adfuix_tut.html
    it works well within jdeveloper debug environment,but when i deploy the war package to jboss321,the ClassNotFoundException is thrown,the i open the "War deployment profile settings",under the "WEB-INF/lib" node,i add all the libraries to the war file,then i regenerate the war package and the redeploy it to jboss again,but when i invoke following link in my browser:
    http://localhost:8080/HRApplication/browseDeptEmp.uix
    the following exception is thrown:
    javax.servlet.ServletException: Filter execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.lang.NoClassDefFoundError: oracle/ord/im/OrdContentSource
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    i don't know where the "OrdContentSource" is,and who tell me how can i config the package to run on jboss or other j2ee server? and if there are such tutorials or articles?
    i think that oracle company should provide a common package,when i use non-oracle j2ee server,i can include them.
    thank you!

    Looks like you have a proxy configured, and that proxy (of course) doesn't support routing to 127.0.0.1
    [01:05:26 AM] t3://127.0.0.1:7101: Destination unreachable; nested exception is:
    java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 500 Server Error'; No available router to destinationUnset your proxy (Tools->Preferences->Web Browser & Proxy)
    John

  • Create DLL from labview and calling it from other application

    I have an application built using Labview. I wanted to create DLL out of it. The application has
    two String inputs start and stop buttons and two status indicators.
    1. How to itegrate start and stop buttons from function prototype?
    2. Does Labview created DLLs requires labview runtime engine when it is to be called from other application?
    Can some one help on this.
    Solved!
    Go to Solution.

    Hi Yuvish,
    1) They should be boolean inputs to your VI. But does it makes sense to provide a stop button input at the start of your VI? (THINK DATAFLOW!)
    2) Yes, the LV-RTE is needed...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Calling Transaction from other system using RFC

    Hi ,
    I have one button on screen(say Screen-A), in ECC. when its pressed the transaction '/SAPAPO/BOPIN' gets called from APO.
    For calling transaction from APO I am using FM - 'ABAP4_CALL_TRANSACTION'.
    I want the initial screen of that transaction to retain some values which I fill on the Screen-A(the screen which has that button).
    When I call the transaction from ECC itself (ex. C006), the initial screen of C006 retains the value on Screen-A.
    I want the same to happen in case of calling transaction from APO.
    How to achieve this?  Would it need the changes in IMG (SPRO)?
    Please note that, Screen-A is initial screen of transaction 'md05' and I want to retain vaules of Material, MRP Area, Plant.
    Thanks,
    Sujeet

    Builld a RFC enabled FM () that wrap the call of Smartforms (*) in the other system.
    Regards,
    Raymond
    (*) [Writing Remote Function Modules in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
    (**) [Integrating the Smart Form into the Application|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm]

  • NetBeans: Calling code from other packages?

    Normally, when I would call code from eclipse, I would type something like:
    import +<package name>.<class name>+But somehow, this approach doesn't seem to work in NetBeans, how can I import code from another package? I can seem to import from the same package, but not a different one.
    Edited by: px7659 on Jun 15, 2010 6:21 PM

    px7659 wrote:
    Normally, when I would call code from eclipse, I would type something like:
    import +<package name>.<class name>+But somehow, this approach doesn't seem to work in NetBeans, how can I import code from another package? I can seem to import from the same package, but not a different one.Then the package is not part of the project. Did you perhaps forget to add the jar library in question?

  • Call event from other event or other vi

    I have LabVIEW 6.1.
    1. Can I call an event or a serious of events from another event? How can I do that? It doesn't matter if the events are executed after the event that called them is completed.
    2. Can I call an event from another vi? Let's say I have an event structure in a subvi. Can I trigger an event in the subvi calling it from the main vi? How would I do that?
    Thanks for your help.
    Jerome.

    Salutations,
    In reality, a program should only have 1 event structure. Or so someone much more knowledgable with labview has told me in the past.
    It's an important note to make that when running events or SubVi's, they will run until they are accomplished and then allow the next event or subvi to take place. So if you have multiple event structures, you must wait until one finished before the next one is run (This might...no guarantees, be avoided by multiple while loops and not locking the front panel on the execution of an event). Now, since you don't care, you can handle such a case. Just make multiple events in your one main event structure. I'm not sure what exactly you want to do, just make sure you "unfreeze" the front panel when you're messing with what handles what events.
    Hence, you could have a "run" button that's pressed and it goes about it's business. Then you could have a mouse down response, that you hit while your "run" process is still going, this will be, in a sense, logged and accomplished once the "run" task is done. Now, if you're looking for data to trigger another event, maybe I'd switch over to a case structure that's inside your event structure. For case structures, every case must have an output.
    Can you trigger an event in the subvi calling it from the main vi.... Excellent question... I'm not exactly sure when this would come up, but i'm not super experienced like some of the people around here. It may be possible, but i'd imagine a case structure would be more efficient. Like the ones in error handling. Pass the case to the subvi, it'll operate depending on what you want, and then continue along. Events seem most useful when dealing with events that occur on the front panel.
    Hope this helps,
    ElSmitho

  • How to store Connection object and call it from other programs.

    Hi,
    I am trying to connect to the database, store the connection object and use this connection object from other standalone java programs.
    Can any one tell me how to do this? I've tried in the following way:
    In the following program I am connecting to the database and saving the connection object in a variable.
    public class GetKT2Connection {
       public static void main(String[] args) {
          String url = "jdbc:odbc:SQLDsn;
          String dbUser = "sa";
          String dbPwd = "sa";
          Connection kt2conn = Connection connection = java.sql.DriverManager.getConnection(url, dbUser, dbPwd);
          if(kt2conn == null) {
             System.out.println("Database Connection Failure!");
          else {
             System.out.println("Connected to Database...");
         GetKTConnectionObj.storeKT2ConnectionObj(kt2conn);
    } Here is the program to save connection object in a variable.
    public class GetKTConnectionObj {
       static Connection kt2Connection = null;
       public static void storeKT2ConnectionObj(Connection conn) {
       kt2Connection = conn;
       public static Connection getKT2ConnectionObj() {
       try {
          return kt2Connection;
       catch(Exception e){
          System.out.println(e);
      return null;
    }Now from the following code I am trying to get the connection object that is stored. But this is throwing NullPointerException.
    public class Metrics_Migration {
      public static void main(String args[]) {
         try {
        java.sql.Connection connection_1 =   GetKTConnectionObj.getKT6ConnectionObj();
         catch(Exception e){
    }

    kt2Connection is null. You need to store it first, to make it not null. Otherwise it will stay null forever. And why on earth are you trying to do this THIS way?
    If you are running the two applications separately, it wont work either.

  • How to access an EJB in another J2ee server?

    Dear experts:
    I have a jsp file that is a client of a J2ee server A, and I am going to access an EJB that is situated in J2ee server B from this jsp file.
    It will be very appreciate if you can tell me how to do that. My current program is:
    try
    Properties props = new Properties();
    props.setProperty(Context.PROVIDER_URL, "rmi://ip:port");
    Context initial = new InitialContext(props);
    Object objref = initial.lookup("MyUserEJB");
    UserHome home = (UserHome) PortableRemoteObject.narrow(objref, UserHome.class);
    Collection users = home.findByName("alin");               
    for(Iterator i=users.iterator(); i.hasNext();)
    User user = (User)i.next();
    System.out.println("User " + user.getFirstName() + " details:\n");
    System.out.println("     email     : " + user.getEmail() + "\n");
    catch (Exception e)
    System.err.println("Caught an exception.");
    e.printStackTrace();
    In which, the MyUserEJB is an EJB in ip:port J2ee server (server B). The server A is localhost:1050. This program does not work.
    Best regards,
    Alan

    Hi,
    Have a look at
    http://forum.java.sun.com/thread.jsp?thread=365927&forum=136&message=1543094

  • Full EJBs status in J2EE server

    Is it possible to get all EJB(s) status in J2EE server.
    If could, what command or method can help me.
    TIA

    You havent really explained what you want. I believe
    what are expecting is a status of all beans in the
    container. The status means whether the bean has been
    activated or passivated, etc.
    Kindly explain and I may be able to help you out.
    Regards
    Rohit Parik
    [email protected]
    I am sorry that I didn't explain my question clearly.
    Suppose I write an EJB to do some Database query function, and my problem is
    1. EJB container can give me what information?
    2. May I get how many transactions have been process by EJB.
    Sorry for my poor English.
    BTW, thanks your reply.

  • My CommandButton calls PostContructs from other Managed Beans. Why?

    Hi,
    i have a big problem that i can't understand.
    I use a command Button who should call only one Managed Bean. But however it calls other Managed Beans too.
    How is it possible?
    my properties:
    Primfaces 2.1
    Glassfish v3
    jsf 2.0
    Ejb 3.1
    JPA - Toplink
    Facelets
    Netbeans
    mainTemplate.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:p="http://primefaces.prime.com.tr/ui">
        <ui:insert name="head">
            <h:head>
                <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />
                <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/style.css" />
                <title></title>
            </h:head>
        </ui:insert>
        <h:body>
            <div class="main">
                <div class="main-bg">
                    <div class="main-width">
                        <div class="indent">
                            <h:form id="urlForm" prependId="false">
                                <div class="posturlbox">
                                    <h:inputText value="#{addUrlBean.userUrl}" styleClass="posturlinput" id="url" onclick="this.value = ''" />
                                </div>
                                <p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />
                                <div class="addUrlMessage">
                                    <p:message for="url" showSummary="true" showDetail="false" />
                                </div>
                            </h:form>
                            <div class="clear"></div>
                        </div>
                        <div class="content">
                            <div class="content-indent">
                                <ui:insert name="content">
                                </ui:insert>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </h:body>
    </html>
    test.xhtml
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:p="http://primefaces.prime.com.tr/ui">
        <h:head>
            <meta http-equiv="content-type"
                  content="application/xhtml+xml;charset=utf-8" />
        </h:head>
        <h:body>
            <ui:composition template="/WEB-INF/template/mainTemplate.xhtml">
            </ui:composition>
        </h:body>
    </html>
    addUrlManagedBean.java
    package managedBeans;
    import entities.UserEntity;
    import infoBeans.VideoValidationInfo;
    import javax.ejb.EJB;
    import javax.faces.application.FacesMessage;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ManagedProperty;
    import javax.faces.bean.ViewScoped;
    import sessionBeans.VideoSessionBean;
    @ManagedBean(name = "addUrlBean")
    @ViewScoped
    public class AddUrlManagedBean extends GeneralManagedBean {
        @EJB
        VideoSessionBean videoSessionBean;
        private String userUrl = "URL";
        @ManagedProperty("#{loginBean}")
        LoginManagedBean loginMB;
        /** Creates a new instance of AddUrlManagedBean */
        public AddUrlManagedBean() {
        public void addVideo() {
            UserEntity sessionUser = loginMB.getSessionUser();
            if (sessionUser == null) {
                informUser(FacesMessage.SEVERITY_WARN,
                        "log_in_or_crate_new_account",
                        "log_in_or_crate_new_account_detail", "url");
            } else {
                int validationId = videoSessionBean.validateVideo(userUrl);
                if (validationId == VideoValidationInfo.VIDEO_IS_OK) {
                    videoSessionBean.addVideo(sessionUser, userUrl);
                    informUser(FacesMessage.SEVERITY_INFO,
                            "video_create_success",
                            "video_create_success_detail", "url");
                } else if (validationId == VideoValidationInfo.URL_IS_EMPTY) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "url_is_empty",
                            "url_is_empty_detail", "url");
                } else if (validationId == VideoValidationInfo.URL_SYNTAX_WRONG) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "url_syntax_wrong",
                            "url_syntax_wrong_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_NOT_EXIST) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_not_exist",
                            "video_not_exist_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_ALREADY_EXIST) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_already_exist",
                            "video_already_exist_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_ID_LENGTH_WRONG) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_id_length_wrong",
                            "video_id_length_wrongdetail", "url");
            userUrl = "";
        public String getUserUrl() {
            return userUrl;
        public void setUserUrl(String userUrl) {
            this.userUrl = userUrl;
        public LoginManagedBean getLoginMB() {
            return loginMB;
        public void setLoginMB(LoginManagedBean loginMB) {
            this.loginMB = loginMB;
    }Now. if i click the Button
    *<p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />*
    *<div class="addUrlMessage">*
    it should only use the AddUrlManagedBean right (i tried it with h:commandButton too.. same result)? But i make a System.out in my other ManagedBeans (PostConstructs) and i see this logfile.
    LogFile
    INFO: PostConstruct: VideoDetailMB - ViewScoped
    INFO: PostConstruct: VideoMB - RequestScoped
    INFO: PostConstruct: UserVideosMB - ViewScopedHow is that possible? Why it activate the Lifecycle of other ManagedBeans?

    it should only use the AddUrlManagedBean rightWrong. It should also use this bean:
    @EJB
        VideoSessionBean videoSessionBean;with whatever consequences that has.

  • Calling application from other database

    It's possible to call an application on another database, without informing user and password again?

    Sorry for being fastidious, but I don't think you can "call" an Apex application as you would call a database procedure for instance. So I assume you mean navigate from one Apex application to another Apex application in a different database.
    If you use single sign-on (SSO), that is a piece of cake.
    If you don't, there is no straightforward way I think. You can use some ingenious ways to get round it though, for instance:
    - In the calling application, using a database link, insert a token in some table in the other database along with the username and a timestamp.
    - Pass that token and the username in the URL as a parameter to an "auto login page" in the other application
    - In the "auto login page" of the other application, check whether the token/username combination is valid and, if it is, auto-login the user using the provided username.
    You also could use other fancier techniques like queues. Maybe others may have other suggestions.
    I hope this helps
    Luis

  • Calling repaint from other Class file.

    Hi,
    First of all i am pretty new to Java so I hope you understand what I am trying to explain..
    I am trying to create an applet which draws some polygons on the screen. For the drawing of these polygons I have created another class which is located in another package but the same project. I plan to use this second package as some kind of library so that i can simple call 2 or 3 functions in future applets to draw these polygons (which always have the same shape). In the library file i have created a contructor, a draw function and some other functions to change some properties. I also created a function that created a popup window as soon as i click on one of the polygons i have created. In the popup some buttons are available which change the color of the polygon. All this works fine, but the problem i have is the following:
    When i click a button the main class (in package 1) needs to be repainted for the changes to be visable. But the main class can always be a different one. Is it possible to check in the class in the library package, which class from the main package called the class, and execute a repaint() on that class. So i have the following situation:
    Package 1 (Applets):
    package applets;
    class myApplet extends Applet implements .... {
    private Tank tank1 = new Tank(20, 20, 100, 200);
    private Tank tank2 = new Tank(250, 20, 100, 200);
    public void paint(Graphics g) {
    tank1.drawTank(g);
    tank2.drawTank(g);
    public void mouseClicked(MouseEvent e) {
    tank1.openWindow();
    tank2.openWindow();
    Package 2 (Library):
    package applets.library;
    class Tank {
    public Tank(int xPos, int yPos, int height, int width) {
    public void drawTank(Graphics g) {
    public void openWindow() {
    new myWindow("Window1");
    public class myWindow extends Frame {
    public myWindow(String name) {
    show();
    public boolean action(Event e, Object arg) {
    return true;
    So what i want to do is: In class Tank in the public class myWindow in the method action, i want to call the repaint() of the class myApplet
    I hope my problem is clear to you, as you may have noticed i have a little trouble explaining it clearly..

    First of all thanks a lot for your reply and sorry for my way of programming. Like i said i am pretty new to Java, i am actually only programming for about 2 weeks and trying to learn from some examples on the internet.
    I dont really understand what you want me to do, is it maybe possible to give a little bit of sample code? That would help me a lot.
    Maybe some background information about the project will help a bit too.
    I work at a company that develops automation solutions. We program PLC's and SCADA systems. Now Siemens has some PLC's that support Java applets which make it possible to visualize industrial processes. Now i am trying to figure out if it is possible to start developing own java applets for visualisation in the future. Since most programmers here have no experience in any higher programming language i want to keep it as simple as possible, by developing libraries that do the most of the programming work for them.
    Now i want to create the first part of this library by programming some kind of storage tank. This tank always has a valve. when i click on the valve a popup should open with the operation button to open of close that valve. When a valve is opened it should be colored green and when its closed it should be colored gray or something. The Tank class has a couple of methods:
    drawTank(); to draw the tank in my applet,
    openValve(); to open the Valve,
    closeValve(); to close the Valve,
    After all this is created i want to be able to use this class in all my other classes and create a tank by simple making a new Tank object, draw it on my applet using the drawTank() method and open or close the Valve using the other 2 methods, however when i open or close the Valve the color of the valve should change so i must be able to call the repaint of all the classes that use my Tank class, but i want to do that INSIDE my Tank class.
    If there is another way of doing this i would love to hear so, but i would help me a lot if you can explain in a little bit of sample code. It doesn't have to be really long or detailed.
    Thnx in advance

  • Calling smartform from other system in ECC.

    Hi friends,
    I have a smart form in other system....In Ecc there is an alv report  where in when i click on any line item,it should fetch the information in terms of smart form from the other system.that is a smart form present in other system should be displayed in ECC.I have not to create any smart form in ECC...Only call smart form from the other system....
    Has somebody done this before or have any ideas how to do it.
    I ll be highly thankful l to you
    kanishak

    Builld a RFC enabled FM () that wrap the call of Smartforms (*) in the other system.
    Regards,
    Raymond
    (*) [Writing Remote Function Modules in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
    (**) [Integrating the Smart Form into the Application|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm]

  • Calling methods from other classes

    I have a bunch of little java files in a folder, do I need to make a package in order to access all the methods in all the classes, or can I just make an instance of any of the methods because all the classes are in the same folder?

    HI,
    If your methods have a "public" modifier (and the class does too) then you can instantiate your classes as objects from that (so-called) "default" package in any other class or object in any other package and then call the methods on those instantiated objects as you please.
    If that sounds confusing... I'd seriously try the excellent tutorials at this site, especially "the java tutorial".
    /k1

Maybe you are looking for