J2EE Architecture (EJB)

I have become increasing disillusioned with J2EE and EJB�s in particular. I am no longer sure what they are trying to achieve and how the �objectives� are implemented. Writing the simplest EJB by hand is time consuming. Using something like XDocolet produces mountains of �Pseudo-Code� in comment blocks. The very idea of using comments in code to write code seems perverse to me. Surely comments are for comments and code is for code. After all this what is generated? The simplest of SQL statements. What are the benefits ? More efficient code ? More robust code ? Easier to maintain code ? More portable code ?
Would somebody care to point out what I am missing ?

Excellent thoughts, Annie, as usual.
Performance and learning curve seem to be the biggest complaints about J2EE and EJBs.
I think stateless session and message beans are winners. Entity beans are the red-headed stepchildren: nobody seems to like them much, even with local interfaces. There is so much disagreement about how to handle persistence in Java (e.g., raw JDBC, JDO, O/R mapping, CMP, etc.) that how to "best" handle it is still open to question.
I'm not aware of the same level of thrashing in the .NET community. (I'm not aware of much in the .NET community.) How have they solved the O/R impedence mismatch to everyone's satisfaction?
Scott Ambler wrote some terrific papers about O/R mapping. I'll have to go back and re-read them to see if I can figure out which of the competing persistence technologies best address the problem.
The whole point of J2EE and its containers, IMO, is that the smart developers who write the container relive mere mortal programmers like me from writing a lot of difficult plumbing. The container worries about threading, transactions, persistence, clustering, security, and all sorts of other things that I'd have to write a lot of code to reproduce without it. (Or worse, just leave it out and hope for the best.) I think that's still a worthy thing to do. The trick is to take as much advantage of the container as you can without distorting your application's design or compromising its performance.
EJB 3.0 is debating this again. POJOs sound like they'll be much more prominent. It'll be interesting to see where this goes.
Personally, I'm astonished at how complex entity beans and persistence are in J2EE. Entity beans map to database rows, but that's not a good match for the set-like SQL and relational databases. Remote entity beans are a disaster: Do I really need a remote call for each and every field? Local interfaces help, but we still need the Session Facade Pattern, DTOs, all kinds of machinery just to get a bloody value out of a database and into a JSP. How much layering is too much?
%

