EJB-JAVABEANS

Detailed differences between javabeans and ejb2.0?

Any reusable java classes could be a javabean. EJB is special javabean that can be managed by EJB container which will be able to manage, saying EJB fields to map to database fields. Ofcaurse you can manage this just like regular javabeans. In EJB, it is called bean managed, instead of container managed.
You can find a short tutorial on sun site.

Similar Messages

  • Difficulty abstracting EJB - JavaBean mapping

    We are implementing a java based MVC architecture. The Model portion is really two seperate tiers, one being JavaBeans with which the View communicates and the second being EJBs as a buffer to the data store. In between these two is a very thin layer whose sole responsibility it is to map the data between the JavaBean and the EJB based on a C-like-struct structure utilized by both. For example, in a "get" request, this mapper layer instantiates the appropriate JavaBean, looks up the appropriate EJBHome, gets the remote of the specified primary key, gets the "struct" from the EJB and loads it into the JavaBean. However, I have run into all kinds of problems with doing this because of the J2EE/EJB restriction prohibiting the home from returning super-types of the remote.
    Temporarily, I have gotten around this limitation by simply reflecting on the objects returned from the EJB calls. However, this is less than ideal because of the "compiles-but-doesn't-run" issue. I have also thought about having the JavaBeans talk directly with its corelated EJB, but this seems to make the coupling between these two too tight.
    Has anyone else found a good way around this strangely extremely non-OO issue?
    Thanks.

    Moving back towards top...

  • Need Help in making a business decision

    We are in the intial phase of deciding what tools to use to develop an enterprise web application. Here is the scenario:
    1. We will be using a content management application to store and view the documents we scan, choice is going to be documentum
    2. With that piece we already have the tomcat environment available
    3. Outside of documentum we will need to build an application with an external database that will be the maintenence piece alongwith dynamic reports generated by the user community. We are looking at not more than a dozen tables that will be maintained externally via this application.
    Now my question is what should the choice of tools be to develop this web application. Should it be EJB-JavaBean-JSP or JSP-JavaBeans-Struts type of framework? I am a novice in this area and any input/help will be much appreciated.
    Thanks.
    TD

    Let me know if i have understood your requirement correctly:
    You have a database with a dozen database objects(tables,etc).You need to develop a java application which will query this database.This application will consist primarily of reports which the users will be running.
    Assuming I am with you so far, I have the following suggestion:
    If the bulk of your processing is going to be "read" operations(as in case of reports),It really does not make sense for you to go for EJBs.A JSP-STRUTS type of setup will do very nicely.
    Even If you DO have a lot of "Write" type of operations involved(eg: updating/inserting data),For most part,you may not need EJBs.Or you could use a mix of EJBs and plain java classes.For eg: you could use EJBs only for modules which have critical/sensitive data.For most part,I think you would do fine with JSP-STRUTS.
    However,out of personal experience,I would urge you very strongly to use STRUTS; or if not pure struts,then atleast some form of the MVC pattern.
    ~A

  • Beginning Programmer needs help - JSP and databases?

    1. I have never used JSP before, but have been given an assignment to create a webpage to query a database. The database is in Access. Does anyone have a snipet of code in JSP that will query an MS Access database. Is there a function that I can use and pass it an SQL (select statement) and have it return a list of results.
    -OR-
    If there is a way for JSP to transform the MS Access database into a text file that would be good also.
    2. Has anyone created a search functionaly using JSP (or know of a tool) that can search documents, PDF files, HTML files, etc.
    Thank you for any help!

    hi , there is no big deal in JSPs, Servlets, EJBs e.t.c its olnly a matter of committing time and getting urself familar and in areas where you have problems this forum is a nice place for you to share all what u have.
    to start with i will give you some sites where you can start learning jsps, servlets, ejbs and the rest.
    1) http://java.sun.com/j2ee -> look for JSPs , Servlets, EJB, JavaBeans e.t.c
    2) http://www.jspinsider.com
    3) http://www.coreservlets.com
    4) http://www.jakarta.apache.com (download tomcat for your container)
    for databases u can use this code snippet but u will have to read more about databases to be able to chagne some things in this snipper such as your database username, password , url and the rest.
         <%@page import="java.sql.*" %>
         try
            Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
            Connection con = DriverManager.getConnection ("jdbc:odbc:test_dsn", "sa", "");
         Statement stat = con.createStatement ();
         ResultSet res = stat.executeQuery("select * from authors");
         while (res.next())
              //process the results of this query
         catch (Exception e)
            //process this also
    %>
    You will need to become farmilar with the java programming language and also database conventions so you have a proper understanding.
    study those db codes and modify to suit your needs.
    buzz on me in case you are stuck.
    Regards

  • Two questions about deploy

    1. can different ear module share some jar file in j2ee if u don't include the jar files into ear file?
    for example.i have two ear file a.ear and b.ear,both of them use c.jar,i just want to deploy them on to the same j2ee server,i don't want c.jar to be included in ear files twice,what should i do then?
    2. how can i define some string that can be used by servlet/ejb/javabean at the same time? i know that u can
    define DataSource as resources in j2ee,but i just want to share some string. if u define them as env-entry in ejb descriptor,it can only be used by the ejb who define it,if define the env-entry in web.xml,only servlet and java bean can use it.i want all of them can share the defiened env-entry

    Hi,
    i think for the 1. question there are 2 ways to go:
    a) if the c.jar is used as a bean - then you should make a d.ear wich contains c.jar and which is support the service to b.ear and a.ear. - I think so but i'm not sure -
    b) if the c.jar is a library you should deploy it two times - one in a.ear and two in b.ear
    For the 2. question:
    You can define the string in the ejb descriptor as a env-entry and you can add a method to the bean wich returned the string.
    But i think you could reference ejb resource entries in the web tier too. Maybe you must use the resource-ref tag in the web.xml to refer the resource-string of ejb.
    I hope this is correct and helpfull.
    Bye Thomas

  • 我眼中的J2EE

    周末写的一点体会:
    ejb是什么
    很长时间以来,我们一直被误导了,以为只有采用了ejb技术的系统才算真正玩了ejb。后来才明白J2EE的内涵要比ejb广的多,是一套使用Java进行企业级开发的技术规范,包含了大部分核心服务如JTA事务管理, 资源池,线程管理,还有jdbc,jsp,servlet等应用技术。而EJB仅仅是一个使用了JTA事务管理、线程管理等J2EE基础服务的分布式的组件标准。
    为什么需要ejb
    按照官方的说法:
    Enterprise JavaBeans will make it easy to write applications. Application developers will not have to understand low-level transaction and state management details; multithreading;resource pooling; and other complex low-level APIs.
    &#10065; Declarative transaction management
    &#10065; Remoting
    &#10065; Clustering
    &#10065; Thread management
    &#10065; Instance pooling
    &#10065; Resource management
    &#10065; Security
    &#10065; Management of business objects
    记得一个人写文章说:“EJB最大的诱人之处是她把应用程序和服务器分开了,我们再也不用和那些服务器上的复杂的资源打交道了,什么数据库,什么进程,线程,什么安全权限,什么套接字,都见鬼去吧,我们只需要专著于我们的商业逻辑的实现了。”
    ejb的许诺兑现了吗
    ejb已经出现5、6年时间了,很多J2EE项目才也采用了ejb,sun所描述的美好前景也并没有实现。
    1. Ejb规范本身是很复杂的,以至于没有多少开发人员去阅读他。Ejb总是与复杂联系在一起的,并没有减轻开发人员的负担。Ejb container像一个黑盒子,ejb在里面如何运行的,机制如何,很多人都说不出ejb container是如何处理异常的,跟事务有什么联系。
    Ejb的运行效率如何,瓶颈在什么地方,没有人知道。(在Oracle中的调优我们可以很精确的找出是程序甚至说哪条SQL语句的原因,Oracle配置的原因,操作系统和硬件的原因)。
    2. Ejb的复杂意味着程序的开发效率是低的,以致于Jbuilder提供了图形化的设计工具(一个包中的ejb只能由一个人来开发,否则合并比较麻烦) ,Xdoclet是另外一种辅助开发的方式。另外,拿entity bean来讲,每次想按照不同的参数进行查询,都要去为entity bean重新定义的一个select方法,然后编译发布,然后在业务逻辑中调用。
    3. Ejb是在容器中执行的,意味着我们不能像一般的javabean那样来对待他,与javabean像比,他是一个需要其他环境的重量级实现,单元测试是很困难的。
    4. 关于entity bean,Marc fluery的文章中说Cache is the king,可是数据库中已经有cache了,为什么还要去cache entity bean(相对于enity bean的复杂性,数据的传输开销还是很小的),仅仅是因为采用了entity bean而看起来更面向对象吗。
    Core j2ee patterns和一些所谓最佳实现的书都有相当一部分内容来正确和简化使用ejb的。
    相信Ejb 3.0在简化方面会做了不少工作。
    为entity bean寻找理由, 构件与对象
    一开始接触entity bean,感到的就是复杂,开发效率低,难以维护。
    一般来讲,使用entity bean都是完成数据持久的功能。
    后来看了hibernate,很简单,开始困惑,总以为entity bean之所以存在,还是有他存在的理由,于是列举了具备的安全,事务,分布式计算等方面的优点。
    后来还是开始怀疑entity bean存在的必要,因为那些功能与优点都可以通过session bean封装其他jdbc操作或者hibernate来实现,想来想去entity bean唯一的不同就是构件了,更像客观存在的domain model,而不是从数据库里面取出来的数据,entity bean使对象看起来更像真实的世界。
    构件之所以存在,是与分布式计算分不开的。在一个系统中,你可以通过另外一个系统来调用业务逻辑和数据访问,不同的系统通过构件来完美结合。
    (其实torque也不错,就是不能操作多个数据源,另外就是自己生成了相关java文件来实现or mapping的功能,而不是像hibernate那样通过xml文件来配置实现。)
    我们需要分布式吗,Distribution and Scalability
    分布式意味着在网络之间进行协调调用,意味着复杂,除非必要,就不要采用分布式技术。
    以前以为采用ejb,程序就是分布式的,就具备了可伸缩性。
    抛开可以按功能来划分访问的系统,其实可伸缩性就表明了是需要Cluster的(Cluster并不完全意味着分布式,只是很多分布式体系提供了Cluster功能),而Cluster中的难点就是如何同步复制不同App Server之间的数据,而App Server是与很多资源相连的,程序执行状态,Session变量、数据库连接状态,我们如何复制呢。(好不容易理解了Oracle RAC,而我觉得Oracle的同步的资源都是内部的)。
    重量级与轻量级(ejb container vs spring)
    在公司论坛上看到一个讨论heavyweight与lightweight的区别,如果说把一项技术的规范和文档拿出来秤,操过500克就是heavyweight,否则就是lightweight。
    似乎heavyweight总是与复杂性联系起来的。
    就如同ejb container与spring。
    我们所开发的系统并不是都是分布式的,也并不都是那么复杂的,才会有spring的出现。
    客观的说,ejb container能够提供的功能,spring基本上都能够以javabean的方式实现。
    区别还是前面说的ejb container是一个构件的容器,而spring是一个对象的容器,一个转移对象间的耦合,把业务逻辑与安全、事务等相分离的轻量级解决方案。
    Spring 最核心的部件就是它的Bean Container,在整个框架中扮演了一个软总线,它使框架内部的组件按照一定的耦合度组装起来,对外提供一个服务的接口
    如果开发一个需要跟多个系统交互运行的分布式系统还是使用ejb吧, spring取代不了ejb。
    对于大多数web应用,应该是一个不需要访问其他系统的多层系统(即使可能访问多个数据库),采用spring把。Spring+hibernate应该是一个比较好的组合,但和ejb container相比,spring的缺点就是没有规范。
    这么多年来,java总是在不停的修修补补中前进,
    一切都是对象吗, OO的困惑
    j2ee系统的开发应该都是采用面向对象技术,关键是怎么用的问题。
    很久以前,在重粒子空间的一篇文章里,把一切都描述为对象,整个世界是那样的优美。我也深信不疑。
    由于在我们的程序中,主要是针对数据处理和流程处理的,才知道用对象来表达不是那么自然。就查到了transaction script和domain model的概念。
    transaction script就是对表示层用户输入的处理程序。包括验证和计算,存储,调用其它系统的操作,把数据回传给表示层。
    domain model是所谓的域模型, 跟客观世界中的实体相对应。
      transaction script属于结构性思维,直观一些,在系统中如果domain model不是很明显,采用transaction script也是一个不错的选择。domain model属于oo思维,需要较强的抽象能力,习惯了就可以能够组织很复杂的逻辑,另外,我们必须考虑哪些行为是通用的、属于domain model的,哪些不是,可以通过一些xxxManager或者xxxController所实现的。
    举一个例子,假如查看今天A银行到B银行的所有转帐记录, 是列出A银行所有帐户对象来查看是否进行了转帐,还是从数据库中直接查询今天的转帐记录直观。Transaction script还是有他的用处的,可以说,所有的程序都要通过Transaction script来组织,程度不同而已。
    这个世界,除了对象,还是有对象间的关系、行为规则和记录(数据)的,观察的角度不同,就可以从不同的角度来组织系统,不一定需要用对象来表示。比如一个人是一个对象,档案所记录他一生的活动是什么,数据,是我们关注的一个方面,我们来查档案就够了,而不用去问这个人。
    不排斥DB
    在网上很多文章中,都会提到把系统想象成一个完美的oo世界,而是db只不过是一个持久化的手段而已。
    我一直认为db也是一个完整的世界,能够做很多事情,特别是在效率方案。
    所谓采用oo和j2ee的系统,模拟现实世界,注重对象间的行为和关系,比较适合oltp的应用。
    而db则是从数据角度来进行关注一个系统的,没有oo那么复杂的关系,处理效率很高,特别是在大批量数据处理和长事务处理的时候有自己的优势。在不存在明显错误的前提下,db的实现一般要比oo语言要高效,只是从大的方向来讲有它自己的处理范围。
    Oo和db需要一个适应、协作的过程。
    你有多少系统是需要从不同数据库之间移植的,必要的时候,在j2ee方案中采用些db技术还是不错的选择。
    MVC
    Spring,struts,webwork2
    Model
    C/s结构下,在pb程序中,一个datawindow几乎可以从界面交互、数据绑定以及访问数据库等一系列功能,你专心考虑业务实现就可以了。
    在多层结构的程序中,这种好日子一去不复返了,因为分层,属于接口性质的细节要靠你自己来实现,仅仅在数据方面,就出现了vo, dto,po,detached po,domain model等众多的名词。
    不同的层专注于不同的功能,对于界面展现,在struts中有actionform用于显示,业务层的数据用vo来表示,在网络传输中又用到了dto(特殊的vo),数据保存又用到了po了。
    在这种情况下,数据的完整性是一个很麻烦的问题,假如actionform可能和vo的数据不完全一致,不完全一致的内容在页面生成的时候就丢失了,要么把vo缓存起来在需要时进行更新,要么在业务层从新query数据到vo进行更新,如果业务层是单独的而且持久层是ejb还要再次进行查询更新。效率很低,而且容易出错。
    在hibernate中出现detached po,可以当成vo,po来用,也可以把数据传送到前台界面来使用,最后再传递回业务层进行业务操作和保存。由于detached po可以是带有业务逻辑的域对象,甚至可以在界面中调用detached po的逻辑。缺点就是如果detached po中存在lazy load的依赖对象,就不是那么好玩了,这种情况应该是可以根据编程时的具体情况来选择避免的。
    Domain model,是一个特殊的值对象,带有业务逻辑和持久功能。他接受和加工客户端数据,实现业务逻辑,并把数据进行保存。Domain model中数据完整性和持久问题还是要在内部处理,只是从分散的位置集中到一处了。
    总之,在多层结构中没有一种方案能够像pb中的datawindow一样智能和完美的数据处理方案。总是有很多东西要自己处理。
    另外,web页面是一个无状态的简单页面,界面上的只有通过javascript(javascript+xml)来处理,每个动作都要提交给服务器来操作后返回显示,很多时候简直是不堪忍受。Pb和delphi的那种年代真是一去不复返了。
    不知道以后jsf如何,因为客户端还是可以做很多东西的。
    view
      就servlet来说,也可以用作页面显示,没有什么意义,一般可以用作流程扭转,相对于Action。除了那些开源方案,界面一般都是jsp来做,直观简单。xml我没有弄过,就不说了。
    Controller
    现在很少有人直接在jsp页面里面嵌入业务逻辑和数据库访问代码了,都会用controller来表示,根据不同的动作来调用不同的业务逻辑。唯一有点意外的是看到webwork2中用action把controller和model结合表示,很方便和新颖,只是从来就没有用过webwork2。
    目前的mvc结构,为程序带来了灵活和复用的功能,但是分层毕竟是有代价的,很多时候需要去解决所带来的问题。
    J2EE体系已经比较成熟了,也总是在修修补补中不断前进。
    licy 2004.08.07 MSN:[email protected]

    写的不错,我也深有同感,作者把当前j2ee种存在的弱点和三层开发的困惑都说出来。不过,开发中(现实)很少有人能够理解。 特别是ejb 、全面oo、分布式,我就有点不感冒。我们的目的是开发出符合需要的应用,而从技术角度讲,无论任何发展中、有问题、不方便的技术都要去掌握。现在的客户很挑剔,他们不再挑剔应用,而是一味的赶时髦,什么新技术,无论是否掌握、是否实用,一定都要用到,老板也是如此。就像一个刚入门的编码者。不可否认,没有深入的应用,就没有发言权

  • Using flex for thik client application

    My application is an C++ thik client application. It uses
    some king of lib (called zaf) for the UI.
    Can Flex be used for handling the UI of desktop application
    ?

    You could use AIR (Adobe Integrated Runtime), in which most
    of the app is created in Flex, and some in AIR extensions, but
    there would be limitations. You can't execute native applications
    from AIR applications, so you can't execute Perl scripts, Java
    apps, etc. from your AIR app. You can of course use FDS (Flex Data
    Services) to connect to POJO, EJB, JavaBeans, SOAP and other web
    services, etc.

  • What is the diffrence between a javabean and  EJB

    hi!
    what is the diffrence between a javabean and entreprise jvaabeans! i mean which are the uitilization featires of eaxh one !

    i am seeking for a solution for my problem , in fact i ma trying to implement and develop an application with java that allows a certain range of IP adresses to be connected to a database server in order to extract the suitable data from the server .
    let me explain mor ethe suitation , in fact what i am loking for is to use javabeans to grant my application much more consistence and pertinence : si i am asking if it could be possible to use javabeans in my case especially if i am not trying to developp a web application but a cleint /server one allowing some services.
    The application is in fact dealing with a stock exchange market and what i am trying to do is to grant particilar registrated customers to have the informations that they need ( portofolio, currency's status, market indicators, .) also drawing some charts decribing rates, variations, and others specefic financial caracterestics .So , if we consider that this application is not a web application ( no HTTP request and no servers like apache or others ) how it is possible to use javabeans and not EJB to build the application? i mean what could be suitable and preferable to rely on and dvelop to ensure a good java application !!
    if you need more details to help you find the answer for me don't hesitate to answer me back !!
    Someone here gave me that answer
    use RMI to code the services and (Updateable) Value Objects to pass the information between tiers.
    RMI is an all-java distributed component framework (ie. EJB, CORBA, DCE/RPC, DCOM, etc.), that is very suitable for developing non-containerized multi-tier applications. Refer to the RMI trail in the Java Tutorial as a starting point for coding RMI solutions (http://java.sun.com/docs/books/tutorial/index.html). Under this scenario you would code the database access service as an RMI service (server-side). Client/server communication should be facilitated through the use of JavaBeans/classes that wrap the information being passed (customer information, portfolio details, market information, etc.) - these are refered to as 'Updateable Value Objects' (a design pattern). Graphing and charting would be handled in your client from the information received from the (RMI) server. GUI JavaBeans can be used to provide this functionality as well as other client-side services. There are numerous "shrink-wrapped" components for GUIs available on the market just peruse any Java magazine to find them.
    but how comes? how can i do it !! and where can i find more information please about 'Updateable Value Object "
    thanks

  • Best way to call EJBs from JavaBeans/JSP

    Does anyone have a favorite way for getting EJB data from a JavaBean into
              your JSPs?
              I'm looking for a way of caching the EJBHome references so the beans don't
              have to do a lookup on each page, each time they are called.
              Thanks,
              -TB
              

    How does this HelperClass keep the references cached after it looks them up?
              Is it a singleton object, or does it keep the references in static fields?
              "Argyn Kuketayev" <[email protected]> wrote in message
              news:3b1e468b$[email protected]..
              > make a HelperClass, which will have a method getXXXHome()
              > inside the Helper class you may implement cashing.
              >
              > thanks,
              > Argyn
              >
              > T. Bailey wrote in message <[email protected]>...
              > >Does anyone have a favorite way for getting EJB data from a JavaBean into
              > >your JSPs?
              > >
              > >I'm looking for a way of caching the EJBHome references so the beans
              don't
              > >have to do a lookup on each page, each time they are called.
              > >
              > >Thanks,
              > >-TB
              > >
              > >
              >
              >
              

  • Standard Javabean inside a JSP/EJB application

    Hello!
    I want to use a JSP-file as a graphical user interface for a j2EE-application. I want to use a standard Javabean as an intermediate connector between the JSP and the Enterprise Java Beans.
    Deployment details:
    - 2 bean-Jars inside a EJB-module
    - A JSP-file inside a .WAR-file
    But what about the standard Javabean, where shall I put it?
    What are the correct settings in the deployment tool?....
    bye from
    G�ran, Stockholm

    You just need the standard JavaBean available to the EJB as well as the JSP. One nice way is to package such beans into a JAR and include the JAR in the EJB module as well as the WAR as a library.

  • Javabean Clients for EJBs in OC4J

    Is there anyone who has written a Javabean that accesses a EJB
    deployed in OC4J, doesnt have to be a structural EJB, could be
    any class that does it and is then used by a JSP. If so, could
    you please help me out. I cant seem to do that, i cant
    understand what will be the directory structure. I use the ANT
    tool for creating the ear file.

    Hi nil,
    This may help you:
    http://kb.atlassian.com/content/tutorials/jollem/orion-cmp-
    primer/
    It shows how to access a CMP entity EJB from a JSP. The java code
    is embedded in the JSP file(s) but I think you can easily move
    the code to a java bean and call the java bean methods from the
    JSP.
    Hope this helps you.
    Good Luck,
    Avi.

  • JavaBeans in EJB App

    In which circumstances to use JavaBeans in Ejb application?
    I have created a simple e-commerce application using EJB components but without JavaBeans at all.
    The thing is that i have a problem with the jsp page which presents all the products under a particular category, (each product has a link to add it to the shopping cart of the user).
    After the user select a category, a servlet getting the products list from a session ejb and put the result as an attribute in the request. Then i'm prining all the products - till here no problem.
    In order to add a product to the shopping cart i'm sending to a servlet some info about the product , but this info sometimes contains a special characters , so i decided to use <c:url> with <c:param> for the attributes.
         <%
          java.util.List<Entity.Products> products=(java.util.List<Entity.Products>)request.getAttribute("products");
           for(Entity.Products product : products)
            %>
    <c:url value="ShoppingCartServlet" var="productUrl">
          <c:param name="productId" value="" />
          <c:param name="productName" value=""/>
      </c:url>
      <A href="${productUrl}">Add</A>now how can i set the values of the params?
    i can't use scripting elements (<%=%>) , it is not allowed.
    Do i need to use JavaBeans?
    Thanks in advanced.

    is it so hard? Looky here:
    ; hostname: 127.0.0.1; port: 3820"The application is trying to connect to the localhost, and the glassfish server is not running on the localhost. The JNDI properties of the application must point to the actual host that the glassfish server is running on.

  • Is JavaBean same as EJB?

    hi there
    is JavaBean same as EJB? when i use javabean in a jsp page, can this bean be a EJB?

    ok, if i have a JSP with a form on one hand which will
    collect some data, and on the other hand, i need to
    call a web service and pass these collected data to
    it. i need to simulate a server application on the
    client side that is going to take these data, and pass
    them to the web service. can i build a EJB to do the
    backend work, or a JavaBean, or a servlet? I can not
    decide what is the best way to simulate this server
    application. Yes you can, an EJB is a component which can be accessed remotely. Since a JSP contains Java code you can pass an object holding the data you collected to the EJB for back-end processing. Or you can use a servlet. It depends on your requirements. A servlet is easier to build an deploy, for a small application it might be a better option.

  • J2EE-EJB-Deploying an Enterprise JavaBean-deployment failure

    I am unable to deploy a simple EJB application . I am using j2skee1.3.1 and J2SDK1.4.0
    The related files and error messages are reproduced.
    The java files and ear files are in d:\myjava\ejb
    class path is .;d:\j2sdkee1.3.1\lib\j2ee.jar;D:\forte_jdk\j2sdk1.4.0\lib;d:\myjava
    j2ee_home= d:\j2sdkee1.3.1
    java_home=D:\forte_jdk\j2sdk1.4.0
    path=%SYSTEMROOT%;%SYSTEMROOT%\command;c:;d:\j2sdkee1.3.1\bin;%SYSTEMROOT%\system32;%SYSTEMROOT%\system32\WBEM;C:\Program Files\Common Files\Adaptec Shared\System;D:\forte_jdk\j2sdk1.4.0\bin;d\j2sdkee1.3.1\javaservlets;d:\MSSQL7\BINN;D:\forte_jdk\j2sdk1.4.0\bdk1_1\beans\beanbox
    Can any one suggest a solution.
    ************calculatorHome**********
    import java.io.Serializable;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface calculatorHome extends EJBHome
         calculator create() throws RemoteException, CreateException;
    ************calculator***************
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface calculator extends EJBObject
         public double dollorToRs (double dollars) throws RemoteException;
    **********calculatorEJB***********************
    import java.rmi.RemoteException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class calculatorEJB implements SessionBean
         public double dollarToRs (double dollars)
              return dollars * 48.15;
         public calculatorEJB() {}
         public void ejbCreate() {}
         public void ejbRemove() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void setSessionContext (SessionContext sc) {}
    ***********************************descriptor*************
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>newcalculatorjar</display-name>
    <enterprise-beans>
    <session>
    <display-name>calculatorEJB</display-name>
    <ejb-name>calculatorEJB</ejb-name>
    <home>calculatorHome</home>
    <remote>calculator</remote>
    <ejb-class>calculatorEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <security-identity>
    <description></description>
    <use-caller-identity></use-caller-identity>
    </security-identity>
    </session>
    </enterprise-beans>
    </ejb-jar>
    ***************************error message*****
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>newcalculatorjar</display-name>
    <enterprise-beans>
    <session>
    <display-name>calculatorEJB</display-name>
    <ejb-name>calculatorEJB</ejb-name>
    <home>calculatorHome</home>
    <remote>calculator</remote>
    <ejb-class>calculatorEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <security-identity>
    <description></description>
    <use-caller-identity></use-caller-identity>
    </security-identity>
    </session>
    </enterprise-beans>
    </ejb-jar>
    STATIC VERIFICATION RESULTS
         NUMBER OF FAILURES/WARNINGS/ERRORS
         # of Failures : 3
    # of Warnings : 0
         # of Errors : 0
         RESULTS FOR EJB-RELATED TESTS
         FAILED TESTS :
         Test Name : tests.ejb.intf.remoteintf.RemoteInterfaceMatchMethodArgs
         Test Assertion : Remote interface business methods have matching method arguments test
         Test Description : For [ calculatorEJB ]
    For Remote Interface [ calculator ] method [ dollorToRs ]
    Error: No corresponding business method with matching arguments was found for method [ dollorToRs ].
         Test Name : tests.ejb.intf.remoteintf.RemoteInterfaceMatchMethodException
         Test Assertion : Remote interface business methods have matching method exceptions test
         Test Description : For Remote Interface [ calculator ] method [ dollorToRs ]
    Error: No corresponding business method with matching exceptions was found for method [ dollorToRs ].
         Test Name : tests.ejb.intf.remoteintf.RemoteInterfaceMatchMethodReturn
         Test Assertion : Remote interface business methods have matching method return type test
         Test Description : For [ calculatorEJB ]
    For Remote Interface [ calculator ] method [ dollorToRs ]
    Error: No corresponding business method with matching return type was found for method [ dollorToRs ].
    Thanks in advance.
    Nagarajan

    In EJB home you have -
    public double dollorToRs (double dollars) throwsIn EJB you have -
         public double dollarToRs (double dollars)There is a spelling difference in the function name

  • While trying to import an Enterprise Javabean Model "No EJBs available"

    Hi,
    I´ve facing the following problem, it was working but suddenly it stopped.
    I´ve created an EAR project that contains an EJB project, the EJBs are add to the public part, at least all the java classes that I want to access and the ear has another public part that references to the EJB public part, when I try to import it on Web Dynpro trying to create e new Enterprise javabeans it says to me that:No EJBs available, in fact it shows the project that contains the ejb but when i check and go next to list the EJB files in that project it says: No EJBs available.
    Any idea of what is happeening?
    Thanks and regards,
    Eduardo

    Hi
    I think you forget one step : Copy the java bean that access EJBs into this web dynpro dc.
    [Help1|Using EJB in Webdynpro
    Best Regards
    Satish Kumar

Maybe you are looking for

  • How do I put a shot cut to my desktop from amazon website?

    I want a link of Amazon homepage on my desktop and can't figure out how to do it.

  • GOP VBIOS for GTX 770 TF 2GD5/OC

    Can I get a GOP VBIOS for the GTX 770 TF 2GD5/OC please? S/N is 602-v282-28sb1307072124. Thanks.

  • Several JVMs in one server

    Hi all, In our test environment, we need to deploy our application several times to run on several db. If we create several server (ex : weblogic/myserver1 and weblogic/myserver2) do they will use the same jvm? If yes, is there a way to run them in s

  • Create png/ultimately .gif from a file list

    I have a number of images in my site that I would like to create a label (gif) for. i.e. filename=george.jpg I'd like to create a small gif to insert under the image that says "george". I have used file monkey to get a list of all my images.... is th

  • Multiple speakers without multiple expresses

    Is there a way to have a mac-mini control many speakers with iTunes without the hardware burden and radiation burden of many airport expresses? I wired up my house with lots of speakers all over the place, and the wires all go to one location. Ideall