EJB Impressions?

Hi all,
I was hoping to get some feedback from you guys regarding the usefulness of EJB's in J2EE applications. I am currently researching this topic for a class I am taking. I've been reading the J2EE Tutorial, and all the relevant sections, as well as running the examples, and I think I'm getting a pretty good overview of how they work.
However, I have never actually used EJB's in a real world application. I only have some experience with JSP, servlets and JDBC. I was hoping some of you might provide me with your real-world EJB experiences/impressions. What are the pros, cons? What are the scenarios in which you would want to use them, and when (if ever) would you avoid using them?
Thanks a lot in advance.
Samantha

Pro: It's good to use EJBs when you are building a networked application with multiple computers. Using J2EE and EJBs gets the app online much sooner, and keeps it scalable.
Con: If your app is going to stay within the capacity of a single server EJBs could be overkill
Pro: J2EE (EJBs) supports communications between systems by different manufacturers
Con: If all your app components come from the same vendor, you may not need this capability
Pro: An EJB container can enforce security restrictions on access to data based on user types.
Con: If your app doesn't deal with sensitive data - or you have other options for security you might not want an EJB
Pro: EJBs can provide for storing and restoring of the vital data of an EJB object - which makes it appear that the object is always available.
Con: Other options could be an OO database.
Pro: As the J2EE standard becomes more accepted there are more companies that are creating toolkits that simplify interfacing and creating EJB components
Con: The functionality that you need might be available off the shelf - but at a high cost.
Pro: An EJB container can provide management of transactions so that equipment failure can not corrupt a database.
Con: If your app doesn't involve database transactions - or your transactions aren't critical - you may not need this capability
Overall Experience:
I've used EJBs for working with communications and databasing with sensitive information. Other methods don't provide the security - or guaranteed data quality. EJBs can be used among several applications that are needing the same functionality - including security.
So, for security and data integrity EJBs are often the way to go.

