Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] File locking on web.xml



When you say "file lock", are you referrring to an Object monitor or an Operating System related lock? If the problem was of the former kind, then you may want to verify if your problem still exists on 07/21+ builds.


-------------------------------------------------------------------------
Kind Regards,

Michael D. Elder
Rational Studio / Services Tools Development    
IBM RTP Lab
(919) 543-8356 T/L:  441-8356
mdelder@xxxxxxxxxx

http://scribbledideas.blogspot.com/  | http://blogs.tap.ibm.com/weblogs/page/mdelder@xxxxxxxxxx | http://planetradical.raleigh.ibm.com/

"Developers are like artists; they produce their best work if they have the freedom to do so, but they need good tools." -- Werner Vogels



Cameron Bateman <cameron.bateman@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

07/24/2006 02:38 PM

Please respond to
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

To
"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
cc
Subject
Re: [wtp-dev] File locking on web.xml





Thanks Rob,  is there a preferred way to disable validation
programmatically in a test case?

--Cam

Rob Frost wrote:

>Yes, I hit that same issue in some unit tests I was writing last week; I
>disabled validation to workaround the issue; I still need to track down
>the specific validator and file a bug...
>
>-Rob
>
>-----Original Message-----
>From: wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx]
>On Behalf Of Cameron Bateman
>Sent: Monday, July 24, 2006 1:14 PM
>To: Wtp-dev
>Subject: [wtp-dev] File locking on web.xml
>
>
>Greetings,
>
>I am running into a problem while trying to construct a dynamic web
>project for use in my JUnit testing.  The issue appears to be a file
>lock on the web.xml file.  Using code I've found in other JUnit tests, I
>
>am attempting to construct my test dynamic web project as follows:
>
>            IDataModel dataModel = DataModelFactory.createDataModel(new
>WebFacetProjectCreationDataModelProvider());
>            
>dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PRO
>JECT_NAME,
>projectName);
>            dataModel.getDefaultOperation().execute(new
>NullProgressMonitor(), null);
>
>This works fine inasmuch as everything appears to be created correctly
>and I am able to run tests in this project.  However, I am running this
>code from my setUp() method.  When I have multiple tests in the same
>suite, the project is deleted and recreated on each test.  But I get an
>error on the workspace delete of the project which appears to be caused
>by the web.xml being locked after the above call.   This creates
>problems in each subsequent test because the web root cannot be
>correctly reconstructed (unless I change the name of the project or some
>
>other workaround).
>
>There appears to possibly be a threading issue here, since if I wait
>long enough while tracing in the debugger, the lock eventually goes
>away.  Has anyone encountered this or does anyone have ideas as to how
>to resolve or workaround this problem?  Obviously changing the name the
>project on each iteration is a possible workaround.
>
>
>Regards,
>
>Cameron
>_______________________________________________
>wtp-dev mailing list
>wtp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/wtp-dev
>_______________________________________________________________________
>Notice:  This email message, together with any attachments, may contain
>information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
>entities,  that may be confidential,  proprietary,  copyrighted  and/or
>legally privileged, and is intended solely for the use of the individual
>or entity named in this message. If you are not the intended recipient,
>and have received this message in error, please immediately return this
>by email and then delete it.
>_______________________________________________
>wtp-dev mailing list
>wtp-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/wtp-dev
>  
>

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top