⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helloejbbean.java

📁 java的一系列产品中包括jsme,jmse,j2ee,本文件提供j2ee实现的源代码.
💻 JAVA
字号:
/*
 *
 * Copyright 2002 Author,Zhang Hongzhan. All Rights Reserved.
 * 
 * This software is the proprietary information of Author..
 * 
 */
package helloejb;

import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.math.*;

public class HelloEJBBean implements SessionBean{
  private SessionContext ctx;
  public void setSessionContext(SessionContext sc){
  	ctx=sc;
  }
  
  public String HelloWorld(){
  	return "Hello World,Welcome learn EJB!";
  }
  
  BigDecimal dollarRate = new BigDecimal("8.2400");
  BigDecimal poundRate = new BigDecimal("12.5000");

  public BigDecimal dollarToRMB(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(dollarRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
  }

  public BigDecimal poundToRMB(BigDecimal pound) {
    BigDecimal result = pound.multiply(poundRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
  }

  public HelloEJBBean() {}
  public void ejbCreate() {}
  public void ejbRemove() {}
  public void ejbActivate() {}
  public void ejbPassivate() {}  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -