Callback by java application in J2ee Server

Hi all
I need to pass the client reference in a java application(Not web app) to the bean,whether it is session, entity or message, and allow the bean to callback the client (by invoking the method located at the client side or another mean) when some event is happened. Is it possible? and how to do it?

Look at the JMS API. Subscribing to a topic is the only way I have found to do what you want to do.
Let me know if you find something else!

Similar Messages

  • Calling a java application from j2ee web application

    Hi,
    I have a j2ee application in which i am making a call to a jar file which is a java application.
    Runtime a4 = Runtime.getRuntime();
    Runtime a = Runtime.getRuntime();
    String cmd[] = new String[14];
    cmd[0] = "cmd";
    cmd[1] = "/c";
    cmd[2] = "start";
    cmd[3] = "javaw";
    cmd[4] = "-jar";
    cmd[5] = CATALINA_HOME+"\\webapps\\AveksaTesting\\AveksaTestingJava\\dist\\AveksaTestingJava.jar";
    cmd[6] = SERVER_TESTS;
    cmd[7] = COLLECTOR_TESTS;
    cmd[8] = SYSTEM_TESTS;
    cmd[9] = CREATE_ORACLE;
    cmd[10] = DB_NAME;
    cmd[11] = DB_DUMP;
    cmd[12] = email;
    cmd[13] = isMIGRATE;
    try{
    java.lang.Process p = a.exec(cmd);
    Now in the called java application, i am first shutting down the tomcat server by calling shutdown.bat script and then starting it using startup.bat. But the problem i am facing is when i restart the server from java application, it says address already in use(i.e. port 8445 on which tomcat is runninng).
    Id i just call the java application and do the same operation it works fine. I guess when i am calling java from j2ee application, j2ee still has some threads holding java and not shutting down tomcat properly.
    Can anyone suggest me what can be done in this case. I have to call a java application from j2ee and restart the tomcat server many times.
    Thanks in advance
    -Vikram

    Annoyingly crossposted.
    http://forum.java.sun.com/thread.jspa?threadID=730657

  • Java applications on EP server

    Hi EP Experts,
    I would like to know following things.
    1. How do I migrate Java applications on Portal server? (one way using JAVA PDK)
    2. What are the different problems that are faced during migration of Java code to EP server
    3. Do we need to import specific libraries that are used specific for Java applications and are not available with WAS/EP?
    If any one has similar migration experience please share the problems that are faced and if possible solutions you got for any.
    Thank you,
    Chintamani Chitnis

    Hi,
    Check this document
    http://help.sap.com/saphelp_erp2004/helpdata/en/88/bdfc3f48ecc742e10000000a1550b0/frameset.htm
    Regards,
    Ganesh N

  • Two related questions:  ColdFusion 10/Java applications and J2EE supported servers

    I have two related questions:
    1.  CF10 and integration with Java Web applications
    We have a couple of Java applications running on JRun and interfacing with CF9 applications.  The JRun clusters were created through the JRun Admin and, apart from lack of Axis 2.0 support, have served us well for years now.  And, as would be the case, the ColdFusion9/Java/Flash application is a critical public-facing application that the business uses for bidding on projects.
    It appears that with ColdFusion 10 on Tomcat, we will not be able to run those Java applications on a Tomcat-CF10 JVM cluster.  Is this correct?  IF so, what are our options? 
    2.  J2EE Application Servers supported by Adobe for CF10
    Which of these is correct?
    A.  This URL (http://www.adobe.com/products/coldfusion-enterprise/faq.html) states "ColdFusion 10 supports IBM® WebSphere, Oracle® WebLogic, Adobe JRun, Apache Tomcat, and JBoss."
    B.  This URL (http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/cf1 0/coldfusion10-support-matrix.pdf) states:
    "J2EE application servers: WebLogic Server 10.3, 11.1, WebSphere Application Server 7, ND 7 JBoss 5.1, 6.0, 7.1.0"
    I *think* "A" above is wrong re. support for Adobe JRun.  It does not specify a version of Apache Tomcat unless it is simply referring to the custom version the comes with CF10.
    Option "B" above shows no support of Adobe JRun or 'standard' Apache Tomcat.
    Thanks,
    Scott

    Question 1 above was answered:  "No support for Java web applications under CF10's custom version of Tomcat"
    Question 2:  No answer yet:  Is Apache Tomcat (NOT Adobe's customized version) supported for CF10 J2EE deployment?  I do not see any installation instructions on how to install CF10 on Apache Tomcat 6 or 7.
    Is anybody using Apache Tomcat as their J2EE app servers and, again, NOT Adobe's customized/limited version? 
    Thanks,
    Scott

  • How do I run java application on IIS server

    Hi,
    Can I run java application on IIS(Internet information Server)?
    If yes, How do i do that?
    My java application contains JSP,Servlets and EJB.
    To run java application on IIS which plug in should i use.
    Can anybody help me This is urgent...........
    Thanx

    Hi
    Check this article on JGuru. It explains how to use Tomcat together with IIS.
    http://www.jguru.com/faq/view.jsp?EID=776546
    If you also need to use EJB's you probably also want to have a JBoss installed - check www.jboss.org
    /Peter

  • JMS Application on J2EE server

    Hi,
    How can I run a simple PTP client-server application of JMS on windows platform? I am using a machine running windows 98, on which I have installed JDK1.3 and J2SDKEE1.2.1. I use J2EE server to deploy EJBs and Servlets on localmachine. I want to use the same J2EE server (J2SDKEE1.2.1 for windows) for JMS applications also. Please help me.
    Paras.

    Sun's J2EE SDK 1.2.1 does not support JMS. In other words, it does not have a JMS provider.
    You need to use Sun's J2EE SDK 1.3 to use the reference implementation of JMS API.
    However, you could use JMS provider from other vendor and still use J2EE SDK 1.2.1 reference inplementation as your application server.

  • Regarding java application in solaris server

    Hi,
    I did some modifications in a java application located in solaris server by doing some validations in a java file and put the compiled class file back in to the solaris server.If i need to see the modifications which i did in the java file, do i need to restart the application server ?If yes , please tell me Why should i do it ?Also Please tell me the procedure how to do it as well?

    What about hosting a Solaris server and Running Windows server inside it using virtualization?
    Edited by: Abh_kol on Jun 11, 2009 9:30 PM

  • How to deploy a normal Java application onto Sun Server

    Hi
    How do you deploy a normal Java application onto the Sun server...what are the required config files one needs to set etc

    You might want to start with the Java EE 5 tutorial, available here :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    --ken                                                                                                                                                                                                                                                           

  • Start deployed applications when J2EE Server starts

    Hi experts,
    This is my problem.
    I've updated my Netweaver 04s Developer Workplace from SPS1 to SPS10.
    The problem I have is that when I start my J2EE Server via MMC, the applications (j2ee,ear,webdynpro,...) I deployed don't start.
    If in my Visual Administrator I go to server->services->deploy most of them are not started. I can start them manually, but that's not a solution...
    I suppose there are any possibities to set this applications to start when the server is started.
    Any ideas?
    Thanks a lot.
    Alberto.

    Hi Alberto
    If you can start the services manually w/o problems, then maybe you can try to change the startup mode to 'always' so that the service is started automatically. You should be able to check this via Configtool. Switch to the 'configuration editor' mode and go to cluster_data -> server -> cfg -> services. Look for the service and make click on the propertysheet. Usually you can modify the startup mode there.
    I hope this helps.
    Regards,
    Désiré

  • How to execute a java application once the server starts

    I have created a java application which executes correctly. I want this application to execute everytime I start my server. I have modified my web.xml as shown below
    <servlet>
    <servlet-name>SendEmail</servlet-name>
    <servlet-class>
    com.allcorp.alliance.tdocs.servlets.SendEmail</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    <load-on-startup>1</load-on-startup>
    </init-param>
    </servlet>
    I have extended the class with HttpServlet. When I start the server, I get the message saying the class is being initializing but it does not execute. I want the application to execute. Any idea what I need to do.

    BalusC wrote:
    Implement ServletContextListener and run the appplication on creation of the ServletContext.Well i understand implementation of ServletContextListener and by overiding contextInitialized(ServletContextEvent se) accordingly can solve the problem.
    but you need to consider two cases here first
    1).ServletContextListener is not supported by all container especially the minor onces which does not support Servlet 2.3 specification.
    2).OP does not have any idea of how to use a Servlet first if you can see he had written his intialization code in the main method.Now how can you expect him to create a listener..... :)
    I hope there are no hard issues on what i said this time.
    *@OP*
    My friend the bad news is that you need to spend bit of time learning about servlets.U'd not be writing intialization code inside a main rather you'd be doing it inside public void init(ServletConfig config) method.
    by making <load-on-startup><!--value</load-on-startup> in web.xml enables Servlet container to call init method at the time of deployment of the web application else where it'd call the init method whenever servlet encounters first request from a client.
    package com.allcorp.alliance.tdocs.servlets;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import javax.activation.*;
    * @author ssa3z
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class SendEmail extends HttpServlet{
    public void init(ServletConfig config) {
        // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
        String to = "[email protected]";
        String from = "[email protected]";
        // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
        String host = "smtp.allstate.com";
        // Create properties, get Session
        Properties props = new Properties();
       // If using static Transport.send(),
      // need to specify which host to send it to
      props.put("mail.smtp.host", host);
      // To see what is going on behind the scene
      props.put("mail.debug", "true");
      Session session = Session.getInstance(props);
      try {
         // Instantiatee a message
         Message msg = new MimeMessage(session);
         //Set message attributes
         msg.setFrom(new InternetAddress(from));
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
         msg.setSubject("Test E-Mail through Java");
         msg.setSentDate(new Date());
         // Set message content
         msg.setText("This is a test of sending a " +"plain text e-mail through Java.\n" +"Here is line 2.");
         //Send the message
         Transport.send(msg);
      }catch (MessagingException mex) {
        mex.printStackTrace();
    } Hope this might help :)
    REGARDS,
    RaHuL

  • Autorun WebDynpro Application after J2EE Server Restart

    Hi All
    I have developed an application which registers the event capturer for KM in webdynpro.This application doesnot have any UI output.
    I need to run this application after every J2EE server restart.
    I changed the portalapp.xml and added startup = true property, but of no use.
    Is there any way to do this ?
    Points will be rewarded for helpful answers.

    You should create a portal service and set startup = true in portalapp.xml

  • Running a Java application on a server.

    I made a simple Java app that acts as a server. I can't figure out how to run it though (well, I can run it on my own machine of course, but that's no good). I've looked into servlets but I get the impression that a servlet is for the web, while I want to run a socket-based program. Do I need a special server, or is myjavaserver.com (for testing) good enough?
    Thanks

    I don't want to run the application on my home machine because I don't want to leave it on all day, my internet connection is not as fast as a hosting provider's, and I don't like leaving a port open all day (although probably nothing will happen).
    So if I have a small app like import java.net.*;
    public class ServerTest {
         public static void main(String[] args) throws Exception {
              int port = 12345;
              ServerSocket servSock = new ServerSocket(port);
              while (true) {
                   Socket socket = servSock.accept();
                   System.out.println("Connection to server established.");
    } how would I run that on a hosting provider's server? At home I can just call "java ServerTest" from the command line, but for obvious reasons I cannot do this on a web server that I do not have physical access to.

  • How I can connect my java application to unix server

    I want to develop simple desktop Application using which I can login and fire simple UNIX command like ls -lrt etc. Can any one guide me to achieve this ?

    Here is a sample program which illustrates connecting to a unix server using SSH protocol.
    The API used is enchanter - http://code.google.com/p/enchanter/
    import java.io.IOException;
    import org.twdata.enchanter.SSH;
    import org.twdata.enchanter.impl.DefaultSSH;
    public class MainSSH {
          * @param args
          * @throws IOException
         public static void main(String[] args) throws IOException {
              SSH ssh = new DefaultSSH();
              ssh.connect("<IP_Address>", 22<port_number>, "<user_name>", "<password>");
              ssh.waitFor("]$");
              ssh.sendLine("ls -lrt");          
              System.out.println(ssh.getLine());
              ssh.disconnect();
    }Thanks,
    Avin

  • How to invoce remote none-java application in Portal Server

    Hi all
    We have a project that try to use SUN portal server to call remote coldfusion application, according to the server guide I just find the remote portlet can be invocate. Any one had the experience on that.
    Thanks
    Rosso

    The iFrame Provider is provided out of the box with the Sun Portal. You can just use psconsole to add a new channel to a tab. Select "Provider" for the type and then select iFrame for the Provider. You can enter a URL property that points to site you want to appear in the iFrame. There are other useful properties that control scrolling behavior and the height/width of the channel.
    - Jim

  • Calling Java application in the server

    Hi,
    Is it possible to call a GUI based Java App from the oracle server? If so how?

    Hi,
    Welcome to MSDN.
    I would suggest you consider posting this issue in the forum Mr. Monkeyboy suggested.
    In addition, issues about java are not supported in these forums.
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Opening & Editing forms created in LC ES on PC on a MAC using Acrobat 9

    I created 2 forms in LC ES on PC and now need to open them on new MAC using Acrobat 9 pro...It won't allow me...says it is an XML form. What do I need to do to fix this problem.

  • Basis in servlet technology

    hey any one out there plz let me wat happens interenally when the container reads the following information provided as part of web.xml,as i am a beginner i am not able to under wat goes on internally.So plz help me in this regard. Let us suppose son

  • I can't lock my ipad screen.

    I do not think that my lock screen button is spoiled but it does not lock my ipad screen. Has anyone encountered this problem before? i need some help.

  • Calling selection screen of a standard table

    Hi All, I want to call KNA1 table's Selection Screen' from a customized program. Can anyone let me know how to do this. Customer program-->KNA1 table selection screen Thank you

  • Load balancing in powerpath 4.x on solaris 9

    Hello, I have installed powerpath on solaris 9. How to enable multipathing and load balancing? 1) /etc/powercf -q; 2) /etc/powermt load; 3) /etc/powermt config; 4) init q; 5) /etc/powermt display is this correct and also if possible can you let me kn