facebook

3.1 Sync-On-Demand seems not to work correctly for JSF

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

    Frank Weber
    Member

    We frequently had to redeploy our exploded WAR to get the JSF/JSP pages
    displayed correctly. Is this perhaps a bug or is there any particular preference settings I need to watch out for?

    We work under 3.1 BETA on Linux and deploy to JBoss4 .. .

    Regards,

    Frank

    #227738 Reply

    Riyad Kalla
    Member

    What M-build of Eclipse? What version of MyEclipse

    Also if you are using an exploded deployment, your changes are immediately deployed the second you save the page (assuming you have Project > Automatically build turned on). So no need to keep deploying.

    This is most likely a caching issue with your app server, try and use an exploded deployment and see if it suddenly works.

    #227873 Reply

    Frank Weber
    Member

    sorry for not providing these details right awary :
    myeclipse_030804_3.1Beta
    eclipse-SDK-3.1M4-linux-gtk.zip

    We deploy exploded archives to jboss-4.0.1sp1 and in some cases reloaded pages even are producing an error, which vanishes after we re-deploy the war.

    Thanks in advance,

    Frank

    #227886 Reply

    Riyad Kalla
    Member

    I’m confused, you mentioned an “exploded WAR” and then in the last post “redeploy our WAR”… if you are talking about a WAR file, then it is implicitly not exploded, exploded deployment is the only one that is hot syncable and is really a direct-copy of your WebRoot out to your app server (make sure there are no old stary WAR files hanging around in the deployment directory that could be usurping your exploded deployment).

    So yes, if you are deploying a WAR (packaged deployment) you will need to deploy it every time if you wish to see changed.

    Can you clarify your settings a bit more if this didn’t help?

    #227927 Reply

    Frank Weber
    Member

    Here the procedure – all with exploded archive:

    In the Manage Deployments dialog I added the deployment via exploded archive.

    I made changes to the JSF page.

    In some cases changes are not shown in the browser or even an error page is shown.

    When I press redeploy in the Manage Deployments dialog the same JSF page is shown correctly!

    I have verified: there is no old stary WAR files hanging around in the deployment directory.

    Regards,

    Frank

    #227933 Reply

    Riyad Kalla
    Member

    Very strange.

    Are you using EJBs, do you need to be using JBoss? I’d like you to try this with Tomcat 5 if possible.

    Ultimately what you can do is navigate to the deployed directory of the JSP page in your app server, switch back to Eclipse and change the page and hit save, switch back to the deployed location, is the timestamp on the file updated? If it is, then this is an issue with JBoss reloading the page. If there is no timestamp, than make sure you have Project > Automatic Build turned on, if it is then likely an error occured and we will need to know what it is, so you will need to check your log file: <workspace dir>\.metadata\.log

    #227949 Reply

    Frank Weber
    Member

    We have reproduced the problem with the JSFLoginDemo from the tutorials.

    First we added an outputtext ‘Hello World’ after the view tag to the userlogin page – OK.

    Then we wrapped it into a panelGroup – and Hello World was displayed twice.

    Then we wrapped both with an panelGrid – and Hello World was displayed all together three times.

    The time stamp is changed in the exploded archive!

    Please verify, the problem is the same for our other JSF applications. We don’t use EJBs currently. We will test it now with an exploded enterprise archive…

    Regards,

    Frank

    #227953 Reply

    Riyad Kalla
    Member

    Frank,
    This is a JSF caching issue, it doesn’t relate to MyEclipse. Like I mentioned, if the timestamp is changing, then the issue lies elsewhere.

    I can say that Sun’s RI of JSF has *many* bugs related to caching which have driven me crazy before. I suggest either using MyFaces or making sure you are using the most up to date versions of the RI libraries.

    PanelGrid is one of the worst components with caching problems, I have changed entire page layouts before and the JSF component cache won’t update using Sun’s RI unless I restart the server. It was infuriating.

    #228523 Reply

    I think the issue has to do with JSF component states. I recall reading somewhere that because of the JSF architecutre, changing a simple attribute, saving the source file, and hitting refresh in your browser will not show the changes.

    Someone correct me if I am wrong. I am trying to find out how other JSF developers handle this. If anyone has ideas, please email me: [email protected]

    #228527 Reply

    Riyad Kalla
    Member

    I’d like to know this as well as I do quite a bit of JSF development and this fact along really does wear my nerves thin by the end of the day.

    #230290 Reply

    Frank Weber
    Member

    Riyad,

    Any good news on this since we hit this topic? Did you do some tests with myfaces? I guess is it as bad as the the RI…

    As this issue is not likely to go away very soon I suggest to add a button in the tool bar to have the recent deployed app redeployed again. Maybe a short key would do as well. What do you think?

    BTW: Can I choose to redeploy only the and exploded JSF web app after I have deployed an exploded enterprise app?

    Thanks in advance !

    Frank

    #230291 Reply

    Riyad Kalla
    Member

    Frank,
    I’ve read over the spec for JSF 1.2 and it seems to improve some of this, it looks like a lot of big changes in the right direction (unified expression language for example) but won’t be out until year end IIRC (beta).

    Also there is currently no way to only deploy a portion of an enterprise app, I’m sorry.

    #230308 Reply

    Frank Weber
    Member

    Riyad,

    thanks for your feedback .. . Can you confirm that the same problem exist with myFaces?

    Is there any other way to speed up the redeploy process? … stepping through the deployment dialog is tedious ! 🙁

    Can you imagine an additional button in the toolbar or shortkey in the *near* future? I could select the project and press F9 and it gets redeployed.

    Something like this should be possible, or what does the MyEclipse team think?

    Frank

    #230332 Reply

    Riyad Kalla
    Member

    Frank,
    We’ve been so hesitant for so long to augment the current (inferior) app server controls and deployment tool bar functionality because a lot of this is going to change in our 5.0 release (looks like closer to EOY), but with things getting pushed out I will ask the team if it is possible reevaluate our current setup.

    The problem with adding a quick deploy button on the toolbar is that it will fail unless the app server is shut down, redeploy, then started back up (due to read locks on Windows). So this may not be as helpful as you would hope.

    Additionally, YES I have had that frustratingly annoying caching issue with MyFaces as well (it was the only reason I tried MyFaces over the Sun RI in the first place). I would really encourage you to subscribe to the myfaces mailing list and ask the other devs what they do.

    You *could* try and restart the web context each time and not the entire app server, you do this by keeping the Tomcat manager open in a browser window, and every time you hot deploy something (Save it) in MyEclipse, switch over to the browser window and click the “Reload” button next to the context you want to reload, sometimes that helps, but with some things a full server restart is needed.

    #230365 Reply

    Frank Weber
    Member

    Riyad,

    Thanks again for your feedback – written on a Sunday afternoon !!

    I am not sure whether I understand you correctly. Let me recall the steps I am referring to for the redeploy procedure (that we normally not need to walk through as Sync-On-Demand should handle this all for us nice – theoretically):
    1) Select the “Manage Deplyment” button in the toolbar
    2) Select project
    3) Select deployment
    4) Select redeploy

    So far this always worked for me to display the JSF pages correctly.
    If you select a project in the Package Explorer it is automatically selected.
    This *could* be set allways to the last redeployment, if no project is selected in the Package Explorer for example. If you have only one deployment defined anyway this *could* be selected by default. Thereby the workfow would be shortened to two clicks.
    If the given project has been redeployed before the redeploy button *could* be pre-selected by default.

    I could imagine a short / function key to bring up the ” Manage Deployment” Dialog and just press enter – Hey, I think I would love that !

    You were talking about the AS which needed to be shut down on Windows for such a quick deploy? I guess that does not matter for Linux …, correct me if I am wrong.

    I have a related problem in deploying web projects:
    https://www.genuitec.com/forums/topic/ejb3-deployment-on-jboss/#post-230309

    … hope that I get this somehow to work !

    Thanks in advance,

    Frank

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: 3.1 Sync-On-Demand seems not to work correctly for JSF

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