AJAX producer/consumer and JAVA producer/consumer  in same project

I've already successfully integrated and customized the code for both an AJAX and JAVA producer/consumer client in JMS (using ActiveMQ as the JMS broker and Tomcat as the webapp container). While both have been working well in separate projects, unfortunately, I'm having a bit of trouble trying to integrate them for the purpose of running an AJAX message listener and JAVA message listener in the same project.
What I'm trying to do is have JAVA act as the failover for when the AJAX JMS consumer is not listening (i.e. when the browser is closed). When a browser client opens, the (constantly running) JAVA client can ignore the messages... but... when no browser client is initialized, the JAVA client should respond to the messages on behalf of the AJAX client.
I've tried using a ServletContextListener pattern, which I was hoping would "automagically" launch the JAVA listener via its main method, whenever the Servlet gets initialized (i.e. it would auto-start when Tomcat gets restarted, or, anytime the Servlet gets redeployed) but it seems Tomcat is not thread-safe and this might be causing some problems.
In any case, I can't seem to get the JAVA client to reliably start running and stay running for the lifetime of my AJAX client (webapp .war), and without including them in the same project and same J2EE container sharing the same ServletContext, I don't know how its possible to ensure they are running and starting and stopping at the same time.
Is there perhaps a better way to accomplish this?
Edited by: bcmoney on May 17, 2010 1:25 PM

I've already successfully integrated and customized the code for both an AJAX and JAVA producer/consumer client in JMS (using ActiveMQ as the JMS broker and Tomcat as the webapp container). While both have been working well in separate projects, unfortunately, I'm having a bit of trouble trying to integrate them for the purpose of running an AJAX message listener and JAVA message listener in the same project.
What I'm trying to do is have JAVA act as the failover for when the AJAX JMS consumer is not listening (i.e. when the browser is closed). When a browser client opens, the (constantly running) JAVA client can ignore the messages... but... when no browser client is initialized, the JAVA client should respond to the messages on behalf of the AJAX client.
I've tried using a ServletContextListener pattern, which I was hoping would "automagically" launch the JAVA listener via its main method, whenever the Servlet gets initialized (i.e. it would auto-start when Tomcat gets restarted, or, anytime the Servlet gets redeployed) but it seems Tomcat is not thread-safe and this might be causing some problems.
In any case, I can't seem to get the JAVA client to reliably start running and stay running for the lifetime of my AJAX client (webapp .war), and without including them in the same project and same J2EE container sharing the same ServletContext, I don't know how its possible to ensure they are running and starting and stopping at the same time.
Is there perhaps a better way to accomplish this?
Edited by: bcmoney on May 17, 2010 1:25 PM

