Hot deployment

Hi,
I have a gateway which instantiates and runs applications. Each application implements an interface so the gateways only sees the class at type (interface).
I have a huge problem in that we have a number of developers working on these applications. There are constantly bug fixes, new functionality etc. that must be added.
How can I hot deploy these classes? I cannot restart the entire gateway every time I upload a class. This affects all the other applications.
I have looked at dynamic class loading but this is going to take some serious time to create a custom class loader that will actually destroy old class loaders when creating new ones.
Is there a simpler way to enable my gateway for hot deployment?
thanks!

Creating a new classLoader does not take a lot, and you can tell it NOT to cache the class.
Also, you can simply destroy all current references to a class when running, replace the class file, and then allow code to call the class object again - thus reading the new class file.
It's not typically a good idea to deploy-in-production any code.

Similar Messages

  • Creation of InitialContext fails when i hot-deploy scheduler-service.xml

    Creation of InitialContext fails when i hot-deploy scheduler-service.xml
    I configured scheduler-service as follows in Jboss 3.2:
    scheduler-service.xml
    <mbean code="org.jboss.varia.scheduler.Scheduler"
         name=":service=Scheduler">
    <attribute name="StartAtStartup">true</attribute>
    <attribute name="SchedulableClass">com.beta.my.utils.FMScheduler</attribute>
    <attribute name="SchedulableArguments">Schedulabe Test,12345</attribute>
    <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>
    <attribute name="InitialStartDate">0</attribute>
    <attribute name="SchedulePeriod">10000</attribute>
    <attribute name="InitialRepetitions">-1</attribute>
    </mbean>
    Schedulable Class
    package com.beta.my.utils;
    import java.util.Date;
    import org.jboss.varia.scheduler.Schedulable;
    public static class FMScheduler
    implements Schedulable
    private String mName;
    private int mValue;
    public FMScheduler(String pName,int pValue)
    mName = pName;
    mValue = pValue;
    public void perform(Date pTimeOfCall,long pRemainingRepetitions)
    try {
              Context context = new InitialContext();//properties taken from jndi.properties file
              } catch (Exception e){
                   e.printStackTrace();
    I started my jboss..,FMScheduler created successfully, perform method in FMScheduler called succesfully after SchedulePeriod(1000)
    The problem occurs(NullPointerException) while i changed SchedulePeriod time and hot-deployed(just saved scheduler-service.xml).
    The following Exception occures due to InitialContext creation fails*(Context context = new InitialContext();)* in FMScheduler.
    17:46:27,361 ERROR [STDERR] java.lang.NullPointerException
    17:46:27,361 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader.findR
    esources(UnifiedClassLoader.java:374)
    17:46:27,361 ERROR [STDERR] at java.lang.ClassLoader.getResources(ClassLoade
    r.java:825)
    17:46:27,361 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12$5.run
    (VersionHelper12.java:145)
    17:46:27,361 ERROR [STDERR] at java.security.AccessController.doPrivileged(N
    ative Method)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12.getRe
    sources(VersionHelper12.java:142)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getAp
    plicationResources(ResourceManager.java:468)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getIn
    itialEnvironment(ResourceManager.java:159)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.init(InitialConte
    xt.java:215)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialCon
    text.java:195)
    17:46:27,377 ERROR [STDERR] at com.beta.my.utils.FMScheduler.perform
    (FMScheduler.java:42)
    17:46:27,392 ERROR [STDERR] at org.jboss.varia.scheduler.Scheduler$Listener.
    handleNotification(Scheduler.java:1263)
    17:46:27,392 ERROR [STDERR] at org.jboss.mx.server.NotificationListenerProxy
    .handleNotification(NotificationListenerProxy.java:69)
    17:46:27,392 ERROR [STDERR] at javax.management.NotificationBroadcasterSuppo
    rt.sendNotification(NotificationBroadcasterSupport.java:95)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.sendNotification
    s(Timer.java:441)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.access$000(Timer
    .java:31)
    17:46:27,408 ERROR [STDERR] at javax.management.timer.Timer$RegisteredNotifi
    cation.doRun(Timer.java:612)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.SchedulableRunnable.run(Sch
    edulableRunnable.java:164)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.ThreadPool$Worker.run(Threa
    dPool.java:225)
    please help me if u have any idea,thanks

    Hi Hamsa,
    Did you also create and configure an "Execution Destination"?
    You can test the Metadata destination configuration on Web Service Navigator.
    On the web service navigator (http://hostname:portnumber/wsnavigator) search in the metatda destination you have created for the service you imported in web dynpro as a model. If you can find it there test it on the ws navigator.
    Best regards,
    Yasar

  • Hot deployment of class files (non-EJB)

     

    Also posting to the servlet newsgroup.
    "Craig Ambrose" <[email protected]> wrote in message
    news:[email protected]..
    >
    I am using WebLogic 6.1 and am interested in using auto-deployment indevelopment
    mode of JSPs and class files that those JSPs rely on. I have a simpleWebLogic
    application that gets deployed using the exploded directory format andwhen I
    modify the JSPs or the class files that they use everything reloadsproperly and
    a newly modified class file will be reloaded the next time the pageutilizing
    the Java class is requested.
    I have a much more complicated application (the one I am really doing workon)
    and I can't get the hot deploy of the class files to take effect. The JSPswill
    reload but I can't seem to cause the class loader to reload any changedclass
    files. If I use the WebLogic Console and un-deploy and then re-deploy theapplication
    then the class files will be reloaded, but I thought that wasn't necessaryfor
    hot deployment. This complex application stores many things in the HTTPsession
    context. I am wondering if that has an effect on the class loader fordependant
    class files.
    I'm pretty sure it is not a configuration issue as I have it working forthe simple
    application. I have the application deployed under the.\config\<domainname>\applications
    directory and am using the exploded directory format with the class filesalso
    exploded in the WEB-INF\classes directory.
    Any insights on dependancies of the hot depployment would be helpful.

  • Hot deployment of servlet

    hi
    i have compiled the servlet in jdeveloper and set the path to oc4j../../web-inf/classes path;after compiling the class Is it neccassary to shutdown the oc4j container;
    after shutdown the container only i am seeing the effect;without shutdown the container can we see the effect;we can do it Tomcat ;Is there any facility in OC4J ;
    bye
    chaitanya

              Hi, suppose you have the servlet called JoeServlet and registered as joeservlet with an argument, say, a file joe.txt. If you want to 'hot' deploy the JoeServlet you should make sure that a) the servlet's name must be unique b) the servlet's class must be in your servlet classpath (see the properties sheet aside) c) the initial argument, say: joeargument=./joe.txt, must match the the name expected by your servlet (eg. getInitParameter("joeargument")). If you have done correctly WLS must work.
              Joe
              "Jayesh Patel" <[email protected]> wrote:
              >
              >I am trying to hot deploy a simple servlet using weblogic console.
              >
              >I am getting error saying that
              >
              >"Property change error for property "RegisterNewServlet".
              >Servlet could not be loaded or instantiated"
              >
              >I am sure that servlet class I am trying to load is in servlet
              >class path.
              >
              >Any idea what is going wrong here.
              >
              >Thanks.
              >
              >
              >
              

  • Hot deployment of Plugin on OIM cluster

    Does someone  know , how to deploy(re-register) the plugin(event Handler ,schedule Task etc.) on OIM cluster in real time.
    I have observed  that when i do re-register the plugin(after any code changes etc.) from one of the nodes of the cluster, the new code does not get reflected on all the nodes.
    It works from one or two nodes but not from all nodes.
    Even after doing Purge Cache from all nodes the behavior remains the same.(Restart of OIM will do the trick, but i need hot deployment)
    Any ideas?
    Thanks
    Akshat

    That's what I have observed that even though the documentation says that PurgeCache.sh will do the trick but it never works. You have to restart the OIM Servers.

  • Servlet hot deployment with a webApp

    Hi everybody,
    Does anybody know something about hot deployment of servlets in a web
    application (.war) ?
    I tried many things (setting reloadCheckSecs in properties, in web.xml,
    hot-deploy from console...) but nothing really worked.
    So I have to register a servlet for hot deployment in the properties, but
    then it doesn't belong to the application.
    Thanx,
    Markus.

    I presume you are on 51.
    we do not support hot deployment of webapps in 51. We support this in 6.0
    Kumar
    "M. Hammer" wrote:
    Hi everybody,
    Does anybody know something about hot deployment of servlets in a web
    application (.war) ?
    I tried many things (setting reloadCheckSecs in properties, in web.xml,
    hot-deploy from console...) but nothing really worked.
    So I have to register a servlet for hot deployment in the properties, but
    then it doesn't belong to the application.
    Thanx,
    Markus.

  • Servlet Hot-Deploy with a WebApp

    Hi everybody,
    Does anybody know something about hot deployment of servlets in a web
    application (.war) ?
    I tried many things (setting reloadCheckSecs in properties, in web.xml,
    hot-deploy from console...) but nothing really worked.
    So I have to register a servlet for hot deployment in the properties, but
    then it doesn't belong to the application.
    Thanx,
    Markus.

    Are u saying that WARs are redeployed automatically but not individual servlets,
    or neither?
    Thanks.
    Viresh Garg wrote:
    Currently the automatic hot deployment of a servlet/JSP from exploaded WAR is
    broken. We are in the process of fixing it for next release. You have to
    redeploy your web application right now, for the change to take place.
    Viresh Garg
    Principal Developer Relations Engineer
    BEA Systems
    "M. Hammer" wrote:
    Hi everybody,
    Does anybody know something about hot deployment of servlets in a web
    application (.war) ?
    I tried many things (setting reloadCheckSecs in properties, in web.xml,
    hot-deploy from console...) but nothing really worked.
    So I have to register a servlet for hot deployment in the properties, but
    then it doesn't belong to the application.
    Thanx,
    Markus.

  • Hot deployment while running...

    Hi there!
    Does any body have experience HotDeployment while end user are using the application?
    For my self I got a real problem with HttpSession. After hot deployment all
    sessions are invalidate!! I mean "request.getSession(false)" return false. I
    have already carefully read documentation and pointed out that object store in
    session must be serializable. OK it's done. Now what else should I check?
    Thanks!

    redeploying will invalidate a servlet session. this is not a bug, but rather the intended
    behavior.
    if all you want to do is update content (jsp's, html, gif, jpeg, etc) you can use the
    refresh tool.
    it is a light-weight operation, instead of the heavyweight redeploy.
    to use it, please run the command:
    java weblogic.management.tools.WebAppComponentRefreshTool
    (this tool is compatible with 6.0 and 6.1)
    tracey
    "Thierry Giguère" wrote:
    Hi there!
    Does any body have experience HotDeployment while end user are using the application?
    For my self I got a real problem with HttpSession. After hot deployment all
    sessions are invalidate!! I mean "request.getSession(false)" return false. I
    have already carefully read documentation and pointed out that object store in
    session must be serializable. OK it's done. Now what else should I check?
    Thanks!

  • Hot Deploying Servlets from the command line

    Is it possible to hot deploy a servlet from the command line?
              

    Use the mbocutil command line tool located in:
    server root/bin/msg/admin/bin
    You can create a folder with spaces by using quotes like thus:
    ./mboxutil -c "user/Tuser/Test Folder"
    -Chris

  • Having issues hot deploying with ebcc in Solaris environment.

    I keep getting an error message when hot deploying a new webapp portal using ebcc.
    The error message reads" Unable to add module. appname to application descriptor for portal app. I check the portalapptools and i see the webapp in the portal management.. I also see that it added this to the database under the Portal table.. It never actually added the webapplication under in the console.. This is where it gets stuck... Basicly the steps that are missing are adding a deployment descriptor and then the webapp.. I manually did it and it works.. the problem after that is that i need to execute sync.sh after i bounce the manage server or else i dont see the webapps under portal management..
    So basicly the 2 questions are:
    1..Why doesnt hot deploying work in unix using X11?
    2.. Why do i need to execute sync.sh everytime after every bounce?
    Thanks,
    Oscar

    Oscar,
    Are you running the EBCC on the same machine as your server? The hot
    deploy mechanism of the EBCC forces you to have the server and the EBCC
    on the same machine. While the files are sync'd to the database, the
    web app files never get transfered. The deployer then is syncing to
    nothing.
    Try running it all on one machine, locally or with a remote display.
    Depending on your window manager some Java Swing applications like the
    EBCC do not always display fonts well remotely but it should still work.
    oscar sumano wrote:
    I keep getting an error message when hot deploying a new webapp portal using ebcc.
    The error message reads" Unable to add module. appname to application descriptor for portal app. I check the portalapptools and i see the webapp in the portal management.. I also see that it added this to the database under the Portal table.. It never actually added the webapplication under in the console.. This is where it gets stuck... Basicly the steps that are missing are adding a deployment descriptor and then the webapp.. I manually did it and it works.. the problem after that is that i need to execute sync.sh after i bounce the manage server or else i dont see the webapps under portal management..
    So basicly the 2 questions are:
    1..Why doesnt hot deploying work in unix using X11?
    2.. Why do i need to execute sync.sh everytime after every bounce?
    Thanks,
    Oscar--
    scott dunbar
    bea systems, inc.
    boulder, co, usa

  • Hot deploy in weblogic 10.0 not working

    Hi,
    I am trying to do hot deploy in an exploded war deployment. If I deploy the same exploded war in weblogic 9.2, I can update the class files without restarting the sever. However, in weblogic 10.0 system throws “java.lang.ClassCastException: com.xxx.xxx.xxxxx” when it tries to reload the app after the old class file has been updated with a new one. If the server is restarted then the new class file is picked without any errors. Are there different settings in weblogic 10.0 to enable hot deploy? Please let me know.
    Thanks a lot.

    Please don't cross-post.
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "vinayvangala" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Did anybody get hot deploy in an expanded directory format to work
    in weblogic 6.0 sp2. I have tried to follow the documentation but
    couldn't get it to work.
    Thanks
    Vinay

  • JSF (RI) app hot-deploy memory leak

    I have a standard JSF (RI) based web app that appears to be working just fine in terms of functionality. However, I believe that there is a memory leak associated with the sort of frequent hot-deploy cycles that are typical during a normal development cycle. I have been monitoring the app via the jvmstat 3.0 tools and have witnessed NO memory growth in the young or old generation areas - regardless of useage pattern. All of the growth seems to happen in the perm area of memory and be directly coincidental with the occurence of a deploy. Eventually, continued hot-deply cycles will result in an OutOfMemory error on the container - please note that continued and extensive use of the app WITHOUT the aforementioned hot-deploys does NOT result in the OutOfMemory error.
    From my research so far, I have discovered the following thread:
    http://forum.hibernate.org/viewtopic.php?t=935948&postdays=0&postorder=asc&start=75
    It refers to a similar problem with hiberate (which I am NOT using) as well as a commons-logging and several others. From the looks of it, I strongly suspect that there may be an issue with JSF when it's implementation is bundled inside the WEB-INF/lib dir - i.e. inside the specific web app's ClassLoader.
    Based on the above, I have implemented a SessionContextListener that invokes the org.apache.commons.logging.LogFactory.release() inside the contextDestroyed( ServletContextEvent e ) method. This does appear to free up some perm memory but there is still large growth that appears to be directly related to the FacesServlet initialization (navigation handlers, etc). I looked into calling the FacesContext.release() method which seems to have purpose similar to that of the LogFactory.release() method. However, at the time of the contextDestroyed() invocation, FacesContext.getCurrentInstance() always returns null, so I do not ever have an opportunity to invoke the release method that I am aware of. If my suspicions are correct, than I would likely be able to avoid this problem entirely by simply placing the JSF implementation jars in the conatiner's shared lib dir - instead of bundling it inside WEB-INF/lib. However, this is not an option for this container as multiple web apps (which require the flexibility to use differing JSF implementations and versions - i.e. RI vs MyFaces, etc) will run on this container.
    I don't believe it is at all related to the problem at hand, but my container is JBoss 4.0.2.
    Any and all assistance and suggestion will be greatly appreciated! Has anyone else seen this sort of behavior? Are there any work arounds or corrective actions?
    TIA

    Has anyone else run into this? I'd greatly appreciate any assistance as I cannot seem to resolve this hot-deploy related leak.

  • Procedure for hot deploying EJBs using  Jdeveloper and OC4J comtainer

    i am using JDeveloper , please any one help me out in hot deploying EJBs. what is the procedure if i want to hot deploy EJBS

    1) You have to start OC4J with higher Java heap size e.g. java -Xms100m -Xmx150m -jar oc4j.jar
    2) The RMI port by default used is 23791 and configurable by modifying config/rmi.xml.
    regards
    Debu

  • Hot deployment in WL 8.1

    Hi All,
    I am deploying the application from my development dir "c:\development" as
    exploded for WAR file and EJB modules as JAR files. What should I do to make
    the hot deployment work?
    My environment is: Win XP, IDE is JBuilder(also use Eclipse3.0), Weblogic
    8.1
    When I was googling, it brought me the CLASS-LOADER article in bea docs and
    I applied that making different nested class-loaders for EJB, WAR in one and
    the EJB module which is under development in a separate class-loader. It did
    not work. But I think there should be an easy way for hot deployment. If
    there is any link that talks about this please let me know. Your response is
    appreciated.
    Thanks,
    senthil

    Also adding to that, the server is started in development mode.
    "Senthil" <[email protected]> wrote in message
    news:[email protected]...
    I am not sure this a way to go for hot deployment. But what I did was
    changing the application and weblogic-application.xml files.
    My application.xml is like
    ===========application.xml===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
    Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
    <display-name>AppName</display-name>
    <module>
    <web>
    <web-uri>Web</web-uri> <!--- No WAR --->
    <context-root>/</context-root>
    </web>
    </module>
    <module>
    <ejb>EJB1</ejb>
    </module>
    <module>
    <ejb>EJB2</ejb>
    </module>
    </application>
    =============END==========
    weblogic-application.xml is given below
    ==============weblogic-application.xml==========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-application PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
    Application 8.1.0//EN"
    "http://www.bea.com/servers/wls810/dtd/weblogic-application_2_0.dtd">
    <weblogic-application>
    <classloader-structure>
    <module-ref>
    <module-uri>EJB1.jar</module-uri>
    </module-ref>
    <classloader-structure>
    <module-ref>
    <module-uri>EJB2.jar</module-uri>
    </module-ref>
    </classloader-structure>
    </classloader-structure>
    </weblogic-application>
    =========End===========
    Thanks,
    senthil
    "Senthil" <[email protected]> wrote in message
    news:[email protected]...
    Hi All,
    I am deploying the application from my development dir
    "c:\development"
    as
    exploded for WAR file and EJB modules as JAR files. What should I do tomake
    the hot deployment work?
    My environment is: Win XP, IDE is JBuilder(also use Eclipse3.0),
    Weblogic
    8.1
    When I was googling, it brought me the CLASS-LOADER article in bea docsand
    I applied that making different nested class-loaders for EJB, WAR in oneand
    the EJB module which is under development in a separate class-loader. Itdid
    not work. But I think there should be an easy way for hot deployment. If
    there is any link that talks about this please let me know. Your
    response
    is
    appreciated.
    Thanks,
    senthil

  • Obaccess.dll causes link error on hot deploy

    I'm doing web services development with AccessServerSDK 10G, Glassfish v3, on windows XP using Eclipse. It works fine except whenever I change my code and eclipse attempts to hot deploy the application, the following error occurs and the deploy bombs:
    "org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.UnsatisfiedLinkError: Native Library C:\NetPoint\AccessServerSDK\oblix\lib\obaccess.dll already loaded in another classloader"
    It seems that the obaccess.dll reloads without checking whether if it is already loaded. The only way to redeploy the application is to shutdown Glassfish and restart it for every change I make. It's impeding my progress.
    So far I've tried the following:
    --removing jobaccess.jar from inside my application and putting it into Glassfish_HOME/domain/domain1/lib; it didn't help.
    --put an ObConfig.shutdown before the ObConfig.initialize; it didn't help.
    --catching the exception and ignoring it, but then the application gets a null pointer exception when it runs.
    I can't find anyone else in cyberspace complaining about this problem. I hope it isn't an issue with Windows because we do all our development on our desktops, but I wouldn't be surprised.
    Anyone else having this problem or found a fix for it?

    Hi,
    I already faced with this problem on WLS11gR3 (10.3.4) and I try with all your workaround.
    The solution I found was to install on separate server chain in order to reboot the server instead of use Hot Deploy.
    We have also think to migrate the application to J2SE.
    It seam that it is not possible to remove Jni 'till jvm is up and running.
    Wile summer have you found any solution?

