/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sikd.sikd5;

import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import sikd.sikd5.coba.CobaMb;
import sikd.sikd5.sikd5bean.util.ServerUtil;
import sikd.sikd5.sikd5bean.util.SikdSessionUtil;
import sikd.sikd5.sikd5ejb.session.PosisiKasSessionBean;

/**
 *
 * @author agus
 */
@Named(value = "posisiKasMb")
@SessionScoped
public class PosisiKasMb implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Creates a new instance of PosisiKasMb
	 */
	public PosisiKasMb() {
	}

	public void coba2() {
		PosisiKasSessionBean service;
		try {
			Context context = ServerUtil.getOfficeContextV3();
			service = (PosisiKasSessionBean) context.lookup(SikdSessionUtil.POSISI_KAS_SESSION);

			System.out.println("Hasilnya adalah : " + service.getInfoPengiriman("", (short) 0, (short) 0));
		} catch (Exception ex) {
			Logger.getLogger(CobaMb.class.getName()).log(Level.SEVERE, null, ex);
		}
	}
}