Similar Messages

  • Can an editor and I work on the same project, at the same time in PPCC?

    I'm trying to figure out if two people can edit a project in live time... I'm currently struggling with the 20gb cloud limit for my projects and I think I'm just going to bring an in house editor into the mix. 
    Can he and I edit the same project from a NAS drive?
    ---Trav

    As far as I know, "regular" Premiere Pro does not have any provision for the kind of file locking/unlocking required for 2 people to edit the same project... so if YOU save an edit and your other person saves after you, your edit is going to be overwritten and lost
    Solution for networks...
    Adobe Anywhere http://www.adobe.com/products/adobeanywhere.html
    http://www.creativeimpatience.com/adobe-anywhere-enterprise-solution/

  • Encoding as Bluray and Standard DVD on the same project?

    If I have a project in HD and want to make additional DVDs with standard DVD , can i use the same project?  I dont want to have to remake all the menus and links.
    Thanks,
    John Q. 

    I'll add a fairly ignorant reply, as I've only done 3 projects in Encore. But it seems one of the magnificent things about the program is that You can export the project to 3 different formats: BluRay, DVD, and Flash.
    I've intially set up the projects in BluRay to have the maximum quality to start, then when ready to burn cllick File --> Build and you get the 3 choices.
    That choice is not permanent, you still have the 3 options the next time you want to do an export.
    JAF

  • HD 1080i  and  HD 1080p on the same project????

    Hello everyone.
    I am running with Finalcust 6. I need to buy a new camera. I do have the Canon HV30. Can I import in the same project footage with the format HD1080i  and  HD 1080p from different cameras?
    I dont know if I need to buy this camera:
    http://www.bhphotovideo.com/c/product/581316-REG/Sony_HDRFX1000_HDR_FX1000_Handy cam_HDV_Camcorder.html
    Or this:
    http://www.bhphotovideo.com/c/product/518555-REG/Sony_HVRHD1000U_HVR_HD1000U_Dig ital_High_Definition.html
    I am really happy with my HV30 results. And I am afraid to have some problem to work with 2 differents types. And if I can work with 1080i and 1080p in the same project, what will be the results?
    Thanks alot
    Fabricio Giugni

    Avoid mixing them if you can. If you do have both edit in 1080i to maintain the resolution of that media. Anything that's 1080p and needs to be rendered will become interlaced.

  • ABAP and JAVA Stack in the same box

    Hi all,
    I have installed Java Sneak preview first and after I installed ABAP Sneak in the same box.
    Everything is working fine but I noticed a little detail.
    My jcontrol.exe service disapeared from SAP Management Console.
    I mean before installed ABAP Stack my MMC had 2 divisions in my J2E instance:
    server 1 with 2 Process msg_server.exe and enserver.exe
    server 0 with 2 Process jcontrol.exe and igswd.exe
    After installed ABAP Stack, my server 0 became part of NSP Instance and jcontrol process is not displayed anymore anywhere.
    Instead I see now msg_server.exe and disp+work.exe and igswd.exe that of course are Process of the ABAP system.
    Does anyone have a nice explanation for this?
    Regards,
    Mauricio

    Hi mauricio,
    I was installing Netweaver sp15 both Java and ABAP version on one PC. But it seems they are working.
    Can you please tell the procedures to follow, to have good installation?
    If I load java version first and then ABAP i get error at step 11.
    Did you parttition the drive in to 2 or you installed on the same partition?
    Your help will be greatly apprecieated.
    Thanks

  • Mqtt and java to basics iot(s) projects

    Hi,
    I have a adapted  googlecreative Project running in my house. Is this use node.js, websocket, html5, but is don't have a public access (DDNS) and I'm not have a mobile app for it yet. I will  have a dyndns address..
    Now, I'm wanting to use MQTT and solve this problem.
    What do you thing about Eclipse Paho and MQTT (Java Messaging in the internet of the things) ??
    e.g.: hardware : raspberry pi and arduino uno r3

    Another possibility is NewJawin. You can also take a look at Jakarta POI,
    but that's not really implemented. There's no good solution, but Jacob and
    NewJawin are the two best I've found.

  • ABAP and Java Edition on a same Machine ?

    Hi all
    Is it possible to install SAP ABAP (with DynPro Edition ) and Full JAVA Edition 2004s on a same Computer ?
    Please let me know the Pros and Cons of having it on the same machine !!!!
    Thanks
    Jack

    I am closing this Thread since the question was dealt in the following Thread.
    abap on java stack.
    Many Thanks

  • Can you switch back between CS5 and CS5.5 with the same project with Premiere??

    Hey all,
    I just got CS5.5 for Mac (Lion) and was wondering if i am able to save a project and open it with CS5 Premiere because I work with one other editor who has CS5. I have tested saving a project in CS5.5 and opening it in CS5 but it says that it needs to convert first but then it seems to work fine. So basically, is there workflow good between the 2? Any known issues or anything else i should know about when switching back and forth?
    Also, I have the student edition of CS5.5 and was wondering how many times can I install it? I plan on buying a new computer in a few months from now but currently have 2 and was wondering if i should install it on both my current computers and then deactivate one and install it on my new computer in the future? Or is there a limit and that will not work?
    Thanks!!

    Because it has to create a new "version" of your project every time you go back and forth, you'll end up with umpteen versions if you go back and forth every time which could become a nightmare for you... And because it creates new "versions" every time, you're far more likely to end up with a corrupted file at some point... I'd stay away of going back and forth between versions...
    As an aside, does anyone know if you can go back and forth between the same version (CS5.5) on different platforms (Mac/PC)? I may need to start doing that soon at work, and I've never tried...

  • HD video and Jpeg pics in the same project/sequence?

    I want to use both HD video (1929x1084;24bps) and Jpeg pictures from my DSLR camera in the same sequence. My problem is that when i choose the correct presets for the video (DSLR 1080p24) then the Jpegs gets cropped in the program monitor (I only see part of the picture). How can I fix this?
    It is probably a simple question but I haven't been able to find an answer. 
    Kind regards

    There are basically two ways (plus one variation) to address this.
    Your stills are overly-large, for the Project Preset's Frame Size. You can apply the fixed Effect>Motion>Scale to Scale them to the Frame Size (1920 x 1080), or can check Scale to Default Frame Size (that's the variation). Or, you use a program, like Photoshop, to Scale to 1920 x 1080.
    Until CS5, PrPro was not that good at Scaling, so PS was the way to go. Things changed with CS5, but one is still shoving around a bunch of pixels, that will not be needed, and this taxes the computer.
    Good luck,
    Hunt
    PS - This ARTICLE will give you some background, and tips on doing the Scaling in PS.

  • Can I use both Lightroom for a Mac and PC to do the same project?

    My school uses Mac I use PC I would like to know if I start my project in light room for Mac if I can finish it in Lightroom for PC?

    Yes, as long as you have a drive that both Mac & Windows can read...LR serials are platform agnostic...

  • Errror in RFC connection between SCM ABAP stack and JAVA Stack

    Hi All
    we have installed SCM Abap stack and SCM java stack on same system within single database.when i create rfc connection AI_RUNTIME_JCOSERVER from SCM Java stack to SCM Abap Stack its working fine,but when i am configuring same from SCM Abap to SCM Java using SM59 its giving error.
    Error Details     Error when opening an RFC connection
    Error Details     ERROR: failed to open file G:\usr\sap\SCD\DVEBMGS00\data\sideinfo.DAT
    Error Details     LOCATION: SAP-Gateway on host OPS20SCD1.Octal.pet / sapgw00
    Error Details     CALL: fopen
    Error Details     COMPONENT: SAP-GW-LIB (ReadSideInfo)
    Error Details     COUNTER: 1854
    Error Details     ERROR NUMBER: 2
    Error Details     ERROR TEXT: ENOENT: No such file or directory OR: The system cannot find the fi*
    Error Details     MODULE: gwxxside.c
    Error Details     LINE: 274
    Error Details     RETURN CODE: 451
    Error Details     SUBRC: 0
    Error Details     RELEASE: 701
    Is it compulsory to create RFC connection between abap and java installed on the same system.
    plese suggest.
    Regards

    to configure acceptance of the ABAP (integrated ITS / WebGUI) saplogonticket on the java stack, just log into the java stack (http://FQDN:50xxx/nwa) and select configuration  THe last item in the list is Trusted System... click.
    on the ensuing page, click on the add trusted system button --> by querying trusted sytem.
    Enter the required data on the page:
    system type: ABAP
    host name: FQDN
    System Nr: your instance number
    client (of the productive client)
    and a username and pw with superuser priveliges in the system (SAP_ALL/SAP_NEW, etc).
    the click next
    On the final screen, click finish.
    You have now SSO setup between the ABAP and Java stacks. To configure SSO to accept java saplogontickets on ABAP see:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2b0310d6-0801-0010-3185-b2371a280372
    This should resolve your question.

  • ABAP and Java HTTP Port same - PI 7.1 EHP1

    Hi,
    I have installed PI 7.1 EHP1 system.
    I realize that both ABAP and Java HTTP Ports are same.
    Is there any official note reg this or any info from SAP on the change.
    icm/server_port_0 = PROT=HTTP,PORT=51500,TIMEOUT=60,PROCTIMEOUT=600
    icm/HTTP/j2ee_0   = PREFIX=/,HOST=localhost,CONN=0-500,PORT=5$$00
    Thanks,
    Tanuj

    Hi,
    >>I realize that both ABAP and Java HTTP Ports are same.
    the changed happened in 7.1 already as far as I remember
    but I don't think it's documented anywhere except maybe the installation guide
    Regards,
    Michal Krawczyk

  • Individual business system for ABAP and Java Stack

    Hi All,
    I need to send message from a system to XI via ABAP proxy and Java proxy. The sender's ABAP and Java proxy use the same message interface to communicate with XI. Should I create one business system for the ABAP stack and one for Java stack of the sender system?
    Thanks + Best Regards
    Jerome

    Are you sending same message type from ABAP proxy and Java Proxy to XI?
    If you have ABAP proxy, why do you need Java Proxy? Actually you cannot create any Java proxies on ABAP bases systems. What kind of system sender is? Java proxies are created for pure Java based applications.
    Let me know if I didnt understand your question correctly. If so, please explain in detail why you need both proxies and what is your sender application.
    --Archana

  • Oracle Lite and Java 1.3

    Some preliminary testing of Java 1.3 against Oracle Lite 8.1.5 causes an fatal crash that won't allow me to debug through and suspends both the VM and my debugger/IDE for Java.
    Can anyone confirm if it is possible to run Olite and Java 1.3? Same code works great in OLite and Java 1.2.2, and crash doesn't seem to be OS specific (tested under NT and 2000).
    Cheers, DJ

    When you put your code in a try block and print the exception, what does it say:
    String driver = getDriverFromConfigurationFile();
    try
    Class.forName(driver);
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    Second option is to use DataSource instead.

  • WSRP - Pass Custom Data between Consumer and Producer

    Hello All,
    I am having a couple of queries with respect to Custom Data Transfer. Consider I have a Map of values which I need to transfer between both Consumer and Producer.
    For eg: the map that Consumer sends would contain "firstName", "lastName", etc... On the other hand Producer needs to do some business function based on the data and add more values to the map like "rewardPoint" etc....
    On Consumer Side:
    I have choice to use Backing File or IGetMarkupInterceptor to implement the preInvoke to pass the data using SimpleStateHolder.
    Question: I am not able to send a simple Serializable POJO Object... I can only send primitive / default java objects like Strings, Maps of String etc. Is my understanding correct?
    On Producer side:
    I am able to receive the Custom Data from request. No problems. Now how to send more data from Producer to consumer. I need to add the "rewardPoints" into the map and send back.
    My understanding is that if the Producer puts any values into StateHolder objects, Consumer will receive it in IGetMarkupResponseContext object in the Interceptor's postInvoke method.
    Question: How do I get a handle to the IGetMarkupResponseContext object @ Producer end???
    Question: Do I need to write some interceptors on Producer end? If so which file I need to use?
    Any help / pointers would be greatly appreciated.
    Thanks,
    Paz

    Hi All,
    I tried to set the data in the producer using the following command
    SimpleStateHolder stateSimpleOuterReq = (SimpleStateHolder)request.getAttribute(MarkupRequestState.KEY);;
              if (stateSimpleOuterReq == null) {
                   SimpleStateHolder state = new SimpleStateHolder();
                   state.addParameter("name", "data1");
                   request.setAttribute(MarkupResponseState.KEY, state);
    I am not able to retrieve the same in consumer.
    The above is a WSRP struts request.
    I also tried setting the data by unwrapping the request in producer and still value is null in consumer :-(
              HttpServletRequest requestq = (HttpServletRequest)((HttpServletRequestWrapper) request).getRequest();
              SimpleStateHolder stateSimpleReq1 = (SimpleStateHolder)requestq.getAttribute(MarkupRequestState.KEY);
                   if (stateSimpleReq1 == null) {
                        SimpleStateHolder state = new SimpleStateHolder();
    state.addParameter("name", "data1");
                        requestq.setAttribute(MarkupRequestState.KEY, state);
    Please help me in resolving the issue. Correct me if i am doing anything wrong.
    Thanks
    T. Deena
    Edited by: user11261911 on 12/06/2009 19:49

Maybe you are looking for