facebook

sync-on-demand problems

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #268662 Reply

    kfreeman
    Member

    (I’ve read many other sync-on-demand posts and didn’t find one that matched this problem)

    I have 2 projects, one an EJB project and the other a web project with a jsp (which has the ejb project listed as a dependent project in its java build path). I have Build Automatically checked for both projects, and they are deployed (exploded) in the JBoss server connector (which is Enabled).

    When I make changes to the jsp, the changes appear immediately when I refresh my web browser. So far so good.

    But, when I make changes to a bean in the ejb (e.g. change a hard-coded string that is returned through the remote i/f), there is no evidence of the change when I refresh the web page (and no messages show up in the JBoss server log). The timestamp on the corresponding class file in the jboss deployment directory IS updated each time I save a change (so I know it’s getting re-deployed, e.g. if I stop and restart the JBoss server the change is visible on the web page).

    I tried manually redeploying both projects. No log messages appear in the JBoss console when I redeploy the ejb (wierd?), but I get the undeploy and redeploy logs when redeploying the web/jsp project. But then it still appears to be using the old ejb.

    Am I stuck with stopping and restarting JBoss for each ejb change?

    I’m using JBoss 4.0.5 on WinXP and MyEclipse 5.1.1GA.

    #268710 Reply

    Riyad Kalla
    Member

    I would double check if JBoss has a management interface like Tomcat or Sun App Server has, and use that to quickly restart your context OR set the context in development mode where it will reload every time it detects a change.

    This behavior is really app-server specific, so it’s hard to say how to get it “paying attention”.

    #268748 Reply

    kfreeman
    Member

    Well, I did some digging and discovered that JBoss is supposed to “pay attention” when the timestamp on the exploded directory changes. This doesn’t happen when the .class is updated, but one source (EJB 3.0 book by Burke, page 531) recommends touching the directory to get JBoss to notice changes. I tried this several times to no avail.

    Any JBoss experts out there know why this doesn’t work?

    As a work-around, I discovered that deploying the EJB packaged allows me to manually re-deploy it after changes which does make JBoss notice the change. Surprisingly, I have to also redeploy web projects that reference the EJB or else I get a class cast exception.

    #268757 Reply

    Riyad Kalla
    Member

    Try touching the deployment descriptors… see if that wakes it up.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: sync-on-demand problems

You must be logged in to post in the forum log in