Similar Messages

  • How to upgrade web app to J2EE compliant, EJB, etc.

    I support an application that was designed and created before the EJB 2.0 spec
    came out. It was built by a regional consulting company, who used their own application
    framework instead of EJB stuff. Their framework mainly consists of classes to
    handle transactions, JDBCconnections, and what is basically their equivalent of
    an EJB, called a Domain Object. The framework is actually pretty impressive and
    works quite well.
    I'm trying to evaluate whether it would be worth 'upgrading' the entire application,
    to use EJBs and other things to make it J2EE compliant. I've worked with JSPs
    and servlets for a couple years, but I've no experience with EJBs. I've pieced
    together an extremely simply stateless-session bean and have been able to use
    it on a JSP, but now I'm trying to get entity beans working, and can't find any
    examples or tutorials of how to invoke, load, create, etc. an EJB in a JSP/servlet.
    Can anyone recommend a resource for this? I've just ordered the latest Enterprise
    Java Beans book from OReilly, but I didn't know how much that had on actually
    using EJBs within JSPs and servlets.
    Thanks

    Hello Karthik,
    I just tried to solve my problem with your suggestions, unfortunately, my JSP channel still doesn't work :(
    The portal server keeps reporting "Server Error..." when I tried to add query at the end of the href.
    Do you still have any other suggestions?
    Thank you

  • Using EJBs in Web Dynpro Applications

    I have recently started to develop Web applications using the Web Dynpro framework. Coming from a pure J2EE world, I must admit that Web Dynpro has a few innovative features that I find interesting for user interface development. The use of component & view contexts, for example, is not unlike the ActionForms that one may find in a Struts application, but pushed a bit further. No complaints here.
    What I do have some problems with is the whole CommandBean paradigm that is put forth by SAP (refer to the document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20ejbs%20in%20web%20dynpro%20applications.pdf">Using EJBs in Web Dynpro Applications</a>).
    I do understand the usefulness of defining a model that will be used to generate and eventually bind to Context data structures. That's fine. What I do object to is the use of a so-called CommandBean to play that role. Again, coming from a J2EE world, I am familiar with the BusinessDelegate pattern - which would typically be used by a client application to invoke business logic on the server side. I would propose that a better, cleaner way of integrating EJBs with the Web Dynpro framework would be to use a BusinessDelegate for invoking business logic, and importing a separate and distinct ModelBean (instead of a CommandBean) to be used for defining and binding to Context data.
    I have built one Web Dynpro application thus far. Instead of using a CommandBean, I created a ModelBean that extends my business object DTO (Data Transfer Object) (which is quite appropriate for that role, given that it implements all the get & set methods that are required for the business data that I need to model). My Web Dynpro application also makes use of an independant BusinessDelegate that is packaged with my EJB DC - this is a standard best practice on J2EE projects. I have been asked by the people working with me to modify this architecture to bring it more in line with the SAP way of doing things. I am open-minded and willing to learn and accept new ways of thinking and doing things. However, I fail to understand the usefulness of merging structure and behaviour by resorting to CommandBeans:
    - <b>It violates the MVC paradigm</b> by having one object (the CommandBean) serve as both model AND controller as far as the Web Dynpro application is concerned. The CommandBean is obviously a model - since it is literally imported as such into the Web Dynpro application. It is ALSO a controller from the Web Dynpro's application perspective, since all calls to the back-end go thru the CommandBean via one or more of its execute_xxx methods. In contrast, the use of a business delegate by the Web Dynpro application clearly separates the model (the CommandBean... or rather, a more suitably named ModelBean) from the controller (BusinessDelegate).
    - <b>Doesn't carry its own weight</b>. In other words, I haven't yet been provided with any valid justification for going thru the extra effort of coding the CommandBean's execute methods. It's been proposed to me that it somehow serves as an abstraction layer between the Web Dynpro application and the business logic. I would argue that it is the BusinessDelegate's role to abstract away the back-end logic from clients. If one does have a BusinessDelegate available, I would argue there's no need to code execute methods in a separate CommandBean. To prove my point, I would simply point out that all of the CommandBean examples that I have seen so far, either in How-To documents, or in production code, all follow the same pattern....
    CommandBean.execute_doSomething() calls BusinessDelegate.doSomething()
    Not a heck of an "abstraction" layer... I would in fact argue that it is worse than useless. If some major change occurs in the business logic that requires changing the doSomething() operation, we expect of course to modify the BusinessDelegate. The Web Dynpro client will also presumably need to be modified - that's to be expected, and unavoidable. But then, we'll also need to go about and change the CommandBean's execute_doSomething() method - again, extra work for no apparent benefit. Adding and removing business methods has the same implication. All this for an layer that simply adds the prefix execute_ in front of all business method calls... Is this "abstraction layer" worth the cost of creating and maintaining it ??
    - <b>Unnecessarily complicates error handling</b>. I have been told that for technical reasons, it is recommended that all exceptions thrown by the CommandBean be of type WDException or WDRuntimException. But what if the client application needs to react differently to different failure scenarios ? When I create a business object, I might wish to provide the user with an error messages if connection is lost to the backend, and with a different error message if an object already exists in the database with the same attributes. In order to do that, I will have to catch the WDException, extract the cause, and continue processing from there... possible, yes, but clearly less standard and more labor intensive than the classical try/catch mechanism.
    To say nothing about the fact that SAP's own API documentation clearly states that applications using Web Dynpro can reference and catch WDExceptions, but THEY MUST NOT THROW OR EXTEND IT !
    - <b>Produces unnecessary DCs</b>. Page 6 of the aforementioned document presents an architectural view of a Web Dynpro project that uses a CommandBean. Why an extra DC for the CommandBean ?? I created my ModelBean class right inside the Web Dynpro project (in the Package view). That, to me, is where this class should reside, because it is created for no other reason that to be used by this particular Web Dynpro application. What is the benefit of placing it in its own independant DC ?
    - <b>Not a typical application of the Command pattern</b>. The well-documented command pattern (Design Patterns - Gang of Four) has been devised mainly to enable encapsulation of request as objects, thereby making it possible to:
    - specify, queue and execute requests at different times
    - decouple execution of a command from its invoker
    - support undo operations
    - support logging changes so that they can be reapplied in case of system crash making it possible to assemble commands into composite commands (macros), thereby structuring a system around high-level operations built on primitive operations.
    None of this applies to the way the SAP CommandBeans are being used. Not that much of an issue to people new to J2EE and/or OO development... but quite confusing for those already familiar with the classic Command pattern.
    At this point, I fail to understand the advantage of merging structure (model) and behaviour (execute methods) through the use of a unique CommandBean object. Am I missing something ?

    Hi Romeo,
    You would be disappointed, this reply ain't anywhere nearby to what you are talking about...
    I wanted to mail you, but you have not mentioned your email in your profile.
    I am really impressed by your flair for writing. It would be far better had you written a blog on this topic. Believe me, it would really be better. There is a much wider audience waiting out there to read your views rather than on the forums. This is what I believe. To top it, you would be rewarded for writing something like this from SDN. On the blogs too, people can comment and all, difference being there you would be rewarded by SDN, here people who reply to you would be rewarded by you. Doesn't make  much a difference.
    Anyways the ball is still in your court
    As far as I am concerned, it has still not been much time since I have started working on Web Dynpro. So can't really comment on the issue...
    Bye
    Ankur

  • Start order between WTC server and EJBs provides exported services

    Using WLS 10.3.0 and Tuxedo 11.1.1.2.0 (32-bit) with WTC as the communication bus between the 2 platforms....
    Running load balancing/failover inside Tuxedo using the cluster setup as described by:
    http://docs.oracle.com/cd/E13222_01/wls/docs81/wtc_admin/Cluster.html#1110847
    and got WLS rigged in a cluster with 2 nodes (managed servers) on separate machines. When I take down and up one of the nodes soft (with start/stop scripts) everything works fine during shutdown but not upon starting. What I think happens is that the WTC server starts first before the EJBs that provide exported services. In the Tuxedo log a connection is first established then a ton of TPENOENT until the EJBs get going. Any way to reorder these resources during start up? So that the EJBs are ready first prior to the WTC server?
    mvh / Matthew Young

    Q8. What versions of Tuxedo are supported?
    A8. WTC 1.0 will support Tuxedo 6.5 and Tuxedo 8.0. WTC 1.1 (which adds
    CORBA support) will support Tuxedo 6.5 and Tuxedo 8.0. Soon after the
    release of both of these products we will certify WTC with Tuxedo 7.1.
    However, the version of Tuxedo 7.1 you will need to have will be Tuxedo 7.1
    after a certain patch level, which I don't know the number of yet. I will
    attempt to keep the public informed about which patch level will be required
    in Tuxedo 7.1
    Q9. What WLS Releases will be supported?
    A9. WTC 1.0 will be certified on WLS 6.0 SP2, WTC 1.1 will be bundled with
    WLS SilverSword release (6.1?)
    Q10. How will WTC be packaged?
    A10. WTC 1.0 will be a separately downloaded binary (one for unix, one for
    NT) that the user will have to install and configure in his/her WLS
    environment. (Configuration will consist of putting the jatmi.jar file into
    the classpath (as well as the normal BDMCONFIG configuration, of course)).
    WTC 1.1 will be bundled right in there with the WLS SilverSword release.
    Q11. When will WTC go live (no more beta)?
    A11. This is a question for Jeff Cutler, but my impression is that WTC 1.0
    will be shipped in the same time-frame as the Tuxedo 8.0 release and
    obviously (see A10) WTC 1.1 will be shipped with WLS SilverSword.
    John Wells (Aziz)
    [email protected]

  • GetResourceAsStream problem in a EJB JAR

    Hello,
    I am trying to get a xml file from the same JAR file my EJB's are
    bundled in on 6.1. Its not in the WAR file but the EJB jar file.
    I've been trying to use:
    getClass().getClassLoader().getResourceAsStream("www.xml")
    and various different versions of this (using "/www.xml')
    I've tried placing the xml file in the root of the JAR file and in the
    same package as the class. I get the impression that its always
    looking in the weblogic class path, and not the classloaders. (it
    works if I place the file in the Weblogic6.1 dir)
    Has anyone managed to retrieve file resources from their EJB JAR
    files? If so how?
    Thanks

    I do this by placing the resource file in it's own .jar file. Then place that .jar file in the .ear file with
    the ejb .jar files. Then put the resource .jar file in the classpath using the Class-Path: manifest directive
    in the ejb .jar files. Then you can use this.getClass().getResourceAsStream("/foo.xml") in the ejb bean
    class.
    I've never tried it by placing the resource file in the ejb .jar file. I would think it would work, but
    apparently not?
    Bill Kemp
    BEA
    Wayne wrote:
    Actually I tried this and it doesn't seem to work. I imagine its
    becuase the EJB classloader can't see the resources in the WAR file?
    Remember I'm trying to load the resource from an EJB JAR file not a
    WAR file.
    Any idea's how I could do this?
    thanks
    Rajesh Mirchandani <[email protected]> wrote in message news:<[email protected]>...
    If the file is in WEB-INF/classes within your WAR it should work if you
    execute
    this.getClass().getClassLoader().getResourceAsStream("www.xml");
    Wayne wrote:
    Hello,
    I am trying to get a xml file from the same JAR file my EJB's are
    bundled in on 6.1. Its not in the WAR file but the EJB jar file.
    I've been trying to use:
    getClass().getClassLoader().getResourceAsStream("www.xml")
    and various different versions of this (using "/www.xml')
    I've tried placing the xml file in the root of the JAR file and in the
    same package as the class. I get the impression that its always
    looking in the weblogic class path, and not the classloaders. (it
    works if I place the file in the Weblogic6.1 dir)
    Has anyone managed to retrieve file resources from their EJB JAR
    files? If so how?
    Thanks

  • Basic auth interop problem, servlet WS works, EJB WS not (Sun AS 8)

    After spending some time I managed to add HTTP basic auth to a simple web service. I have implemented two variants, an JAX-RPC servlet web service and an EJB web service.
    A (Sun) JAX-RPC client works pretty well against both web services. I do the required steps with the stub (set user/pwd) and things work. I do get the correct principal in the server side, fine.
    When I do NOT set the authentication properties at the stub, the servlet based WS responds something like HTTP error 403 (?) or so, which leads to "authentication required". The EJB based response is not that adequate, it's something like "internal server error, EJBLocalAccessException or so" but from the given message you could get the idea what's wrong.
    Anyway, I got the impression that this stuff
    return HTTP error to flag "auth required"
    is not happening for some reason in my EJB based web service. I found this problem in Sun AS 8 and I think it's the same problem when I test stuff with Oracle's OC4J ...
    Some client implementations have obviously problems to get the idea that user authentication is required. In other words, the clients cannot invoke the EJB WS. I tried it with Perl Soap::Lite, MS SOAP Toolkit 3.0 and MS .Net 1.1 stuff. All this clients work well (with authentication) when I consume the servlet based web service. But the EJB based web service is not working at all. I do get there just "not allowed" and the SOAP client runtime is not handing over any user credentials (because it's obviously not correctly asked for it by an appropriate AS response).
    Anyone else experienced this problems with EJB WS???
    Interesting question: why is the JAX-RPC client working? Is it sending the properties set at the stub in any case? Or do they "handle" the internal error coming from Sun AS explicitly or so? Strange, in a way. :-)
    Thanx for any help here!
    Merten

    I guess the reason was that I wrote
    <login-config>
    <auth-method>Basic</auth-method>
    </login-config>
    instead of required
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    At deploy time, I got no error message. At usage time, I just got this AccessLocalException. That's not really nice ...
    Merten

  • Please Help me Xdoclet CMP EJBs weblogic 8.1

    Hi all,
    I am new to both xdoclet and weblogic.
    I have confusion about foriegn-key-column and key-column in @weblogic.column-map tag for many to many relationship
    I have many to many relationship between Order EJB and Item EJB. join table name is OrderLine.
    In Order EJB I have cmr method
    public abstract java.util.Collection getItems();
    which one @weblogic.column-map tag is correct? is foriegn-key reference from Order table to OrderLine table or OrderLine table to Order table. My impression is it is from OrderLine table to Order table. Just want to confirm it.
    1)
    public abstract class OrderEJB implements EntityBean {
    * @ejb.interface-method
    * view-type="local"
    * @ejb.relation
    * name="OrdersItems"
    * role-name="Order"
    * @weblogic.relation
    * join-table-name="OrderLine"
    * generate="false"
    * @weblogic.column-map
    * foriegn-key-column="order_itemId"
    * key-column="orderline_item_id"*
    public abstract Collection getItems();
    Or
    2)
    public abstract class OrderEJB implements EntityBean {
    * @ejb.interface-method
    * view-type="local"
    * @ejb.relation
    * name="OrdersItems"
    * role-name="Order"
    * @weblogic.relation
    * join-table-name="OrderLine"
    * generate="false"
    * @weblogic.column-map
    * foriegn-key-column="orderline_itemId"
    * key-column="order_item_id"*
    public abstract Collection getItems();
    My second question is suppose I have composite foriegn-key, in that case how will I define @weblogic.column-map tags,
    will it be something like this?
    public abstract class OrderEJB implements EntityBean {
    * @ejb.interface-method
    * view-type="local"
    * @ejb.relation
    * name="OrdersItems"
    * role-name="Order"
    * @weblogic.relation
    * join-table-name="OrderLine"
    * generate="false"
    * @weblogic.column-map
    * foriegn-key-column="fk_col1"
    * key-column="pk_col1"*
    * @weblogic.column-map
    * foriegn-key-column="fk_col2"
    * key-column="pk_col2"
    public abstract Collection getItems();
    Thanks in advance

    Create a web application, put you JSP in the web application, put the web application in the server. And Robert is you Father's Brother.

  • EJB ot Struts

    Hello!
    We have to develop web based complex application that will be accessed by user over internet.
    No page should take more then 10 sec to download.
    We have two options
    (1) JSP + Servlet + EJB
    (2) JSP + Servlet + Struts
    If both solutions implemented in most optimized way, which one be the fastest?
    I have impression that Struts is bit slower then EJB.
    Reg,
    Chetan

    there is no OR there.
    Comparing EJB and Struts is like comparing roads and
    cars.Exactly. EJb is a methodology to develop business components that require transaction support, security levels, asyncronous messaging etc.
    These are but a few rqeuirements you should find answers for within the context of your requirements/project.
    Struts is a framework that's used to build web-applications.
    In short, the issue is not limited to speed (Is struts faster or ejb faster, in which case, almost all real time applications would have been developed on struts alone :))
    Its more a design / scalability /robustness/ development time /rampup curve / maintainability etc question.
    my 2 cents..
    cheers,
    ram.

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Alteração dos layout's de impressão padrão do SAP B1

    Pessoal, bom dia.
    Gostaria de saber como faço para incluir um novo dado em um layout padrão do SAP B1, por exemplo: Fluxo de Caixa.
    Toda vez que tento incluir ou alterar qualquer campo o layout traz informações que não tem nada a ver ou repete em todas as linhas.
    Eu queria alterar por exemplo, no Fluxo de Caixa, que ele traga o Nome do PN e não o código do PN.
    Agradeço desde já.
    Abraços,
    Antonio Melo

    Danilo,
    A questão é que os campos demonstrados no layout de impressão do fluxo de caixa não demonstram de quais tabelas sao os campos.
    Criei um novo campo e o relacionei ao campo Código do PN. Ele me trouxe como resultado o nome do meu primeiro PN cadastrado no sistema para todas as linhas, ou seja, trouxe errado.
    Continuo na mesma.
    Abs,
    Melo

  • Impressão de Cheques - Padrão Brasileiro - SAP Business One v. 8.8

    Olá Experts!
    O Layout de impressão de cheques default do SAP Business One 8.8 que está pré configurado no PLD imprime cheques nos padrões brasileiros? Ou tenho que customizar o PLD para imprimir os cheques?
    Muito obrigado,
    Ricardo Vieira

    Resolvi o problema alterando o PLD dos cheques.

  • How can connect different ejb server in one client program

    hi , every
    i want to make connect ejb server into one client program.
    for that , but i try to change PROVIDER_URL property , it's not correct
    who solve this problem for novice? :(

    You need to create separate initialContext to each of the different servers
    and lookup up the different ejbs.
    -Sabha
    "inking" <[email protected]> wrote in message
    news:[email protected]..
    hi , every
    i want to make connect ejb server into one client program.
    for that , but i try to change PROVIDER_URL property , it's not correct
    who solve this problem for novice? :(

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • Error connecting to an EJB 3.0 Remote on OC4J 10.1.3.2 from Tomcat

    Hi, I want to connect to a Remote Session Bean running on the OC4J 10.1.3 and it doesn´t work.
    I have connected to it from a java standalone application using:
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    System.out.println(sessionEJB.mergeEntity(""));
    System.out.println( "hola" );
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Standalone OC4J connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "passw" );
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/ejb3jar");
    return new InitialContext( env );
    with this application-client.xml file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Model-app-client</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
    <ejb-link>SessionEJB</ejb-link>
    </ejb-ref>
    thats works fine, but when I try to use the same solution from a jsf proyect running on a Tomcat 5.5.20, it fails with this error:
    Caused by: java.lang.RuntimeException: Error while creating home.
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:32)
         at ar.com.mcd.fawkes.ui.locator.ServiceLocator$1.get(ServiceLocator.java:12)
         at net.sf.opentranquera.web.jsf.locator.ServiceLocatorBean.get(ServiceLocatorBean.java:42)
         at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
         ... 80 more
    Caused by: javax.naming.NameNotFoundException: Name ejb is not bound in this Context
         at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:28)
         ... 87 more
    Could you please help me with any tip?
    Mauricio
    Message was edited by:
    Mauricio

    Hi, Rick
    Thanks for your help.
    I deleted de application-client.xml file, added the following lines to the web.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
         </ejb-ref>
    and now I´m using oracle.j2ee.rmi.RMIInitialContextFactory
    there is no error, and it doesn´t throw any exception but the following line returns null.
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    Its seems the lookup method finds the remote ejb because it doesn´t fail, but it returns null.
    Any idea what is wrong?
    Mauricio.

  • Error in deploying a simple EJB 3.0

    Hi ,
    I am getting the following error while deploying my simple ejb of version 3.0 in Weblogic 9.2.
    Exception preparing module: EJBModule(build) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Error processing annotations: java.lang.NullPointerException.
    During my evaluation of Weblogic 9.2 for EJB 3.0 , I have got the following questions.
    EJB Specification states that EJB's in EJB 3.0 can be developed and deployed without the need of deployment descriptors. I have created a simple EJB with two file Env.java and EnvBean.java and the source code is given below.
    a) I just complied these class files and when I was trying to deploy without ejb-jar.xml and weblogic-ejb-jar.xml, the console was not at all allowing me to deploy.Why is this so?
    b) After I created a META-INF file under root of classes directory by placing ejb-jar.xml with empty <enterprise-beans> element, console was allowing me to deploy with errors in parsing ejb-jar.xml. The error was either session/entity/mdb is a required under <enterprise-beans> element. Why is this required when there are several examples stating <enterprise-beans> element can be empty.
    c) Later I updated ejb-jar.xml with <session> element under <enterprise-beans> with the following values. I got the above error when deployed with this change.
    I had been struggling to deploy this simple bean for almost a day.Pleas point me if there is any documentation that solves my stated problem or if there is a solution.Thanks in advance.
    regards
    Karim
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <session>
    <description>This is the stateless ejb</description>
    <display-name>Env Bean</display-name>
    <ejb-name>EnvBean</ejb-name>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Env.java
    package examples ;
    public interface Env {
    public void display();
    EnvBean.java
    package examples;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless
    @Remote(Env.class)
    public class EnvBean implements Env {
    public void display() {
    System.out.println("Welcome to EJB 3.0");
    }

    Presumably you're using the EJB3 tech preview, and not a vanilla WebLogic 9.2 install, right?
    Can you post the full stack trace?
    -Patrick

Maybe you are looking for

  • Extended Classic Scenario-Replication of Local PO to R/3 fails

    Hi, In the Extended Classic Scenario (SRM4.0/ECC5.0),we are creating Purchase Order from the Sourcing Cockpit. Local PO is getting created , but is not getting replicated to Backend R/3. After debugging through BBP_PD_PO_TRANSFER_EXEC , noticed that

  • [solved]jack won't start... :(

    Hi there So here's my first topic in this forum I would love to record some ideas with ardour, but I can't get jack running. I use qjackctl as interface, the settings used to work some weeks ago, when I recorded the last time I tried both running qja

  • MultiCube Queries - Inventory

    I have built a multicube which includes the daily load inventory cube and a snapshot inventory cube.  The idea for this is that I am building a workbook which will include the daily stock overview query and a monthly stock overview query. In order to

  • LR3 trial version

    I downloaded the LR3 trial version and I cannot get into the program.  When I click on the icon on my desktop, it brings me to a screen that says to select a recent catalog to open, but there are no catalogs listed.  At the bottom of the screen, it s

  • CSS Sticky-table analysis

    We have a CSS 11503 at 7.4.2.02. It has a number of L3 Sticky rules. The users or rather their workstations are working 24 x 7. We would like to work out what is the best sticky-inact-timeout value to use so that we can gracefully close a server (wei