Retrieving existing Java session

Hi,
i'm running a web application in java.  The webapp contains JSP pages which contain a Flex application.
The Flex app is configured to communicate with the Java on the server side, via BlazeDS.
I'm able to call Java services fine but unfortunately, when i do this, BlazeDS creates a new instanciation of Java classes instead of checking if there already is an existing one.
So my question is is it possible, through BlazeDS, to retrieve an existing java session and existing java class instances?
Thank you in advance for your insight
Best regards
Pier

I still don't understand because your questions sounds too easy...
All you need to do is change your
public void main (String[] args)
To
public void main_progname(String[] args)
and call it from a servlet.
You can create 'args' from values from request.getParameter(<string>);
That's all there is to it.
Mike
--- Tom DelGiudice <[email protected]> wrote:
I am hoping to use the bulk of exisiting java
programs in a step wise
transition to total replacement with weblogic JSP
and servlets. At first I
would create the front end with weblogic jsp using
the java programs for the
business logic. Then I plan to build any new
business logic with JSP
servlets, and EJB still using the old java
applications. Eventually the
java apps would be phased out. A total renovation
would be the right way to
go, but today's IT management prefers small short
term successes even if the
total cost is greater. I hope this gives you the
info you need to give me
some insight. Thanks for your response Thomas
DelGiudice"Mike Reiche" <[email protected]> wrote:
>
Please explain a little more why they need to be integrated into WL.
Is there something
specific in WL that you wish to use?
Mike
"Thomas DelGiudice" <[email protected]> wrote:
Can anyone tell me how I can integrate existing java programs into weblogic.
I hope to integrate these programs without converting them into beans
or
servlets.
Thanks in advance Thomas DelGiudice

