Generic Java Agent Registry 40
I’m writing a Java Agent for the first time. Why? I’m interested in using this tool called ConTest from IBM. It was originally written during JDK 1.3 days and now it requires JDK 1.4. It instruments class files looking for code that uses concurrent constructs such as synchronized blocks and inserts code to monitor and play that code back in ways that will more likely expose concurrent problems.
What’s the problem?
It was written in the days when we would use a pre-processing stage to instrument code and then execute tests. This is fine if I wanted to work at the command line and use ant/maven to build. However, I want to work in an IDE that makes running unit tests easy (Eclipse, though they all do it now). But if I have to remember to instrument my classes before running my tests, that leads to human error. I don’t want that, I want to just run my unit tests and have my classes dynamically instrumented. (This is not speculation, this comes from working in a group consisting of multiple teams, all of which were using some Aspects written using AspectJ and running unit tests in Eclipse – when we introduced dynamic instrumentation – pre JDK 1.5 and even working in WebSphere 5.x), it improved productivity.
What about a plug-in? Sure, there’s one for Eclipse but I’ve not been able to download it. It probably works fine – after a class is compiled, it gets instrumented – but if I’m able to write a simple Java Agent, I can create a JVM configuration with a few parameters and every time I run my tests, viola, dynamic instrumentation with only a little one-time environment configuration. Also, I don’t have to worry about waiting for a plug-in update to continue using the tool.
Will my tests run slower? Probably, but until I know how much slower, I’m willing to risk it. (I’ve used dynamic instrumentation when running over 1,000 tests on a workspace with > 1 Million lines of code, it was fine.) If it’s an issue, I can imagine using a combination of annotations and the Java agent. Something like:
@TestInstrument
public class SomeClassThatUsesThreading {}
This would allow the Java Agent to only instrument some classes, rather than all classes. This could cause problems if I forget the annotation, but it’s an option if speed is an issue.
I would not do that unless it was necessary. First, most of my tests would be testing code that is not thread-related. Those tests would not require instrumentation. The tests that require instrumentation, would be somewhere else, and I’d run them with a different frequency; I’d run them longer, with more configurations and iterations, to increase my chances of finding threading-related issues.
There’s another option. Copy what ConTest is already doing using AOP. I tried, and I cannot select the correct point-cuts using traditional point-cut syntax – try selecting synchronized blocks and then every line within the block, that’s not a typical point-cut usage scenario. I considered a combination of hand instrumentation and AOP – it’ll work but it makes the code ugly. I even considered using asm or cglib directly and at that point I knew it was more time than I wanted to spend when the developers of ConTest have years of experience instrumenting classes.
Anyway, I’m hoping the team working on this tool will publish an API soon so I can give that a try. They mentioned they would at some point.
If you want more information on writing a Java Agent (and the class that actually registeres it), have a look at Brett’s Java Agent Notes.
hi,im going to create an application in jade with using Netbeans ,so i need to know how to registre an agent in the DF i can’t find the configurtion to make it ,thank you ,hope to answer me in my e-mail : or abde’ , bey.
hi,im going to create an application in jade with using Netbeans ,so i need to know how to registre an agent in the DF i can’t find the configurtion to make it ,thank you ,hope to answer me in my e-mail : or , bey.
Welcome to Freshstyleshop, the hottest urban clothing site on the net! We offer great products from Gucci sneakers, prada sneakers, LV shoes, True Religion Jeans and many more! Our selection of products are always increasing for the fact that we have new items added weekly to our selection. All products on our site are already marked down 40-60% off retail price. Freshstyleshop also backs all its orders with a 110% satisfaction guarantee, making sure that our customers are left satisfied with the hottest products on the net.
Fitri Sartika
Ok that’s right, I guess that is the only way they could have implemented generics, as Sun always wants to be backwards compatibility. They face the same problems with closures. If only they put in right from the beginning. Regim Hotelier Bucuresti
I can create a JVM configuration with a few parameters and every time I run my tests, viola, dynamic instrumentation with only a little one-time environment configuration. Also, I don’t have to worry about waiting for a plug-in update to continue using the tool.
left satisfied with the hottest products on the net.
on’t belittle or humiliate people who didn’t have the chance to learn how to write good code.
All ways a pleasure to read.
very similar. Sleepless & sprang around from the Etsy boards which usually don’t pick up myself tonight… Spend a while stalking about the community forums & perusing products for sale & lately offered.
Java Agent Registry, yes, that’s it. we should learn more about it.
Great share. I have a question, Could you share more information about white iphone 4?
http://blog.objectmentor.com/articles/2007/12/29/generic-java-agent-registry
would say that i love this website its blog is very interesting
Nice article to read. Thanks for sharing this to us.
glad to see you!
glad
Keep your Contacts and SMS safe! Actually, the contacts and SMS have more values than a cell phone’s own value. You can pay money to buy a new iPhone, but cannot buy your lost contacts and SMS back. So it’s important for you to backup your contacts and SMS in iPhone. And we recommend you backup contacts and SMS regularly. Our backup software can help you take a snapshot for your contacts and SMS. Your important personal information will be never lost.
We are the professional jacket manufacturer, jacket supplier, jacket factory, welcome you to custom jacket.
good article …
internette görüntülü olarak okey oyunu oyna, gerçek kisilerle tanis, turnuva heyecanini yasa.
Thank you so much!!!!
The article has been finished. Read more:christian louboutin patent leather pumps
I found that his foot odors never bring us to death.I never regret buying these beats by dr dre studio for him.
Hello Friend,Whichever style of Fashion Shoes you’re looking for, classical, fashionable, lovely or the latest design, you can find your favorite designer shoes in www.dunkpage.com ,several days ago I bought one pair of shoes from there,It’s beautiful and very comfortable!
Jurassic Jurassic age have a human or not human era dinosaur extinction? beats by dre sale cheap beats by dre 1 chase crush. Me: “please be my girlfriend?” She: “I think we better be friends.” Over 30 seconds, I asked: “My girlfriend will you do?”
great man…I have already bookmarked your this page..
Wow,you have a quite exceptional view.I really wonder how you can do that.So marvelous
thank you for your information..
Blog posts about wedding and bridal are always rare to find , at least with great quality,you qualify for a great blog post writer title,kep the great job happening
I had really very happy for the amazing technology is visible in this blog and the nice services in this blog. Program Coordinator Job Description|Hospital Administrator Job Description|Cook Job Description|Registered Nurse Job Description
The higher the general average of intelligence, all things else being equal, the less the disposition to be meddlesome, critical, and overbearing.
When it comes to feather dress, what appears in your mind? Which kind brand of down jacket do you like prefer? Though there are many down jackets for you to choose from, on the word, which one you really enjoy? I want to say that canada goose coats is really your best choice. I believe you can’t agree with me any more. When you take the quality into consideration, you will find that it is superior to any other kind of coat. Besides, discount canada goose jackets is a world well-known brand, which has gained high reputation in the world, which has accepted by our customers and some organization. Because of its high quality, some of our loyal customers have promoted it to the people around them. In their opinion, it is good to informing others to know it. Recently, Canada Goose Trillium Parka is on hot sale. What I have to inform you is that all the products there are made by hand, so they are elaborative and elegant enough. It is really beautiful once you dress in. So, if you are a lovely girl or woman, go to the store to buy one for you. You will appreciate it that you have such a coat.In addition, they also have any other products like canada goose Gloves and canada goose jacket supplier.Hope your will like its!
Peep toe shoes used to be popular, now it regress popular again. Too heavy and dramatic square toe shoes may be nightmare for many people, but open a mouth in front, the effect will be greatly different. For women, it is a very good transition. It is very trendy, but unlike pointed toe shoe so eye-catching. In this year, a pair of delicate Christian Louboutin Peep Toe Pumps will be a good choice.
Christian Louboutin Madame Butterfly 150 Suede Pumps Red
Technical details of Christian Louboutin Madame Butterfly 150 Suede Pump Red:
Fashion, delicate, luxurious Christian louboutins shoes on sale, one of its series is Christian Louboutin Peep Toe Pumps, is urbanism collocation. This Christian louboutins shoes design makes people new and refreshing. Red soles shoes is personality, your charm will be wonderful performance.
this was a really quality post.I wasn’t aware of the many ripples and depth to this story until I surfed here through Google! Great job.
He could not express tall ugg boots what he felt, and to himself he likened himself to a sailor, in a strange ship, on a dark night, groping about in the unfamiliar running rigging. lonny http://www.womensnowbootsfactory.com/
Generic Java Agent Registry 35 hoo,good article!!I like the post!58
Generic Java Agent Registry 36 good post134
Ugg boots have been made in Australia for over Christian Louboutin daffodile 200 years, and they are starting to take the Christian Louboutin Ron Ron USA by storm. They might fit their name, they Christian Louboutin bow pump are UGLY, but boy are they ever comfortable and Christian Louboutin for sale they wear really well. The only way to really find out is to actually put a pair on.
Daddy diaper bags for your baby’s needs?
With more than 20 years of experience, Intertech provides an extensive integrated operational ability from design to production of molds 100% made in Taiwan. Additional to our own mold making factory, we also cooperate with our team vendors to form a very strong working force in Taiwan.
For the overseas market, we work very closely with local representatives in order to take care of the technical communication and after-sales service to our customers. We also participate in the EUROMOLD & FAKUMA exhibitions and meet our customers every year in Europe. By concentrating on mold “niche markets”, we play a very useful mold maker role from the Far East whenever customers want to develop their new projects. We provide services from A to Z to our customers on a very economic cost and effect basis.