Maybe you are looking for

  • Unstable Mail post Mavericks upgrade:

    After upgrade to Mavericks (v10.9.1) Mail (v7.1) on my iMac has become unstable, freezing at the drop of a hat, requiring frequent forced quit to wrestle back control. Tried to instal the available Mail Update for Mavericks, promising increased stabi

  • Events have me stumped

    I'm a flex noob and have been stuck on this one problem for hours and still haven't found a solution - any suggestions? My application includes a custom component (canvas container with 10 comboboxes). I populate each of the comboboxes with data I co

  • Clean dispose a thread

    Hi, I am trying to cleanly dispose from a thread after it's completed it's execution. However I see the activeCount in ThreadGroup increase with each new request. i,e the old threads are not being disposed after it's completetion. I am using JDK1.3 o

  • Help! _ i bought a IPT on store on line but i didn't recive it!

    sAD! i order it on 14/1 [fri] and it said will 'Delivers: 18/01/2011 ' i wait the hole day but no one did the delivery......

  • Dell Inspiron 8600 will not connect to wireless airport/time capsule

    I have recently made the switch to Mac. I purchased a IMAC...love it!! Yesterday UPS dropped off my time capsule. I had no problem setting up. However when I tried to use my Dell Inspiron 8600 on the wireless...I can't log on even though the networks