Similar Messages

  • J2ee architecture/framework books/pointers

    hello,
    can you suggest me some good j2ee architecture as well as books/pointers?
    thanks

    There are more than one way to do all this, depending on your particular application:
    - servlet's init() method, if it's a Web application
    - JMX MBeans
    - EJB Timer service or some other job scheduling like Quartz
    - batch programming (Unix shell + cron, or Win batch)
    - etc...
    Also, EJB is merely one technology inside the J2EE stack. You can use J2EE without EJB, and in many cases, this is the best option.
    Sun's J2EE tutorial.

  • J2EE Architecture!

    Hi All,
    I know that J2EE architecture is multitiered distributed architecture consisting of Client tier, Business component( Web components + EJB) and EIS or database at the back end. Looking at this architecture, the Client is nothing more than a user's Browser that is, IE or Netscape etc. Now why do we consider these IE or Netscape or any browsers as a client tier as if we develop them? I would appreciate if you could educate me.
    thanks.

    Hi All,
    I know that J2EE architecture is multitiered distributed architecture consisting of Client tier, Business component( Web components + EJB) and EIS or database at the back end. Looking at this architecture, the Client is nothing more than a user's Browser that is, IE or Netscape etc. Now why do we consider these IE or Netscape or any browsers as a client tier as if we develop them? I would appreciate if you could educate me.
    thanks.

  • Error converting j2EE-Specific ejb xml to object representation

    I am trying to webservice using Sun one. I got four entity beans and two sessions. I exposed the business of the session beans as webservice function.
    I tested the individual sesion beans they are working fine.
    When I created a webservice, and when I am trying to deploy the web service the follwing error occured.
    I tried to run the verrfier tool, but is not loading the file...it s getting stucked up.
    Here,
    BSApp -- J2ee application in which webservice is included
    BSManagerContrl --- is one of the two session bean which i created
    Book -- is the entity bean
    I also checked the module of the session bean to verify whether i included the Book enity bean or not. Other wise I would i successfully tested the session bean.
    Thank you
    [b][b]Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- Failed to load
    deployment descriptot for BSApp
    Cause: Error converting j2EE-Specific ejb xml to object representation
    BSManagerContrl_EJBModule.jar
    app_BSApp BSManagerContrl_EJBModule
    Referencing error: This bundle has no bean of name [Book]
    <ejb><ejb-name>Book</ejb-name><jndi-name>ejb/Book</jndi-name><pass-by-refernece>false</pass-by-reference><cmp><mapping-properties>

    Hi parsuram,
    Its not coming up anymore. All i did was re-map the table under Sun AS Mappings under properties for the EJBModule. Its really strange. Thanks a lot for your concern. I really appreciate it.

  • Java & J2EE Architecture & Development

    can soomebdy provide me a link to a pdf on Java and J2EE architecture and development in XI .
    Thanks in advance ,
    divya

    Hi,
    XI-J2EE for Java programmer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7bf6e190-0201-0010-83b7-cc557eb76abe
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ee7fa790-0201-0010-5aac-a0b2f0e94982
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c1311203-0701-0010-dba2-9f42e9a74ea9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0482c490-0201-0010-cc9c-91c5a538a0a6
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/13926f23-0a01-0010-149c-c1170e7a25db
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/423f5046-0a01-0010-2698-b2dc7c3185f1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7ac6ae90-0201-0010-50b4-f71fa2cc271a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0332d790-0201-0010-46b1-a0530fe87c1fhttps://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c75ee690-0201-0010-7baf-af868a642918https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/13d02057-0601-0010-abba-be4a86d47f9e
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0f00c890-0201-0010-beb2-c96050edc426
    Regards
    Chilla..

  • 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

  • J2EE Architectural Design Solution Needed

    Hi,
    I am coming up with an issue in designing the application architecture. It would be great if some one suggest solution for the problem.
    The basic flow of application:
    1. Client initiates a transaction from a Portlet.
    2. Portlet invokes business service component (Coarse grained Stateless Session Bean) by passing XML document.
    3. Corse grained SLSB process the incoming XML and invoke local session beans by passing relevant Document objects built by using service API.
    4. Based on Incoming Message, message splits and placed on multiple destinations (Linked by Message Queues) hosted on Enterprise Service Bus (ESB).
    5. A Message driven bean listens to the incoming request at Queue and invokes external services/Web services
    6. Response xml is built and placed Response Queue in ESB by invoking business service API.
    6. A MDB listening to the Response Queue will process outgoing messages which needs to be routed to original request invoker.
    The Messages are linked with correlation ID and request and response are tied by some rules and business logic.
    The design problem I am facing now is, how do my client waits till response comes from response queue as application need to give response to the client in synchronous manner.
    The other issue is some of the incoming requests need to be executed (placing in queue) in orderly fashion and run in a transaction. (Which I am trying to process them as command Lists in prototype using Message sets and flows in MQ, but is there any implications if try to push this logic to J2EE container)
    Thanks,
    Madhu Palutla

    I think that you need not worry about the client waiting for the response..since this is a simple request response cycle and is synchronous...thus the invoker need to wait for the response anyway.
    Secondly, I hope that you would definitely carry the points 4,5, and 6(the actual 6
    ) in a transaction, the option to choose the programmatic or declarative always remains on you.

  • Starting up j2ee and EJB deployment tool on Windows 98

    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

    You're going to have a lot of pain unless you upgrade to Windows 2000 or XP.
    In the mean time, set your environment size much larger (google for "Out of
    environment space") and use WinOne from http://www.cia.com.au/luke/ ...
    that's how I scraped by on Windows 98 for a while.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Tim" <[email protected]> wrote in message
    news:[email protected]..
    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

  • J2EE without EJB

    hello
    i want to ask how can i use the J2EE container without implementing EJB's. i just want to use servlets, JSP, and classes. is this possible and how can i find info about this. thanx
    Feras
    [email protected]

    Hi Feras,
    The purpose of a J2EE container (such as OC4J) is to execute J2EE applications. A J2EE application is comprised of modules. There are basically two types of modules: "client" and "ejb". A J2EE application can contain any combination of modules -- therefore it may only have a single "client" module (and no "ejb" module -- for example).
    Have you not read the available documentation? For the latest version of OC4J, the documentation is available from:
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/index.htm
    And there is also the J2EE specification and related documentation, that is available from:
    http://java.sun.com/j2ee
    Hope this answers your question.
    Good Luck,
    Avi.

  • Appreciating J2EE Architecture

    I was asked a question in an Interview, I did not give a convincing answer. I request for a Convincing answer:
    Question: How do you appreciate J2EE Architecture

    Just putting my thoughts..
    The ultimate goal of this is Customer Satisfaction. Customer can be Software architects, Developers or the most important END USER. J2EE has advatages in all the three category.
    For architects..
    Nothing much to say, cuz I am developer and I haven't yet designed a complete system yet. Since the Containers take care of the complex issues like resource pooling, Transaction management, Security Issues and other low level jobs, it just give enough time to concentrate on business logic. Also the componentisation and platform independace helps in concentrating on specialising in software development roles like Web Component Developers, assembler, administrator and so on.
    Watch out for Web-Services, this will introduce one more specialisation area for Software Vendors.
    For Developers...
    Java is easy to learn, tame and use. :)
    J2EE, each component development, EJB, JSP, Beans, Servlets and so on..is a specialised job and although they are integrated, we can make them independent entities during development stage. Efforts to learn each of them, nothing more than few weekends. :)
    For End Users...
    XML, the back-bone of future IT. will make Any One, Any time and Any where usage of end products. J2EE has advantage in this end since it can be easily used for this scenario along with XML and related Technologies. We can have wide range of Clients i.e. users like thick client, browser, mobile, plamtop, and even land line phone. But the Back end application is SAME for all these.
    So I feel J2EE applications is just not "Write once and Run anywhere"... its Write Once, Run Anywhere, and Feel Everywhere. :)
    Cheers.

  • J2EE architecture question

    Suppose you have a distributed application consisting of a number (max 100) of webservers (Servlets/JSPs technology) which send information (e.g. a random number) to one central system (using EJBs). The central system receives the random numbers through a session facade and adds the contributions from the various webservers. When the total reaches a certain level, the central system needs to inform all contributing webservers of the new total.
    My question:
    - What is the best (simple, low-cost, easy to implement) way for the central system to inform the webservers?
    Options I've thought of:
    1. messaging (probably too complicated?)
    2. polling from the webservers (too much traffic?)
    3. central system invoking a Servlet on each webserver (is this practical?)
    Any comments will be greatly appreciated!

    1. messaging (probably too complicated?)Actually quite easy, especially since your app server probably already has a JMS provider. And, if all of your Servlet servers are basically running the same application (e.g. same deployments), you'll only have to write one MessageListener to be placed in the application.
    2. polling from the webservers (too much traffic?)Too much traffic, threading issues, wasteful of processing power - a whole host of problems with that approach.
    3. central system invoking a Servlet on each webserver
    (is this practical?)Then your main EJB application would have to "know" the address of each and every webserver - which gets you into a maintenance nightmare. Not practical at all...

  • Oracle Report in a J2EE Architecture

    Dear All,
    I have for this architecture:
    - Database Layer Oracle 8i in future 9i
    - Application Server Tomcat
    is possible to integrate this architecture with a Oracle Report Server?
    If yes how to transform the architecture?
    Thank's bye

    Hi,
    Download samples of Web Services SDK code from link below
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    Web Services SDK -
    > Business Objects Web Services Java and .NET Code Samples-----> Download the Java code samples
    and go for sample code "viewReportWebi".
    This should help up.
    Thanks,
    Praveen.

  • Help needed. General question about J2EE architecture.

    Hello,
    On the one hand, I have a java class (actually a set of classes) that does a lot of low level input/output operations.
    On the other hand I have a web console in jsp/servlets.
    I want to be able to invoke a method on the "low-level" java app from the web console bearing in mind that the war will run on one computer on the network and the "low-level" app on another computer on the network.
    What is the best way to invoke a public method of the "low-level" app from the web console????
    Do I need to use RAR adapters?
    Any clue very welcome,
    Julien.

    There are a number of ways it COULD be done. What I would do would be to wrap the low level handler classes in web services that run in an application server on the other machine so that you could call them from the web application that you currently have.
    Among other things that maintains the isolation and integrity of your operations and prevents you from building a dependency between the two code bases.
    Hope this helps,
    PS

  • J2EE/JSP/EJB - ojvm debugging hangs

    I'm using JDeveloper version 10.1.2.0.0 (build 1811) at following enviroment:
    Server: Windows XP
    Client: Windows XP
    JAVA:1.4.2_04 that comes with Jdev
    I have the following problem:
    I have a project with *.jsp and *.java files when i try do debug a java file using
    the ojvm he get's to the breakpoint then if try to the debug using step over/step into
    the process hangs no exception and no coming back. If i use the others vm (hotspot, client or sever)
    Jdev doesn't hang. The problem only occurs where debugging with ojvm.
    When the debug process hangs no way to know what it's doing cause it's not
    possible to pause (cliking the debugger pause button there's no reaction) just stopping de
    process by cliking 2 times at the debug stop button.
    I changed from Jdev 9.0.5.16.15 to Jdev 10.1.2.0.0 (build 1811) same problem.
    Any help?

    I see. A logger is software that catches the fallout and presents it to you.
    Well, I'm slightly resistant because I can program this stuff OK, but I work from home .. there's no backup for me, no sysad to help. I've recently moved to Linux and I'm groping around it. So I fear a day or two of non-productive farting about trying to get a logger to work, and I could do without it.
    Then again, it can take me a good while to debug something blind.
    So. Any recommendation for a simple logger? Are they java or do they depend on the OS? Oh, and free/open source of course :-)
    Or, if anyone could tell me how to get my printlns to work that would be good too :-)
    J

  • EJB Isolation levels in ejb-j2ee-engine.xml

    Can anyone explain to me why I only seem to have the option of using the 'repeatable read' isolation level in Netweaver Developer Studio?
    I'm new to SAP and Netweaver but as a seasoned J2EE developer I would have expected to find read committed, read uncommitted, serializable, as well as repeatable read.
    Is there some SAP or Netweaver specific reason why I don't get to choose these options, or do I need to enable them by configuring properties somewhere?

    Hi Steve,
    The reason is that the J2EE Engine EJB Container supports Read Committed and Repeatable Read isolation levels and Read Committed is the default one. That's why you only have the option of specifying Repeatable Read.
    For more information on locking and isolation levels please have a look at these documents:
    http://help.sap.com/saphelp_nw04/helpdata/en/37/019b3e25f95f14e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a1/d81db94a10bc4b83b3f60b0e3037e7/frameset.htm
    Best regards,
    Vladimir

