It's all about the answers!

Ask a question

Frustrated developer! Any tips/hints for faster development?


Anita Jey (1611315) | asked May 16 '12, 11:43 a.m.
I am a relatively new plugin developer, and there are some things that I observe when developing plugins that pushes me beyond frustration.
I am sharing them here, so you can tell if its just me, or if there are others in the same boat!

1. I am not able to rely on the OSGI dialog. If I type ss command once, I get a set of results, and if I type ss again, I get a different set of results. Even if I type ss <bundle>, I get different results (bundle status, bundle numbers) each time, like below. Diag <number> also results in different answers each time.
osgi> ss com.ibm.stst
Framework is launched.
id State Bundle
346 RESOLVED com.ibm.stst.cpk.common_1.0.0.201205161102
347 INSTALLED com.ibm.stst.cpk.service_1.0.0.201205161102

osgi> ss com.ibm.stst
Framework is launched.
id State Bundle
340 ACTIVE com.ibm.stst.cpk.common_1.0.0.201205161102
341 ACTIVE com.ibm.stst.cpk.service_1.0.0.201205161102

osgi> ss com.ibm.stst
Framework is launched.
id State Bundle
346 RESOLVED com.ibm.stst.cpk.common_1.0.0.201205161102
347 INSTALLED com.ibm.stst.cpk.service_1.0.0.201205161102

osgi> ss com.ibm.stst
Framework is launched.
id State Bundle
340 ACTIVE com.ibm.stst.cpk.common_1.0.0.201205161102
341 ACTIVE com.ibm.stst.cpk.service_1.0.0.201205161102


2. It takes me a loooong time (almost 20-30 mins) to install a new version of a plugin onto Tomcat. I delete the respective folders from under Tomcat/work each time (Is this needed?). I also invoke the jts/ccm url on a browser to speeden it up, and it does make a difference, but it is still very slow. Is there a quicker way to deploy a new plugin?

3. I am not able to rely on the logs generated. For eg: I get errors in the log, but they are not accurate and the bundle (with the "supposed problem") does become "Active" after some time.

Example:
2012-05-16 11:15:05,148 ERROR eam.repository.provision.internal.ProvisionService - CRJAZ0282I The feature "com.ibm.stst.cpk.feature_1.0.0.201205161102" is missing dependency feature "com.ibm.team.filesystem.server.rtc.feature".

This is not true, because it does have the com.ibm.team.filesystem.server.rtc.feature included in the feature.xml file, and the plugin works fine.

Why are these things happening? Is there anything I can do to avoid it??

Thanks much!!! :)
-AJ

4 answers



permanent link
sam detweiler (12.5k6195201) | answered May 16 '12, 11:52 a.m.
hm.. I don't see these kinds of issues..

is the eclipse and tomcat on the same system?

when I create my plugin deployment 'site', I make it point to the directory where the server will actually load the plugin.

then I created a small batch file which will force tomcat to rebuild the cache on server startup.

here is the batch file


del tomcat\work\Catalina\localhost\ccm\built-on.txt
@rem del tomcat\work\Catalina\localhost\jts\built-on.txt


then I shutdown the server, run the batch file,
do the build on the plugin site Site.xml,
then start the server back up.

the longest time is server startup.. about 3 minutes total.

I don't ever look at the OSGI console.

permanent link
Anita Jey (1611315) | answered May 16 '12, 4:36 p.m.
Hello Sam,

I have eclipse and Tomcat on the same system. But I do not share the development folders. I explicitly move the update-site contents to the Tomcat conf/.. folder (just because I feel more reassured that when a client does the same thing, it will work for them as well), and then I delete the work folder and start up Tomcat.

I tried deleting the built-on.txt file like how you do, and it did not work, because the server start up complained about not being able to delete the eclipse folders under work/ccm or work/jts... I had to delete the folders - which by itself is not a problem, as long as its a part of the process.

And today, I timed the time it takes for it to start-up, and I realize that it takes about 10 minutes on my 64bit newer laptop, but more than twice that on my older 32bit laptop :(

Thanks..!

permanent link
sam detweiler (12.5k6195201) | answered May 16 '12, 6:04 p.m.
hm.. my last post didn't get there..

I also copy paste on one plugin cause I created the wrong site project and didn't want to change it..

but not a problem, copy/paste with windows explorer..

I have an Intel I7-2600k @3.40ghz and 16gig of ram.. (windows 7 64bit)

I just timed the 3.0.1.1 tomcat server startup from click on the icon to logon to ccm available at 1min 25 seconds.. (having deleted the built-on. txt file in ccm) this server loads three of my custom plugins

Sam

permanent link
sam detweiler (12.5k6195201) | answered May 16 '12, 6:07 p.m.
...

I tried deleting the built-on.txt file like how you do, and it did not work, because the server start up complained about not being able to delete the eclipse folders under work/ccm or work/jts... I had to delete the folders - which by itself is not a problem, as long as its a part of the process.

...


that 'unable to delete' will happen if a windows explorer window is showing one of the directories in the tree when the delete is attempted..

sam

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.