Similar Messages

  • [Exchange 2013/Online][PS] How to retrieve existing remote PowerShell sessions

    I'm trying to figure out how to retrieve all existing remote PowerShell sessions (user-managed) between a client and an Exchange 2013 server.
    Running Get-PSSession only returns remote sessions created within the current PowerShell session (system-managed). I need to do this from within a
    different PowerShell session, possibly even from a different computer from where those remote sessions were established.
    Documentation for Get-PSSession states that this should be possible starting with PS 3.0 since user-managed sessions are now stored locally on the remote server (in my case, the Exchange 2013 server) and can later be retrieved from any system-managed session
    by using Get-PSSession with either the ComputerName or ConnectionUri parameter sets.
    Here's how those remote sessions are created:
    PS $> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://<exchange_server>/powershell/ -Credential $credential -Authentication Basic -AllowRedirection
    PS $> Import-PSSession $Session
    And how I try to retrieve those session afterward:
    PS $> Get-PSSession -ComputerName <exchange_server> -ApplicationName powershell -Authentication Basic -Credential $credential -UseSSL -Port 443
    PS $> Get-PSSession -ConnectionUri https://<exchange_server>/powershell/ -AllowRedirection -Authentication Basic -Credential $credential
    Both methods yield no results (nor errors), while running Get-PSSession (without any parameters) within the same user-managed session would successfully return the session. 
    The only explanation I could think of right now is that somehow, WinRM on the Exchange server is not running PS 3.0 even though:
    $PSVersionTable.PSVersion returns 3 0 -1 -1
    winrm id returns ProductVersion = OS: 6.2.9200 SP: 0.0
    Stack: 3.0
    But when I attempt to disconnect a remote session with this Exchange server using Disconnect-PSSession, I get the
    following error message: 
    Disconnect-PSSession : Disconnect-PSSession operation failed for runspace Id = XXXXX
    for the following reason: The disconnection operation is not supported on the remote computer. To support
    disconnecting, the remote computer must be running Windows PowerShell 3.0 or a later version of Windows PowerShell.
    So I guess I have a couple questions:
    Are remote PSSession even supposed to be maintained on
    an Exchange 2013 server? 
    If so, is it possible to retrieve them from a different session using GET-PSSession?
    Which version of PS 3.0 is used by WinRM on an Exchange 2013 server?
    thanks

    Thanks for your help. 
    1. I know that remote PS sessions are supported, I have no issue connecting to the Exchange server. The issue is with
    reconnecting to an existing PS session.
    2. As mentioned in my original post, PS & WinRM 3.0 are installed on the client:
    $PSVersionTable.PSVersion returns 3
    0 -1 -1
    winrm
    id returns ProductVersion = OS: 6.2.9200 SP: 0.0 Stack:
    3.0

  • Using existing java servlet as web portlet?

    I have an existing java servlet that I am trying to use as a web portlet. When I log into portal and run the page I have placed my web portlet on, the header shows up, but not the data.
    I don't fully understand the provider.xml file (especially the renderer part), so my provider.xml file could be wrong:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?providerDefinition version="2.0"?>
    <provider class="oracle.portal.provider.v1.http.DefaultProvider">
    <session>true</session>
    <portlet class="oracle.portal.provider.v1.http.DefaultPortlet" version="1">
    <id>1</id>
    <name>XSLSample</name>
    <title>XSL-XML Conversion</title>
    <description>performs xml conversion</description>
    <timeout>100</timeout>
    <timeoutMessage>Portlet timed out</timeoutMessage>
    <acceptContentType>text/html</acceptContentType>
    <renderer class="oracle.portal.provider.v1.RenderManager">
    <showPage class="oracle.portal.provider.v1.http.Servlet20Renderer">
    <servletClass>XSLSample</servletClass>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    This is my servlet code:
    import org.w3c.dom.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import oracle.xml.parser.v2.*;
    * This file gives a simple example of how to use the XSL processing
    * capabilities of the Oracle XML Parser V2.0. An input XML document is
    * transformed using a given input stylesheet
    public class XSLSample extends HttpServlet
    * Transforms an xml document using a stylesheet
    * @param args input xml and xml documents
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    doGet(request, response);
    public void doGet (HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL xslURL;
    URL xmlURL;
    try
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    // parser input XSL file
    xslURL = createURL("e:/testxsl.xsl");
    parser.parse(xslURL);
    xsldoc = parser.getDocument();
    // parser input XML file
    xmlURL = createURL("e:/testxml.xml");
    parser.parse(xmlURL);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    processor.setErrorStream(System.err);
    // Process XSL
    DocumentFragment result = processor.processXSL(xsl, xml);
    // create an output document to hold the result
    out = new XMLDocument();
    // create a dummy document element for the output document
    Element root = out.createElement("root");
    out.appendChild(root);
    // append the transformed tree to the dummy document element
    root.appendChild(result);
    // print the transformed document
    out.print(response.getOutputStream());
    catch (Exception e)
    e.printStackTrace();
    } //END OF DOGET
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;
    I had to add a "doPost" to my servlet because I was getting the jserv error "Post is not supported by this URL", but that is the only thing I have changed. Do I have to use some of the "portlet" classes in my servlet? (The servlet works fine standalone in ie, just won't output anything on my portal page.)
    Any ideas will be appreciated.

    The problem is in the following line:
    out.print(response.getOutputStream());
    Portlets (unlike servlets) cannot output to a n OutputStream, but only to a PrintWriter.
    I had a similiar problem trying to output a chart. My solution was to output the chart to a file, then reference the chart by outputting a HTML img tag from the portlet, which referred to the file in the src attribute.
    null

  • How to retrieve the java object in a proxy service in osb -- Plz help

    Hi all,
    I have a singleton java class which runs whenever the weblogic server gets started and store the output in its object. I need to access this java object from a proxy service in osb.
    We tried using java call out and retrieved that object but we couldn't know how to parse that object into XML.
    We are not sure of using the java call out in osb to solve this purpose because whenever we use a java callout, that particular java code will run which is not the case of singleton class.
    So kindly help us how to retrieve the java object which holds the output without running the java code every time because its already run and holding the output in its object.
    Regards
    Prabhu

    here the doc http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656
    but I guess you are already at the stage of getting a POJO in a first Java Callout and passing the POJO to a second Java Callout, which should then return it to OSB as a XMLObject.
    My recommendation is to write a Java function which returns a XMLObject and uses a XMLCursor to populate it with the values of the POJO.
    An XMLObject returned to the OSB is automatically transformed in a "XML" variable (which in reality is represented as a XMLObject in the Pipeline context)
    Here some code sample:
    http://www.javamonamour.org/2010/09/how-to-create-xmlobject-using-xmlcursor.html

  • Java Session problem while sending mail(using javamail) using Pl/SQL

    Hello ...
    i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
    pls any help.

    props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
    Please format your code when you post the next time, there is a nice 'code' button above the post area.
    Mike

  • Call existing stateful session bean in different servlets

    hello,
    we are implementing a shopping cart for our online dvd store in netbeans 5.5.1 and ejb 3.0.
    for that we use a stateful session bean, which is created when a user is logging in for connecting the user-entity to the bean.
    after logging in, the list servlet, which displays a list of all available dvds, is shown. after clicking the "add to shopping cart" button, the cart servlet with a list of all added dvds is shown. in this servlet we want to reactivate the existing stateful session bean. is this possible? and when it's possible, how is it possible? ;)
    our sessionbean with initialize() method:
    @Stateful
    public class CartBean implements Cart {
        UserEntity user;
        List<DVDEntity> contents;
        public void initialize(UserEntity user){
            System.out.println("Warenkorb erstellt");
            this.user = user;
            contents = new ArrayList<DVDEntity>();
    }thx!
    Edited by: licherpremium on Nov 8, 2007 6:35 AM

    hello,
    we are implementing a shopping cart for our online dvd store in netbeans 5.5.1 and ejb 3.0.
    for that we use a stateful session bean, which is created when a user is logging in for connecting the user-entity to the bean.
    after logging in, the list servlet, which displays a list of all available dvds, is shown. after clicking the "add to shopping cart" button, the cart servlet with a list of all added dvds is shown. in this servlet we want to reactivate the existing stateful session bean. is this possible? and when it's possible, how is it possible? ;)
    our sessionbean with initialize() method:
    @Stateful
    public class CartBean implements Cart {
        UserEntity user;
        List<DVDEntity> contents;
        public void initialize(UserEntity user){
            System.out.println("Warenkorb erstellt");
            this.user = user;
            contents = new ArrayList<DVDEntity>();
    }thx!
    Edited by: licherpremium on Nov 8, 2007 6:35 AM

  • Use Sun Java Studio 2 with Existing Java Application

    I have started using Sun Java Studio 2 and having fun and little difficulty creating a new Java web application from scatch. My question is where do I find information on Java Studio configuration to allow Java Studio to load up and modify Java server pages/forms in an existing Java application that I did not write?
    The Java application has been created with Javabeans and using BEA Weblogic version 7, with a SQL-Server 2000 database backend.
    Below is a bit of code out of one of the main Java forms.
    <%@ page buffer="256kb" autoFlush="false" errorPage="../../common/system/error.jsp"
    import="psdi.jsp.beans.*, psdi.jsp.common.*, psdi.jsp.app.wotrack.*, psdi.jsp.util.* , psdi.mbo.* , psdi.util.* "%>
    I have looked around and have not found what I need to setup in Java Studio to allow me to load up a form and view it in the Visual designer, I keep getting errors on the psdi. references and cannot load up any pages.
    I see on the server install ia folder under the main root <DIR> called <apps>, and inside the <apps> folder is a folder called <jsp> and in the <jsp> folder are sub folders for each main module within the application with all the related .jsp files. I have been manually editing the .jsp files using Windows Notpad and saving the changes. Then I rebuild the .ear file and my changes work fine. Since I have a lot of changes to make there has to be a better way than using Notpad.
    My hope is somewhere is a point-by-point document on what to so I can use Sun Java Studio 2 to make my changes in a visual IDE.
    Any assistance would really be appreciated.

    Hi Giri,
    Yep, this I know,b ut when I do I get errors messages and am looking for some form of point-bypoint instuction that better explains how to setup up custom libraries in Sun Java Studio, custom tags, etc.

  • Update existing Java Mapping in NWDS

    Hi,
    I need to update the existing Java Mapping. I downloaded the existing mapping from imported archive and modified it in NWDS but it is giving lots of errors regarding missing libraries(JARs).
    I just need to do a small change in code.
    Can anyone suggest how to compile it and creat a JAR and which i can upload back as an imported archive?
    Thanks in Advance.
    Regards,
    Bharat

    Hi,
    Make sure that you have the below jars or else you can find them in your XI server.
    aii_adapter_xi_svc.jar,aii_af_cci.jar,aii_af_cpa.jar,aii_af_mp.jar,aii_af_ms_api.jar,aii_af_ms_spi.jar,aii_af_svc.jar,aii_af_trace.jar,aii_map_api.jar,aii_mt_rt.jar,aii_util_xml.jar,aii_utilxi_misc.jar
    Then import these jars to Project Explorer section --> Properties --> Java Build Path --> Libraries --> Add External Jars  in NWDS.
    Compile the code.
    For making a jar file run this command from the command prompt.Input file are the source code file and the .class file.
    jar cf jar-file input-file(s)
    Regards,
    Ramkiran

  • Simple Web Frontend for existing Java app

    Hi there!
    (sorry for my english at first ;)
    I have an existing java app which currently is used via command line. It's a server application which mostly does monitoring outputs and functions you can use in the shell are like starting/stopping the server. For these outputs and for starting/stopping and so on i want to create a simple web frontend which gives me the ability to do this.
    What do i need? It would be fine if i do not have to set up a large tomcat server because the program should run out of the box. Of course i want to access the website via the internet (simple login). The whole thing would be about 2-5 simple pages. Best thing would be if i could update the monitoring variables via java script.
    Can i use servlets (not much experience with it so far, that's why i ask :) )? What do i need for the webserver? Can i access my data variables from right from the servlet?
    Thanks in advance,
    kiwaque

    If you are familiar with Swing, I would suggest GWT for the Frontend... you can build and debug the Frontend similar to a Swing App, and then compile it to HTML/CSS/Javascript...

  • Map xsd complex type to existing java class without adding JAXB annotations

    Hello
    I've got a case where I should map an xsd complex type to an existing Java class without modifying that class, i.e. without adding JAXB annotations to that class.
    Is this possible somehow?
    As far as I've understood, the <javaType> declaration (adapter, parse/print methods) can only be used for xsd simple types.
    Thanks, Tom

    It should be possible to implement an XmlAdapter<...,...> which performs the required conversion between the original type and a JAXB-annotated type. Then, at the places where the original type is used, the @XmlJavaTypeAdapter annotation would be used.
    The xjc compiler supports this for xsd simple types (xjc:javaType annotation), but not for complex types.
    Any idea why this is restricted to simple types?
    Would it be possible to implement a xjc plugin which does this for complex types?
    Thanks Tom.

  • Java Session error occurred

    Hi Experts,
    We are in process of upgrading CRM 4.0 to CRM 7.0, sometimes we face " Java session error occurred"  popup in CRM 7 while working on pricing or in some tabs of CRMD_ORDER
    Any idea why this is error is happening, we checked all IPC routines and are also woking fine.
    Expert advise needed.
    Thanks.
    Abhishek

    Thanks for reply Leon,
    Just got the log of the java messages in SM53 Log Administration, and found that Shared Closure has no space to create or save the session. Obviously the problem is lack of space.
    I dont have idea how to set the space profiling for the shared closure, can you please guide me on this or how to find resolution for this space related issue.
    Thanks in advance.
    Abhishek

  • Make an existing Java webapp Flex-compatible

    Hi,
    I am aware that the kind of help I'm after can probably be
    found somewhere, either on these forums or by googling... I just
    can't find it.
    My situation is as follows: I have an existing Java webapp
    running on Tomcat5, and I would like to make the relevant changes
    to that back end so that it can be accessed using Flex.
    Knowing nothing about Flash myself and being purely a Java
    developer... where can I start ?
    I have tons of Java beans and the DAO logic that goes with
    them already implemented, what I'm lacking is a way to make those
    "available" to a Flex application. From what I have been reading,
    AMF would be the best way to have Flex and Java communicate, but as
    I said I don't know how to start working on that integration.
    How do I "flexify" an existing Java webapp running on its own
    Tomcat ?
    Any help will be greatly appreciated, I'm completely new to
    all this.

    I would get FDS, or the latest version which is now
    re-branded as LiveCycle
    Data Services (LCDS) and look at a RemoteObject example. The
    basic idea is
    that you have facade classes in /WEB-INF/classes (or in a jar
    in /WEB-INF/lib)
    of your flex.war file and then you configure destinations
    with the "remoting
    service". The Flex client code can use the RemoteObject API
    to access these
    destinations. A channel is used by the client and server to
    exchange information
    and the translation from ActionScript to Java is handled for
    you. You can
    map custom typed ActionScript classes to your Java beans
    using the special
    [RemoteClass(alias="...")] metadata and as long as you have
    public getter/setter
    properties that match on the client and server, and a public
    no-args constructor
    on both ends, the types should be automatically
    interconvertable.
    There should be lots of websites out there that discuss this
    too as it's
    quite a popular way to get Flex to talk to Java.

  • How to create a UML diagram from a existing .java/.class file?

    I want to create a UML diagram from a existing .java/.class file automatic in JDeveloper. Can I get it? thanks!

    create a new class diagram and then simply drag the java classes from your project onto the diagram area.

  • Exec command via SSH in existing X-Session

    Hello,
    i want to start the media player app via SSH in an existing X-Session (real display) on the ssh target (ssh user = x-session user, all same machine). I do not mean X-forwarding! After the app is started, i want to disconnect the ssh connection and all should be still running. Any ideas?
    Greetings,
    Sebastian

    The difference:
    #remote display
    ssh user@host DISPLAY=:0 some_command
    # although you might assume it get's passed through ssh, it does not and is displayed on the remote machine
    ssh -X user@host DISPLAY=:0 some_command
    # local display
    DISPLAY=:0 ssh -X user@host some_command
    Also have a look at the man pages of disown and nohup to learn how to remove the program from your running shell, so you can close the ssh connection.
    By the way: export only means, that the variable is exported to the shell. If I run "export TERMINAL=xterm", then until I close the shell, I can for example "echo $TERMINAL" to read "xterm". The shell is always on the host you are connected to. I assume there is a way to bind a remote X server to a DISPLAY (say :100), so you could DISPLAY=:100 to automatically show it on the remote host (or your local host, depending on what machine you sit in front of). I only assume because there is always a way, but I have never tested it or really thought about it.

  • HELP! Can I retrieve my previous session? I only just ticked the "open with previous session" preference but it seems too late! Can I still get the old pages/tabs I had open?

    HELP! Can I retrieve my previous session? I only just ticked the "open with previous session" preference but it seems too late! Can I still get the old pages/tabs I had open?

    That could be a problem, unfortunately.
    But most likely the pages you were on are stored in the History list. Try pressing Cmd+Shift+H to get the History window.
    To help prevent this from happening to you again in the future, I can recommend the extension [https://addons.mozilla.org/en-US/firefox/addon/2324/ Session Manager]. It is quite powerful but may not be able to help you any more than the History at this point.
    Please let us know how above works out, and if we can be of further assistance. Detailed feedback is appreciated and helps us to help more users with similar problems.

Maybe you are looking for

  • Creation of Switch

    I want to control the flow of data, by a SWITCH. I have a data flow which I want it to flow through a particular code, when I press that SWITCH, the data flow should be blocked and the code should use the previous values  stored to calulate further.

  • Error in Weblogic Server 8.1, Works fine with 7.0

              I have an application running fine on WLS 7.0, After migration to Weblogic 8.1,           the first page itself throws the following error: p_servlet/__home.java:18: '.'           expected           import DataBaseManager; //[ /home.jsp; Li

  • Overclocking ATI Radeon xpress 1270

    Hi guys I have an msi notebook ER 710 with ATI RADEON XPRESS 1270 and i wonder if I can overclock the vga card. If any body knows how i can overclock it please give me some information and how can it be done? 10x

  • Also problem read txt files into JTable

    hello, i used the following method to load a .txt file into JTable try{                     FileInputStream fin = new FileInputStream(filename);                     InputStreamReader isr = new InputStreamReader(fin);                     BufferedReade

  • Welcome to the Performance Tools Discussion!

    Come here to ask questions and discuss the performance collector and analyzer tools in Sun Studio. See also http://developers.sun.com/prodtech/cc/analyzer_index.html for information on these program performance tools.