Maybe you are looking for

  • Is there a way to create a fade only for the first loop?

    I have a loop (Modern Guitar Rock 04), which I've extended out so it repeats four times. I select the Fade Tool and X-Fade for drag. I then drag just in front of the loop and onto it, which creates a fade. However, this also creates fades at the begi

  • Certain contact groups are not appearing in iTunes

    I am trying to update the contacts on my iPhone, through iTunes, from my iMac.  iTunes is not showing many of the groups that I have in my contacts and when I default to just syncing all of my contacts, it doens't actually synce them all.  How do I f

  • Custom Infotype for Org Management

    Hi Experts, I Iam trying to create custom infotype to capture some infomation on an Org Management custom object and I am not sure if I can do this through PM01 because this is neither employee or applicant info but custom object info. Any idea on ho

  • Missing cursors

    I'm running CS2 in Windows 7. I just got a new machine at work with Windows 7, and our IT group did the re-install. They said the re-install went just fine, and it works great, except, some of my cursors went crazy. The move tool, the crop tool, the

  • Struck In Installing Oracle eSSO Kiosk Manager!

    Hello guys, I am digging my head while installing Oracle eSSO Kiosk Manager(v-go passlogix Signon Manager). I downloaded the software ESSO bundle from OTN and started the installation as per the notes.In the Kiosk Manager Installation ,setup PDF whic