Архив рассылки Lotus Notes/Domino. От пользователя до админа | Не показываются картинки? |
Компания ПУЛ - разработка приложений на Lotus Notes/Domino CodeStore. Коды Примеры Шаблоны1. Extreme Stress Testing a Domino Server | BlogEarlier this year I talked about OutOfMemory Java Exceptions I was experiencing. Now I find myself back in the position of writing Java Agents that could potentially leak memory and I'm still really non-the-wiser as to whether I'm clearing up after myself properly in my code. The code I've written generates PDFs and both emails them and attaches to document. There are OutputStream, InputStreams, ByteArrays, Streams, MimeEntities not to mention all the Domino objects being used. I've done my best to close, flush and recycle everything. But I'm still paranoid. I don't want to be responsible for killing no server. Stressing OutSo, I've been stress testing the server. Big time. To do this I added a Page in the database and threw together the tool you see below, which lets me tell it which URL to stress test and when I press " Go" it makes a request for that URL once every second until I tell it to stop. The output you see in the textarea is the JSON I got the Agent to return. The Agent does it's usual business of creating the PDF and storing in a document. It then returns some information about the JVM's memory usage. To do this the Agent ends with this code: out.println("Content-Type: text/plain"); out.println(""); out.println("{\"memory\":"+ "{\"total\":"+Long.toString(Runtime.getRuntime().totalMemory())+ ",\"free\":"+Long.toString(Runtime.getRuntime().freeMemory())+"}}"); I then left the Ajax code running and calling the code once a second. Overnight! By the morning it had made 45,000 calls. Total Memory had fallen from 30.8MB to 18.4MB. The "free" memory had fallen from a range of between 19mb to 400kb to a range of between 4.5mb to 500kb!! I then left it running overnight again the next night (with no server respite or restarts). The next day the total memory had risen back to 25MB! Odd, huh? So, although it looks like the total amount of memory available to the JVM fell overnight the first night, the server managed to regain some of it the next night. The server is a fairly low-spec VM with 1GB of RAM running on Windows 2003. I've been keeping an eye on the amount of memory the nhttp process is using up and it seems fairly consistent and not about to pop. Heading For a FallIs what I'm seeing typical and expected? Or does the gradual fall in total amount of memory the JVM has mean that, at some point, it's going to break? Anybody interested in this "tool". I'm not sure whether to make it more configurable and add charts etc. There are lots of powerful web server stress testing software out there, but they're all overkill for what I wanted. 2. Quick Domino Tip: Dual-Purpose Agents | BlogWhen developing I always try to use as few design elements as possible. It's a thing of mine, although surely not uncommon? Last week I needed to do some server-side validation. First I wanted to validate in "real time" using Ajax to give the user feedback as they filled out the form and then, second, I wanted to validate again when the form was submitted (you should always validate on save). I did something I'd never done before and which saved adding two new elements to do the same job; I used an Agent that works out whether it's being called directly via a URL call or whether it's being ran as part of the form's WQS event. Here's HowIt works in Java or LotusScript, but here's the concept as seen in Java: import java.io.PrintWriter; import lotus.domino.*; public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); Document docContext = agentContext.getDocumentContext(); PrintWriter out = getAgentOutput(); //Run code common to both agent calls here. if (docContext.getItemValueString("Query_String").toLowerCase().indexOf("openagent")==0){ //Run code specific to Ajax calls (and return some JSON) out.println("content-type: text/plain"); out.println("{\"valid\":true}"); } else { //Run code only needed for WQS docContext.replaceItemValue("Valid", "1"); } } catch(Exception e) { e.printStackTrace(); } } } As you can see it works out if it's an Ajax call or not based on the Query String. Yes, even agents ran directly via the URL have a document context! As it's a WQS agent it needs to be set to run on no documents and from the agent list. You can have your Ajax call the agent directly using the bracketed notation like this: http://www.codestore.net/user.nsf/(ValidateCellNumber)?OpenAgent You can also run the same agent in the Form's WQS: One less Agent to maintain! At some point I'll include this trick in a working Cell Phone Validator demo I plan on building in to Dext. GotchaIt's not perfect, as it relies on the agent being called with it's full formal URL of ?OpenAgent and not just a simple ?Open. But hey, that's a trade-off I'm willing to make. The Lotus Sandbox was closed to all new submissions in 2007. Downloads of previous submissions were still available as an archived resource following that closure, but effective September 2010, downloads from the Lotus Sandbox are no longer available. If you need to contact us regarding the removal of the Lotus Sandbox, please use our feedback form. Resources for samples and templatesIf you are looking for samples and templates for use with Lotus products, please use these resources:
Форумы о Lotus Notes/Domino:
Интенет эфир о Lotus Notes. Блоги и форумы1. Надежный документооборот с обновленным Антивирусом Касперского 8.0 для Lotus ...Лаборатория Касперского» сообщает о выпуске обновленного Антивируса Касперского 8.0 для Lotus Domino – корпоративного решения, предназначенного для пользователей платформы для совместной работы IBM Lotus Domino.2. lotus notes android android-app-sonys.ru/2835article.htmlotus notes android android-app-sonys.ru/2835article.htm3. Трухина Марина ЕгоровнаIBM Lotus Notes4. lotus notes traveler android скачать androids-apps-sony.ru/23249-kategori...lotus notes traveler android скачать androids-apps-sony.ru/23249-kategori...5. PST NSF инструмент преобразования может конвертировать несколько PST и защищенныхPST NSF инструмент преобразования может конвертировать несколько PST и защищенных паролем файлов PST.Пароль должен быть известен заранее, чтобы быть преобразованы эффективно.Инструмент преобразует бирже почтовых ящиков и профилей пользователей в среде Lotus Notes.6. JavaScriptでXPagesのロジ ... を例にLotus Notes/Dominoのデー ... を実装。Javaクラスの呼び出しも ow.ly/1lSFJTサーバサイドJavaScriptでXPagesのロジック実装 - ショッピングカートアプリを例にLotus Notes/Dominoのデータ処理やイベント処理を実装。Javaクラスの呼び出しも ow.ly/1lSFJT7. Выпуск рассылки "Lotus Notes/Domino -- продукт и инструмент. Выпуск: 568" от 06 ...Вышел новый выпуск рассылки "Lotus Notes/Domino -- продукт и инструмент.8. aggent_ru @nnikiforov в серьезной корпоративной среде использовали lotus domino.aggent_ru @nnikiforov в серьезной корпоративной среде использовали lotus domino. Теперь, надеюсь иные решения. Аутлук это наследие прошлого9. Я думал что самый уродливый интерфейс у программы Lotus Notes, однако жизнь вноситЯ думал что самый уродливый интерфейс у программы Lotus Notes, однако жизнь вносит свои коррективы.10. Работы всякие нужны, работы всякие важны!Надо срочно переучиться на разработчика PHP (PHP developer) или на программиста Lotus Notes, а можно еще стать программистом c++ (c++ developer), неплохо было бы быть и администратором системы галактика, у Java программиста также отличная запрлата...11. Марусич Василий АрсениевичIBM Lotus Notes12. Обнаружил в окне About для клиента IBM Lotus Notes упоминание о Linux Torvalds, какОбнаружил в окне About для клиента IBM Lotus Notes упоминание о Linux Torvalds, как владельца торговой марки Linux… juick.com/200876513. lotus notes traveler android скачать android-app-samsung.ru/story-36880.ht...lotus notes traveler android скачать android-app-samsung.ru/story-36880.ht... Блиц-опрос Закладки о Lotus Notes1. Notes/Domino 6 and 7 Forum : Date\All (Threaded)2. Home - IBM Lotus and WebSphere Portal Business Solutions Catalog3. Troubleshooting agents in Notes/Domino 5 and 64. 7 Things IT Managers Should Know About Lotus Notes - CIO.com - Business Technology Leadership5. Lotus Domino Designer wiki6. Notes/Domino 8 Forum - Date (threaded)7. developerWorks Lotus : Lotus Notes and Domino 8 technical content8. IBM Lotus Domino and Notes Information Center9. IBM Redbooks | Building Composite Applications10. Tips\LotusScript11. Mail Merge Mass Mailings in IBM Lotus Notes Domino with Zephyr | dominoGuru.com12. HOWTO: Install & setup Lotus Notes for Linux - Ubuntu Forums13. HOWTO: Install & setup Lotus Notes for Linux - Ubuntu Forums14. IBM Lotus Notes Hints, Tips, and Tricks - This blog helps users learn how to Lotus Notes. Whether you are a brand new to the product, or have been using Notes for a decade, I think you'll find the information presented here useful.15. ow.ly16. zite.to17. Lotus Notes | Archiving FAQ18. Lotus Notes and Domino wiki: Lotus Notes Traveler: Lotus Notes Traveler 8.5.3.319. bit.ly20. alanghamilton.com21. alanghamilton.com22. alanghamilton.com23. alanghamilton.com24. zite.to25. wp.meИсточники знаний. Сайты с книгами
В избранное о Lotus Notes/Domino | В подготовке выпуска использовались материалы и знания | |
|
|
Архив рассылки | RSS версия | Настройки | Отписаться: На сайте / По почте
Комментариев нет:
Отправить комментарий