5 Replies Latest reply on Aug 15, 2008 5:03 PM by luxspes

    Hot deploy (curiously behavior)

    mvlach

      Hi all, I have problem with Seam hot deploying.


      I have created project throught seam-gen and the hot deploy dont't works correctly. When I change the class (for example the return value) the hot deploy sometimes works, sometimes dont't works. I have suspicion of some time interval.


      I don't know, where is problem. I am using Eclipse, JBoss 4.2.2 (now 4.2.3) and seam 2.0.3.CR1.


      Thanks for reply.



      Btw: know some body how set Seam to reload security.drl ??


      M.


        • 1. Re: Hot deploy (curiously behavior)
          charliepower76

          Are you trying to modify a Javabean or an entity bean ? Hot deploy only works for Javabeans, it doesn't for EJBs and Entitys.

          • 2. Re: Hot deploy (curiously behavior)
            mvlach

            Hi, I am modifying only PoJo. But the problem is, that sometime the redeploy works (for the same class) and sometime not.


            I edit this class:

            @Name("accountHome")
            @Scope(ScopeType.CONVERSATION)
            @Restrict(value = "#{identity.loggedIn}")
            public class AccountHome extends EntityHome<Account> {


            ....


            M.

            • 3. Re: Hot deploy (curiously behavior)
              charliepower76

              Strange indeed, hot deploy works well for me...


              - Did you create your project manually or with seam-gen (or JBoss Tools) ?
              - Does this behavior affect only one of your classes or many of them ?
              - If you re-create your projects, does it help ?

              • 4. Re: Hot deploy (curiously behavior)
                mvlach

                Created by seam-gen.


                Lets imagine:


                I have this code:



                     @Override
                     protected Chat createInstance() {
                          Chat ch = new Chat();
                          log.info("ticketId: #0", ticketId);
                          
                          ch.setTicket(em.find(Ticket.class, ticketId));
                          log.info("injecting the ticket 222...#0", ch.getTicket());
                          return ch;
                     }





                when I change the text in log.info (remove the 222) and save, the eclipse automaticaly build the project.


                Now, when I click on the refresh button, I get this message:


                value of context variable is not an instance of the component bound to the context variable: ticketViewHome


                In log I can see:

                15:23:32,121 INFO  [Initialization] redeploying
                15:23:32,350 INFO  [Initialization] Installing components...


                Sometimes, the redeploy doesn't run - no information in log.


                The previous error (tivketViewHome) should be caused by conversation.


                Thanks.


                Mila

                • 5. Re: Hot deploy (curiously behavior)

                  That also happens to me, I don't know why. I have been unable to consistently reproduce it, that is why I haven't issued a JIRA on it. (I am also not sure if it is a JBoss Adapter issue, or a more general WTP issue).


                  Mmm, perhaps I should issue a feature request asking for a history log window for hot deploys (one that would show the history of which files where hot deployed since the last cold deploy, and that could allow me to verify a particular hot deploy by comparing the files it should have copied to whatever is on the server.