Menu

28 Aralık 2012 Cuma

EJB Lite kullanarak Java SE uygulamasi icersinde JPA ornegi

Bu makalemizde, bir java SE uygulamasi icersinde EJB calistiracaz, evet yanlis okumadiniz, herhangi bir uygulama sunucusu kullanmadan ejb`yi nasil kullandigimizi gorecegiz. Aslinda, daha once yaptiysaniz bir EJB module olusturmadan, ejb 3.1 ile birlikte herhangi bir web uygulamasi icerisindede EJB kullanabiliyorduk, bizim burada yapacagmizla web uygulamasi icersinde calisan EJB mantigi ayni ikiside EJB lite kullaniyor. Simdi ornek uygulamamiza gecelim..

    Uygulama gereksinimleri

    The following is a list of hardware and software requirements:
    • JDK 7
    • NetBeans 7.2 Java EE version IDE
    • GlassFish 3.1.1 (jar`i kullanacagimiz icin gerekli)
  1. From the NetBeans Menu bar, click File > New Project
    In the New Project dialog box, select Categories > Java, select Projects: > Java Application and click Next















    8. Product.java entity`imiz.
    @Entity
    
    public class Product implements Serializable {
    
    
    
        private static final long serialVersionUID = 1L;
    
        @Id
    
        @GeneratedValue(strategy = GenerationType.AUTO)
    
        private Long id;
    
        private String code;
    
        private String name;
    
    
    
        public String getCode() {
    
            return code;
    
        }
    
    
    
        public void setCode(String code) {
    
            this.code = code;
    
        }
    
    
    
        public String getName() {
    
            return name;
    
        }
    
    
    
        public void setName(String name) {
    
            this.name = name;
    
        }
    
    
    
        public Long getId() {
    
            return id;
    
        }
    
    
    
        public void setId(Long id) {
    
            this.id = id;
    
        }
    
    }











    arguments




2 yorum:

  1. When body develops an infection. Existem problemas com exposio luz solar, ou seja o tempo que durou esse tratamento e dieta, ou
    seja, mineral and is usually a good thing? Us
    Lupies have to shave, well over a year, the
    part of a butterfly shaped rash across cheeks and nose ulcers.


    Also visit my weblog :: lupus treatment Pembroke Pines

    YanıtlaSil
  2. Omega-3 butterball acids are goodly fats highschool cholesterol with respectable Aliment is more favorable, as foods ordinarily do
    not reason minus side effects. This is merely compound disconfirming feelings
    from tenseness and anxiety.

    Here is my site: ayurvedic high medicines for cholesterol

    YanıtlaSil