Daftar Mahasiswa MTI kelas B

Silahkan di download, Bagi rekan yang belum tercatat, silahkan add di comment, nanti ditambahkan.
Maaf saya delete linknya, it was just temporer link.

2 comments September 1, 2007

Apa EJB tuh?

Definisi EJB;

“Enterprise JavaBeans (EJB) is an architecture for setting up program components, written in the Java programming language, that run in the server parts of a computer network that uses the client/server model

Sederhananya, EJB itu ada 3 macam; Session Bean , Message Driven Bean, dan Entity Bean.

Message Driven Bean, itu fungsinya kayak listener buat nerima pesan yang dikirim lewat jalur JMS secara asyncronous.
Entity Bean tuh componen yan berfungsi buat mem-persist data. Artinya, kalo aplikasi kamu itu database centric, maka data-data kamu itu di query pake entity bean. Entity bean ini umumnya mewakili tabel-table kita di database.Nah kalo session bean, umunya buat kamu naro2 bussines process. Session bean bisa aja kamu melakukan query make si Entity Bean, entah nge-insert , nge-query, ato nge-update database.

Setiap Bean (ketiga bean) bisa saling berinteraksi satu sama lain. Saling menggunakan satu sama lain….

contoh Message Driven Bean ;


package id.mujoko.mit.ejb.mdb;

import id.mujoko.mit.ejb.beans.MessageContent;
import id.mujoko.mit.ejb.stateless.MessageEngine;

import java.util.Date;

import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.EJB;
import javax.ejb.MessageDriven;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
(more…)

2 comments August 20, 2007

Basic Command

To add privilege recursive to the user, normally from the unzip file 

santi>chmod ugo+x -R  [directory name]

To show txt file in console

santi>tail -f [file name ]

To show current directory:

santi> pwd

Create connection with ssh protocol

santi> ssh username@remot_ip

example

santi>ssh joko@172.25.99.36

then they will ask user to enter password of the username

password :

Have fun

Killing running proccess

ps aux | grep xxxxx

xxxxx is the process that contain this world. Example, to know isd of eclipse that is running is

ps aux|grep eclipse

then we know sid of eclipse from the number in the most left like

ffp 6104 0.0 0.0 10468 892 ? S May18 0:00 /home/dridza/bin/eclipse/eclipse

6104 is the sid the eclipse

and to shut the process,

kill -9 6104

2 comments May 19, 2007

Entity Bean of EJB 3

The taste of beans in EJB are Session, Entity and Message driven Bean. Entity Bean is persistent. Persistent means being written the hard disk or another kind storage media. Entity bean is close to Database, what we create it and make it persist just like insert into database.

EJB 3 used annotation feature that belong to java 5 or above. Entity Bean 3 is simpler then EJB 2. Before EJB 3, developver have to declare all setting in xml file, to map the entity and the table is teh example. Also required extends EJBObject and create interfaces for all of them.

Now it is simpler for developer. Just create PAJO(Plain Annotation Java Object) , then add @Entity above of the class.

example
@Entity
public class Customer implements Serializable{
@Id
private Long myID;
private String name;
private String address;
:
:

}
The three member variable of Customer is mapped as the field of Customer Table by default. The name of the table, if not declared @Table(name=”" ),will use Class name, in this case Customer table. Don’t forget to add setter and getter for each member variable.

Implement serializable why? now we’re working in many JVM or client and server is separated. then we cannt use passing by reference anymore. Object is passing by value and remote client can have object that exactly same as in the container.

1 comment April 25, 2007

Welcome MTI

Yaa, Thanks God. Yesterday I just know that I have been accepted in MTI Indonesia University.

Here is the list of student that accepted fro Master degree :) , well now thinking how to get money to pay the school fee :(


Keep My Spirit, beri Semangat, 2 kali beri Semangat 3 kali beri semangat :D

List Of Accepeted Student

1 comment April 25, 2007

SFSB alias Statefull Bean Error in JDK 6

The way is not smooth as I imagine before. I was imagine EJB 3 is easier then EJB 2. After trying some simple code for Stateles Bean and Entity Bean, then I try Stateful Bean. SLSB and Entity bean has no big deal to try, but when I try SLSB in the same environment, I got error.

I used java jdk 1.6 and JBoss 4.05. I just down load sample code of stateless, statefull and entity bean and try to deploy and run it. Stateless and entity bean is ok as I expected, but for stateful has a problem with class loader. Then i try to search by googling and I found this thread in forum of JBoss.

Then I changed my environment, switch to Tiger (jdk 5) again, and its work as I expected. Its also work in JBoss 4.0.4 and used jems.installer with ejb feature.

Welcome and go for the next step :)

