java.blogs Recent Entries
added: Wed, 28th September 2005 | 507 views | 0x in favourites
feed url: http://www.javablogs.com/ViewDaysBlogs.jspa?view=rss
java.blogs Day's Entries
Latest feed entries:
Geertjan's Blog
In most cases, you don't need a separate class to define a
DataLoader and another separate class to define a
DataNode. So in 6.5, the
DataLoader is registered (by the New File Type wizard) in the layer, without being created as a Java class, while the
DataNode isn't created by the New File Type wizard either. I applied these principles to the old Book Multiview Sample, which is all I needed to do to updgrade it to 6.5—I deleted the
BookDataNode class and the
BookDataLoader class. Then I added the following to the layer, within Loaders/text/x-book:
<folder name="Factories">
<file name="BookDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/bookmultiview/Datasource.gif"/>
<attr name="dataObjectClass" stringvalue="org.netbeans.modules.bookmultiview.BookDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="text/x-book"/>
</file>
</folder>
Next, I rewrote BookDataObject.createNodeDelegate to the following, which is all that was needed in the first place anyway:
@Override
protected Node createNodeDelegate() {
return new DataNode(this, Children.LEAF);
}
And then I was done. Two less Java classes means two less classes to debug, test, maintain, etc.
Here's how the sample looks now, which will be used as the basis of a highly simplied tutorial on this topic, because several people I've met recently on NetBeans Platform Certified Training courses are very interested in synchronization between the two views in a multiview editor:
So, my plan is to strip this sample down to its absolute basics, so that only one field is left on the visual side, with one tag on the XML side, then add a Visual Library view, and show how the three can be synchronized. I believe this material would be very useful to several NetBeans Platform users out there.
Java Rumination
You've probably heard about how Terracotta DSO (Terracotta's flagship general purpose JVM-level clustering technology) can help you offload your database. You have a variety of choices depending on your implementation and your goals - This article tries to bring them all together in 1 place so you could more easily determine what Terracotta offering better suits your needs.
See the attached diagram for a decision matrix of sorts. The Green Lozenges lead you to products on terracotta.org that might best fit your stack.
In a nutshell: - At a high-level, the first step is to acknowlede the problem with the implementation.
- This problem will typically manifest itself as UNACCEPTABLE LATENCY associated with certain application transactions OR as DATABASE RESOURCES Being PEGGED (e.g. CPU running uncomfortably high, for the DBA/SysAdmin's comfort).
- Now, it follows that if the data the App is mutating is "close" to the application then that is much better from a latency perspective, than if the data has to be fetched off the network from your SGA/Disk that comprises your Oracle Database Instance. This data may rightfully live on the database but it will still greatly improve latency if all operations were done in memory against pre-fabricated Domain Model Objects. Enter CACHING. Now your application presumably runs on a cluster of JVMs - so just caching locally on a given JVM, would render the caches inconsistent amongst the JVMs, if these caches and or the Database are also receiving updates to the underlying data. Enter DISTRIBUTED CACHING - where all Read and Write access now occurs in Memory across all the cluster JVMs (and is kept in synch with the database - by "writing-through" or "writing-behind"). i.e. Decide if you just need Caching (e.g. read only data set), or you need Distributed Caching ( a data-set that is being modified by the application as well. A Distributed Cache for a read-only data-set only helps in reducing query load to the database by 1/N where N is the number of client-JVMs in the cluster).
- Once you've established that Distributed Caching is the solution - decide on whether changes need to be persisted to the Database, and if so, need to be written synchronously (write through) or asynchronously (write behind).
- Decide on whether the application can tolerate any incorrectness amongst threads on different JVMs reading/writing to the cache. Terracotta is really the only solution, in my opinion, if the application cannot tolerate ANY incoherent concurrent access, whilst still delivering scale/performance.
In summary:
A> There are several technologies that enable "DISTRIBUTED CACHES". So in that usage - yes, Terracotta is one of many such "distributed cache" products in the market - but Terracotta's Networked Attached Memory innovation and implementation offer some unique and powerful advantages: - Preservation of your Java Programming Model - you write natural Java - no new API to program to. You could thus cluster your own custom caches be they implemented as Hashmaps, Hastables, ConcurrentHashMaps, LinkedHashMaps etc.
- Correctness guarantees (as defined by the Java Memory Model) of access across the cluster of participating JVMs.
- Ready Made clustering solutions (Terracotta Integration Modules - TIMs) for popular OSS caches (e.g. EHcache etc.).
- Ready Made support for ORMs (Terracotta Integration Modules - TIMs): Hibernate (Detached-Mode, 2nd Level Cache); Ibatis etc.
- "Intelligent replication" to minimize Network Chatter and Network Replication payloads (byte code injection gurantees only mutated Object Fields are shipped to at least 1 other element in the network - the Terracotta Server (and more than 1 if other elements in the cluster reference that field)).
- Abilitity for the cache to exceed the size of HEAP on a given application JVM without the need for partitioning (assuming somewhat Gaussian access patterns across key-space).
- In depth Monitoring and Visibility via the Developer Console and the Terracotta Operations Center.
- L1 (component in client JVM), L2 (dedicated Terracotta JVM) design with persistence affords higher Level of HA - e.g. cache preserved even if all JVMs are lost. HA is in the box - in that no Shared Disk be provisioned.
- JMX Events and Hooks to respond programatically to cluster situations such as Client JVM failure or new Client JVM introduction.
- OSS Model of Distribution and many others.....
In addition,B> Evaluate if certain data sets in the database really needs to be persisted in the database or if the persistence afforded by Terracotta suffices. Typically - data should be in your RDBMS/System of Record - If it is long-lived and business-critical. See http://tech.puredanger.com/2008/08/01/thinking-about-data-lifetimes/
- If the Data need to be Reported on?
- If the Data need to be queried extensively along many diverse criteria - SQL is much more expressive than OQL or any such option? (e.g. if you have an entity X with 3 attributes and Y with 4 attributes where 1 attribute is common across them then you can query X alone in 3C1 + 3C2 + 3C3 = 7 ways and Y alone in 4C1 + 4C2 + 4C3 + 4C4 = 15 ways and X & Y together in multiple other ways).
In cases other than the ones mentioned above - there is a strong possibility that you could just work off memory, assuming some technology like Terracotta gave you HA for that chunk of memory. Advantages apart from DB Offload is the simpler code base - since one simply works off the Java Domain Model, where Terracotta delivers HA and correctness of access for those data structures, without the need to involve a Database and the marshalling/unmarshalling code to overcome the impedance mismatch between the object world and the relational world. This has been proven out on several occasions now - you can get more at http://www.terracotta.org/web/display/orgsite/Common+Use+PatternsSo hopefully after reading this, it is easier for you to determine which Terracotta offering best solves your data-base offload problem....
MALANGLIFE.Com
Malanglife.Com, SELASA - Realisasi Bantuan Langsung Tunai (BLT) hingga 27 November 2008 tercatat telah mencapai Rp12.279.264.000.000 atau 92,44 persen dari total dana peruntukan, demikian diungkapkan Adang Setiana, Deputi bidang Koordinasi Perlindungan Sosial dan Perumahan Rakyat.
Seperti dikutip dari siaran pers Kementerian Koordinator bidang Kesejahteraan Rakyat Republik Indonesia di Jakarta, Senin (1/12), untuk tahap I BLT sudah [...]
Related posts:
- Realisasi Buyback BUMN Rp 253 Miliar Delapan dari Sepuluh perusahaan Badan Usaha Milik Negara (BUMN) terbuka...
- Gempa Guncang Yogyakarta, Terasa Hingga Klaten YOGYAKARTA,MINGGU–Masyarakat Daerah Istimewa Yogyakarta dan sekitarnya dikejutkan oleh guncangan gempa...
- Rekap DPT Pemilu 2009 Ketua Komisi Pemilhan Umum (KPU) Abdul Hafidz Anshary, secara resmi...
MALANGLIFE.Com
BLITAR - Kedapatan menyimpan ganja kering yang hendak diperdagangkan, Mukozin Yuafik (16) pelajar salah satu SMP di Blitar, Jawa Timur dibekuk petugas. Warga Dusun Tumpuk Desa Purwokerto, Srengat, Blitar ini diringkus saat hendak melakukan transaksi cimeng seberat 12,8 gram.
Penangkapan berlangsung di Jalan Raya Desa Jatilengger Kecamatan Ponggok, Blitar. “Ketika ditangkap pelaku tidak bisa mengelak karena [...]
Related posts:
- Jual Gadis Rp 300 Ribu MALANG - Praktik penjualan manusia (trafficking) untuk dilacurkan di lokalisasi...
- Palsukan Identitas Petugas Haji, WNI Ditangkap MEKKAH - Seorang warga negara Indonesia (WNI) tertangkap basah menggunakan...
- Mabuk, Sembilan Preman Dicokok WAGIR- Perang dengan preman terus dilakukan Polres Malang. Sedikitnya sembilan...
MALANGLIFE.Com
JAKARTA - Penurunan harga Bahan Bakar Minyak (BBM) berdampak signifikan terhadap tingginya permintaan konsumen. Seperti terjadi di SPBU 31.13101, Jalan Pramuka, Jakarta Timur.
Menurut Manager SPBU Arif Budiman, peningkatan konsumen terjadi sejak pukul 06.00 WIB hingga pukul 12.00 WIB. Besarnya peningkatan mencapai 50 persen dari hari normal.
“Asumsi saya masyarakat sengaja menahan untuk tidak membeli dulu pada [...]
Related posts:
- SPBU Mulai Turunkan Harga Premium SENIN-Menyusul keputusan pemerintah pada 6 November lalu, Stasiun Pengisian Bahan...
- Gas untuk Kendaraan Turun Rp 500/Liter PT Pertamina akan menurunkan harga bahan bakar gas untuk kendaraan...
- 1 Desember, Harga Pertamax Bisa Turun Lagi JAKARTA, RABU — Lonjakan angka penjualan BBM nonsubsidi, Pertamax, sejak harga...
MALANGLIFE.Com
SIEGEN, SENIN - Akibat perilakunya yang aneh, seorang ibu dihukum pengadilan Jerman, Senin (1/12) selama delapan tahun dan enam bulan. Bagaimana tidak aneh, dua bayinya yang telah meninggal disimpan di dalam kulkas selama 20 tahun.
Monika Helbe (44) dituduh tanpa sengaja membunuh kedua anaknya itu yang lahir masing-masing tahun 1998 dan 2003 karena kelalaiannya. Ia mengakui [...]
Related posts:
- Tips Komunikasi dengan Bayi Saat Memberi ASI Tataplah mata bayi anda ketika memberinya ASI karena kontak mata...
- Bayi Pun Jadi Korban Serangan Mumbai ROMA, ITALIA, JUMAT - Perbuatan sekelompok orang biadab yang melakukan...
- Usia Tiga Bulan, Bayi Sudah Boleh Dipijat TAK cuma orang dewasa yang bisa merasakan manfaat terapi pijat....
MALANGLIFE.Com
LONDON, SENIN - Rekor dunia lari 100 meter yang diukir oleh Usain Bolt ternyata masih jauh dari batas maksimal kecepatan lari manusia.
Bolt mencatat waktu 9.69 detik di Olimpiade Beijing, Agustus lalu. Segera setelah Bolt mencatat rekor tersebut, seorang profesor biologi dari Universitas Stanford, Mark Denny membuat penelitian tentang berapa batas maksimum kecepatan lari manusia.
Denny kemudian [...]
Related posts:
- Motor Listrik Pertama di Dunia Motor bertenaga listrik pertama di dunia baru saja diluncurkan di...
- Latihan Fisik Tuntas Sudah MALANG – 16/11/08. Tuntas sudah rangkaian latihan berat bagi Suroso...
- Pembalap Motor Indonesia Tampil di Sirkuit Motegi Jepang JEPANG, SENIN – Balap motor Honda Asean Cup (HAC) 2008...
java.net Weblogs
I'm getting ready to fly back to Europe to assist and talk at the best conference I'm aware of...Devoxx 2008!
java.net Weblogs
Anticipating December's avalanche of news... also:
Java Today: Packaging Java code, JPA 2.0 Criteria API,
and Why is the web the default development platform?
Blogs: Gosling in Tokyo, reactions to Sun financial news,
and Josh previews JavaFX at Ørdev
java.net Poll: What languages other than Java do you use on a regular basis?
Spotlight: JavaOne 2009 CFP
Forum Posts: ME and motion, threading BufferStrategy, JavaFX tutorials,
and do Java users mostly turn off auto-update?
java.net Weblogs
I'm getting ready to fly back to Europe to assist and talk at the best conference I'm aware of...Devoxx 2008!
java.net Weblogs
Anticipating December's avalanche of news... also:
Java Today: Packaging Java code, JPA 2.0 Criteria API,
and Why is the web the default development platform?
Blogs: Gosling in Tokyo, reactions to Sun financial news,
and Josh previews JavaFX at Ørdev
java.net Poll: What languages other than Java do you use on a regular basis?
Spotlight: JavaOne 2009 CFP
Forum Posts: ME and motion, threading BufferStrategy, JavaFX tutorials,
and do Java users mostly turn off auto-update?
Pete Freitag's Blog - Java Category
Creating hosts file entries allows you to create DNS aliases which can be very handy for web development. If your on a Mac, you will notice that it has the /etc/hosts file just like other unix os's.
One problem I kept running into however was that OS X was caching my host entries. So if I added a line like this:
192.168.0.80 dev.example.com
And then I changed it to this:
127.0.0.1 dev.example.com
The dev.example.com host will still resolve to the old IP address.
Flushing the DNS Cache on Mac
If you are running Mac OSX Leopard (10.5) or greater, you use the dscacheutil command to flush the dns cache, eg:
dscacheutil -flushcache
If you are using an earlier version of Mac OSX, for example 10.4, then you need to use the lookupd command:
lookupd -flushcache
James Weaver’s JavaFX Blog
Want to get up to speed quickly on the JavaFX Script language? Weiqi Gao of Object Computing, Inc. (OCI) has written an excellent article that covers the concepts and language elements of JavaFX Script in a fast-paced but approachable manner. If you've followed this blog or read the first Apress JavaFX Script book, you'll recognize Weiqi as a leader in...
Nagasakti Weblogger
Kita akan mencoba menambahkan Custom Palette dari library. Kali ini kita akan mencoba menambahkan Komponen Swing dari Library JCalendar. Untuk library Swing yang lain caranya akan sama.
Langkah-langkahnya :
- Download dulu library JCalendar kalau belum punya.
- Daftarkan library JCalendar tersebut lewat Library Manager, bisa diakses lewat Tools -> Libraries. Beri nama "JCalendar" dan masukkan File jar yang telah di download sebelumnya.
[Baca Selengkapnya]
dzone.com: java
I’ve been building software for quite a few years now and as software programming techniques have advanced, so has the number of layers.
Every once in a while a technology comes along which changes the way we think. Of late I’ve been hearing a lot about how cloud computing will allow us to scale our applications out. I think OSGi can give us similar results at a micro level by removing the traditional boundaries and layers on which our java applications are currently built.
Javalobby - The heart of the Java developer community
Corendal Directory has been released on November 28th, 2008. This is the third major version of this web-based application written in Java.This open source application is typically used by help desk analysts and active directory administrators as part of their daily account and group management tasks.It is a good alternative to the Active Directory console for daily uses and can act as well as an...
MALANGLIFE.Com
Kelompok dukungan sebaya (KDS) Jepara Plus yang peduli pada HIV/AIDS di Kabupaten Jepara, Jawa Tengah, Senin, menyebarkan sekitar 1.000 kondom dan brosur mengenai penyakit yang menyerang kekebalan tubuh manusia ke masyarakat luas dalam peringatan Hari HIV/AIDS sedunia 1 Desember 2008.
Ketua KDS Jepara Plus, Faizin, di Jepara, Senin, mengatakan, aksi simpatik tersebut dilakukannya bekerja sama dengan [...]
Related posts:
- Minat Pakai Kondom Di Papua Tinggi JAYAPURA, KAMIS - Minat kaum laki-laki untuk menggunakan alat kontrasepsi...
- Enam Penderita HIV/AIDS di Garut Meninggal GARUT, RABU - Kepala Bidang Pemberantasan Penyakit Menular (P2M) Dinas...
- Ramaikan Hari Transgender Internasional MALANG - Gaung Hari Transgender Internasional diramaikan dengan aksi simpatik...
MALANGLIFE.Com
Ketua MPR Hidayat Nurwahid seakan ingin menghibur duka yang begitu mendalam Presiden India Pratibtha Devisingh Patil saat berkunjung ke ruang kerjanya di Gedung MPR, Senin (1/12). Hidayat, sama seperti biasanya, menyapa dengan senyuman tamu istimewanya yang negaranya sedang dilanda kekisruhan, aksi para pelaku teror yang menewaskan ratusan warganya.
Dalam percakapan dengan tamunya itu, Hidayat ingin menegaskan [...]
Related posts:
- Presiden India Ketemu SBY Pekan Depan AKARTA- Presiden Susilo Bambang Yudhoyono (SBY) akan menerima kunjungan kenegaraan...
- Presiden India Kunjungi Indonesia Jumat MALANG, SELASA - Presiden Republik India, Pratibha Devisingh Patil akan...
- SBY:Waspadai Teror di Tahun Pemilu JAKARTA, SENIN - Belajar dari peristiwa politik di Thailand dan...
Frank Carver's Punch Barrel
This looks like a really interesting conference. Now I’m thinking seriously about whether to put together a session and propose it…
Software Craftsmanship 2009 - Home
Frank Carver's Punch Barrel
A very thought-provoking post analysing how one particular software startup company failed, and exploring things which might have helped prevent the failure. I’ll need to think more about this.
6 reasons why my VC funded startup did fail | Code Monkeyism
Paranoid Engineering
There is a saying "life, sleep, career - choose two". But is it possible to choose three without sacrificing anything significant?
Types of people As far as you can see the world mostly consists of two stereotypes of people - ones who are successful at their career but have very little time for family and themselves and those who have lots of prime time with their beloved ones, yet, they are very average at what they do for living. Both approaches have their advantages and a "price to pay". Let's break everything down to pieces:
A hard workerStereotypical work mule who performs as 5 people and is loved by most employees.
Pros:• Skilled specialist
• Loves what she does
• No problems at finding a great job
• Wealthy living
Cons:
• Often too tired
• Often with bad habits (coffee, cigarettes)
• Health problems (because of the above)
• Always in a hurry
• Problems with personal life
• Works at spare time
• Problems with sleep (due to lifestyle)
A soft workerStereotypical average lazy guy without career ambitions who is reading news papers at work while thinking of his wife and kids. The bigger the corporation, the more soft workers it has.
Pros:• Laid back and relaxed most of the time
• Not too tired
• No coffee overdoses
• Sleeps like a rock
• Has a life and enjoys it
Cons:• Often short on money
• Shabby resume
• The only career path - to stay long enough in one place to become a loyal "company veteran".
Which way of life is better? I think the right answer is that being both hard or soft worker is wrong. Why? Look at the cons. There's no life without money, and money is worthless without a life. Wouldn't it be lovely if you could refactor your life to avoid having the cons of either of those? I made my attempt and found a formula that works for me. It could be useful for more software developers or even people with other professions.
Think out of the boxWhat is the definition of "work"? Is it a place you go 5 times a week and do things you are told for 4 hours, have a lunch and then do more things you are told for 4 more hours? If you have this attitude, you're most probably a soft worker. Loose it. If your definition of "work" is a place where you go to learn something, to do great things and achieve great results, to improve yourself and to help others, you're most probably a hard worker. Congrats. Now read further to find how to reclaim your personal life and have more free time.
Work is a Symbiosis
Remember biology. Work is a symbiosis of employer and employee. And for that symbiosis to work both sides must give each other equal amount of value. If you work hard, don't let yourself to be underpaid for various reasons like your employee could come up with. Those reasons can vary from
"you haven't worked here long enough to earn that much" to
"no programmer earns that much here". Respect yourself and don't work for food.
Work 4 days a week3 day long weekend every week? Most employees are OK with this option, though I haven't found many people using this. Stop crying that you have no time to spend your money and go ask for shorter work week. And believe me, It's worth to earn less money for that. You can choose what to do. You can sleep longer. You can do your routines and spend the rest of your long weekend without stress. Read a book, or even write a one. Learn Kung-Fu or fly RC planes with your kid. Forget the feeling of being tired. More time with less money has more value than more money with less time.
Debug your commuteWhen I first came to the company I currently work at, there were two
official choices of work hours: 8-17 and 9-18 including 1-hour of lunch. It was a nightmare to have 45-60 minute long drive in one direction. The traffic is unbelievable here in Vilnius. Now where was that emphasized word mentioned before?
Official. What is
official? When a tree has symbiosis with a shroom, do they have official ours for their activities? I guess not. It's a matter of one single conversation with authority to get your work hours flexible or to begin when you want it to. Early bird? Choose 7-16 and have more time with family. If you're nocturnal, work 10-19 to avoid traffic and get more sleep. Or for best results, choose to come anywhere between 7 and 10 AM and leave office respectively. Can you work remotely? Great, do it. And if noone told you can work remotely or even told that you
officially cannot, go and have a talk. You may be surprised. As of myself, I like to get up early and save my daylight, so I work 7-16. And my drive time is now 15 minutes in both directions. Did you know that one extra free hour a day saves two weeks of time in one year?
Debug your timeAgain, it's all about the official stuff. If your company has the
"official" coffee breaks at 9 and 15 hours sharp, make sure you get your coffee before that to save extra 20 minutes of productivity.
Contribute back to The CompanyBe good at what you do and don't do it just for money. See more than you should. If something's wrong - say it aloud, don't just curse and look for a new job. Even large enterprises can be shaken from the bottom, and your contributions will give you experience and increase your karma. I mean it. Do it to get closer to beauty and perfection. Plant a seed and see how it grows. If you are a software developer in a company that uses home grown Windows-only issue tracker that sucks ass does not mean you can't tell your boss that you know what would make a great replacement for the suck-ass issue tracker that everyone hates. Don't wait for a miracle to happen, make miracles yourself.
A symbiotic workerThat's what I call the type of worker that is between hard and soft. In short, it's like this:
Pros:
• Skilled specialist
• Loves what she does
• No problems at finding a great job
• Probably a wealthy living
• Not too tired
• Has a life and enjoys it
• Employers who practice slavery tends to avoid such people (harder to get a bad job)
Cons:• Still not a
free soul. Make a startup of your own to become one, if you can.
You only live once, so don't waste yourself. Don't be a slave.
Coming Up for Air
The current state of the JSF 2 spec has entered the Public Review phase. If you have any interest in JSF, now is a good time to review what we’ve done in the spec thus far and send feedback, which we will discuss and digest for the Proposed Final Draft due out next. [...]