Mujoko

Add comment April 19, 2007

Link for SCBCD 5 (EJB 3) exam preparation

There is not many resources to read or to have an exercise in SCBDC 5. But I just found some link that may this usefull for us, also for me :)

1. http://www.nycjava.net

2. http://java.boot.by/

3. http://dev2dev.bea/

4. http://today.java.net/

5. http://www.javaworld.com/

6 http://www.netbeans.org/kb/55/ejb30.html tambahan dari ifnu

7 http://j2ee.netbeans.org/NetBeans_EJB3.html tambahan dari ifnu

And I think Objective of exam is quite important as well, you can download here Objective .
anyone who wanna share another links probably?

Mujoko

Add comment April 16, 2007

mdb file dan Java

Microsoft Access, filenya berekstention mdb, ternyata bisa langsung kita baca seperti halnya kita membaca file biasa. Di pulau dan negara java, ada satu framework yang bisa digunakan untuk membaca langsung, namanya Jaccess.

pada prinsipnya, jaccess akan membaca metadata dari mdb file tadi dan juga datanya secara native, bukan dengan jdbc apalagi odbc.
Dari metadata mdb file, jaccess akan mendapatkan nama-nama tabel, nama-nama field pada setiap tabel. Kemudian record akan di baca dan di simpan dalam map, di petakan antara nama field dan valuenya untuk setiap record.Akan lebih bagus kalo kita liat bagaimana Jaccess itu: (more…)

Add comment March 28, 2007

Basic Security di Tomcat

Suatu kali, leader projectkku berkeinginan agar aplikasi yang sedang di develop alias under construction dapat di presentasikan di depan top manager. Karena waktu yang terburu-buru, maka ia minta aplikasi di taro di tempat umum, alias bisa di akses di internet. Nah karena amat sangat tergesa-gesa, dia minta segera dipasang security sesimple mungkin dalam waktu sejam. And then di putuskan di buat basic security. Berikut implementasinyanya…Oh ya ini juga masuk materi SCWCD lo…!.

Kita menggunakan web container Tomcat, maka langkah awalnya adalah mengeset password dan nama di Realms memory dengan menambahkan username password dan role di salah satu file tomcat yang berada di${CATALINA_HOME}/conf/tomcat-users.xml

secara default:
<tomcat-users>
<user name=”tomcat” password=”tomcat” roles=”tomcat” />
<user name=”role1″ password=”tomcat” roles=”role1″ />
<user name=”both” password=”tomcat” roles=”tomcat,role1″ />
</tomcat-users>
(more…)

Add comment December 14, 2006

SmsGate Way

SmsGate Way Ada beberapa thread yang menanyakan how to create SMSGate pake java, web base application.

Yang paling simple and gak perlu ngotak atik AT command tentunya pake SMSlib yang bisa didownload di www.SMSLib.com . Di dalam SmsLib.zip ini terdapat contoh kecil dalam versi gui, sebaiknya kalo mau mendevelop untuk web aplikasi ini, jangan terlalu memperhatikan.

Pertama coba dulu koneksi dengan gsm modem atau hp yang terhubung dengan Hyperterminal punyanya microsoft (biasanya di program>>Accesories>>Communication>> terminal) .

Saya pake HP 6610 nokia dengan kable data DKU5 + drivernya, asumsinya kita sudah menginstal ini sebelumnya.

tekan character AT dilanjutkan enter, jika koneksinya bagus maka muncul OK. Please jika tidak terlalu mengetahui AT command, jangan memasukan perintah selain AT, kecuali jika mau mengambil resiko device kita rusak.

kemudian di web aplikasi kita dibuat satu servlet yang akan melisten jika ada SMS masuk, maka ia akan mengirim message ini ke servlet yang lain untuk disimpan di Database atu melakukan bussines logic terlebih dahulu. Pada kasus saya, message sms saya terima kemudian saya kirim dengan menggunakan JMS ke MDB (Message Driven Bean). Jika aplikasi kita belum full j2ee , message bisa dikirim ke servlet lain dengan menambahkan ke url (doGet) atau disimpan dalam bentuk xml, atau…banyak kumungkinan tergantung anda

Servlet untuk menerima message dapat di download, nama classnya SmsGate WayServlet , formatnya dalam doc, silahkan dirubah ke java. Worpress gak ngijininin tipe java file di upload, dan saya set di web-xml untuk <load-on-startup>, sehingga langsung up servletnya sebagai thread .

Let’s get it on

8 comments November 6, 2006

Next Posts Previous Posts


RSS SmartPhone

RSS Android

RSS Digg

Archives

Blog Stats

Meta

Visitors to this site

Blogroll

Friends