EJB & struts

iam a j2ee fresher working on EJB & struts
plz guide me which tutorial is good for EJB & struts
Right now iam studying from roseindia.net

While JSe tutorials do not talk address Struts, we do have tutorials that discuss how to create EJBs as part of a larger tutorial objective.
See the following URL, in particular Deploying and Executing a J2EE Application, and the tutorials on Session Beans and CMP.
http://developers.sun.com/prodtech/javatools/jsenterprise/learning/tutorials/index.html
You might also want to take a look at java.sun.com, where there
is information specific to EJBs, and to blueprints for creating EJBs
http://java.sun.com
http://java.sun.com/reference/blueprints/index.html

Similar Messages

  • EJB+struts or HIbernate ?

    Question 1:
    what do you use/choose and why:
    EJB+struts or Hibernate ?
    Question 2:
    Which is the best IDE for Hibernate?
    Thx.

    Question 1:
    what do you use/choose and why:
    EJB+struts or Hibernate ?Spring and Hibernate.
    Question 2:
    Which is the best IDE for Hibernate?IntelliJ is the best IDE for everything.
    %

  • EJB, Struts & Validating...

    Hi!
    I'm working with EJB using Struts.
    In my case I have, in my Form Class, a validation method to verify the form attributes (form fields) that is executed, as I understand it, automatically prior to doActionForward (in the Action class).
    Now, getting a validation failure, having set the desired error messages the application will respond back to what ...
    A piece of my struts-config.xml:
    <action path="/ManageReportedTime"
    type="systime.formaction.ManageReportedTimeAction"
    name="ManageReportedTimeForm"
    input="/jsp/employee/errors.jsp">
    <forward name="success" path="/jsp/employee/timereport-index.jsp"/>
    <forward name="error" path="/jsp/error.jsp"/>
    </action>
    The "input" key is the page receiving control after a validation error
    while "success" key is what to forward to when the action class methods is fulfilled without errors, finally the "error" key is the page to recieve control after a mapping.findForward("error") in the action class.
    Correct me if I'm wrong...
    The timereport-index.jsp ("success" key value above) is actually a frameset page containing four frames - three of them used to manage input and output of the form and one to show errors (the "input" key value) after validating.
    (I use the same form instance in all four pages)
    No i wonder if it's possible to have a different page to show validation errors while at the same time in other pages showing the form fields.
    The problem now seems how to target the frames in combination with setting the correct response pages in the xml file.
    Don't know if i stated the problem understandably, but hoping for the best
    /Rickard

    I do not understant way this question is in this section?
    Actually, you cannot define different pages in which you have show in different validation states(just one if validation was failed). But you can perform validation not olnly in form object but in action(may use some help class)- it is not good style when you use Struts framework, but the situation is not usual, and you can compromise.
    Good luck.

  • Toplink+EJB+Struts

    Validation Error
    You must correct the following error(s) before proceeding:
    * JBO-29000: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=Transaction was rolled back: Excepción [TOPLINK-6007] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.QueryException Descripción de Excepción: Falta el descriptor de [class cl.accs.pac.toplink.Parameters]. Consulta: ReadAllQuery(cl.accs.pac.toplink.Parameters); nested exception is: Excepción [TOPLINK-6007] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.QueryException Descripción de Excepción: Falta el descriptor de [class cl.accs.pac.toplink.Parameters]. Consulta: ReadAllQuery(cl.accs.pac.toplink.Parameters)

    Hi Viral,
    We did software loadbalancing for testing purpose and it did work with 9.0.3.In production environments you may need to consider Hardware Loadbalancer.
    The following link may give you some insight.
    http://download-west.oracle.com/docs/cd/B10464_05/core.904/b10495/toc.htm
    Hope this helps.
    Giri.

  • EJB, Hibernate, Struts

    I want to implement web based project for complex bussiness logic fo finance
    I thought of using EJB but somany people advise me to not use it because of its complexity
    and try for hibernate or Struts.
    so can you give me some views regarding to comparison between EJB,Hibernate,Struts
    or some points that help me to select one of them based on my requirement ?
    on which criteris I can do selection amoung them ?
    thanks in advance

    Question 1:
    what do you use/choose and why:
    EJB+struts or Hibernate ?Spring and Hibernate.
    Question 2:
    Which is the best IDE for Hibernate?IntelliJ is the best IDE for everything.
    %

  • Using DAO using a JDBC data source with struts

    Hello,
    I have created a number of Data Access Objects and Transfer Objects to use in a non EJB, struts web application I am developing. I had tested these with a kind of a Service Locator custom class to provide access to a JDBC connection. My custom class is a bit clunky and not very configurable. I would like to use a data source using the struts config XML file e.g.
        <data-sources>
            <!-- configuration for commons BasicDataSource -->
            <data-source type="org.apache.commons.dbcp.BasicDataSource">
                <set-property
                  property="description"
                  value="My MySQL Database Connection" />
                <set-property
                  property="driverClassName"
                  value="com.mysql.jdbc.Driver" />
                <set-property
                  property="url"
                  value="jdbc:mysql://localhost/databaseName" />
                <set-property
                  property="username"
                  value="myUsername" />
                <set-property
                  property="password"
                  value="xxxxxxxxx" />
                <set-property
                  property="maxActive"
                  value="10" />
                <set-property
                  property="maxWait"
                  value="5000" />
                <set-property
                  property="defaultAutoCommit"
                  value="false" />
                <set-property
                  property="defaultReadOnly"
                  value="false" />
             </data-source>
        </data-sources>This is great, and precisely the kind of thing I would like to use. However, this datasource is only available AFAIK through a HttpServletRequest instance like in the example I found below...
        public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                                     HttpServletResponse response)     throws Exception
            javax.sql.DataSource dataSource = null;
            java.sql.Connection myConnection = null;
            try {
             dataSource = getDataSource(request);
             myConnection = dataSource.getConnection();
             // do what you wish with myConnection
            } catch (SQLException sqle) {
               getServlet().log("Connection.process", sqle);
            } finally {
               //enclose this in a finally block to make
               //sure the connection is closed
               try {
                  if(myConnection != null)
                      myConnection.close();
               } catch (SQLException e) {
                  getServlet().log("Connection.close", e);
            return (mapping.findForward("success"));
        }That would be great if I wanted to use the database connection anywhere near a struts Action (wrong tier!). I want access like that to to a data source in my DAOs. Is it possible for me to use the data-sources aproach to access the DB from my DAOs or will I need to use something like JNDI to do this in a similar way but separate from struts. If so I have a big gap in my knowledge as far as JNDI goes which I need to fill and that will be my next question
    I'm relatively new to using patterns inn Java and any help or pointers would be great.
    Thanks :)

    Create a JAAS Authentication Entry in the Server configuration.
    This should then appear in the drop-down when specifying your DataSource.

  • Best technology for web service - jsp vs ejb

    Currently we have our project fully done in jsp and servlets.
    Now we have decided to bring out a new version of the product.
    We are in thought of ejb and struts replacing jsp.
    But we need to know the advantages and disadvantages between jsp,servlets and ejb,struts for our task..
    Can anyone help in this to make our thoughts to work..
    Thanks in advance ..
    Bye
    Pradhip

    don't waste time in asking others
    i think it is better to use jsp and servlets
    if you don't know struts it is very difficult to study and impliment know
    you start learn struts know i hope u can impliment next time
    start with small example
    reffer jakartha struts and struts in action books to guide

  • EJB:nested  exception is Java.lang.NullpointerException

    Our application is using WLS8.1 sp6 and developed based on EJB,Struts and J2EE.My problem is that the following exception
    "EJB Exception: ; nested exception is:
         java.lang.NullPointerException"
    is occuring sporadically over a week.I know why a NPE occurs but not sure what caused that NPE to occur sometimes and defer most of the times.
    Could anyone of you shed some light on this?

    Transaction was rolled back: java.lang.NullPointerException
    Is a value added for a NOT NULL column null?

  • How to fix the Error -500 issue

    Hi,
    I have developed an application using EJB, struts & hybernet with Database mySQL. This application delopyed in IBM Websphere which is at our LAN, but the problem is every day I have to restart the application. If it is not restart the application it is showing the error
    *“Error 500: ServletException in '/Tiles/Template.jsp': ServletException in '/Tiles/Header.jsp': null* ”
    I unble to fix this issue until yet. Please help how to fix this issue.
    Thanks
    Raghu

    Try to use some hardcode values instead of dynamic values in your JSPs and then check whether the same problem occurs or not.
    Edited by: S.A.Khan on May 11, 2009 10:39 PM

  • Setting transaction isolation upon enlistment for XA driver not supported !!?!!?

    Hi !
    I've been developping a simple webapplication with a few Entity CMP EJB, Struts
    and some JSP.
    I registred a Pointbase XA JDBC driver in Weblogic 8.1.
    When I want to create a new post in the database via one of my EJB, I get "Due
    to vendor limitations, setting transaction isolation upon enlistment for "Pointbase
    XA" JDBC XA driver is not supported".
    What do I have to add in my xml files to make it work ?
    Something with <transaction-isolation> in the weblogic-ejb-jar.xml ?
    I'll appreciate some help here...
    Extract of my code (CustomerEditAction.java):
    <<
    CustomerHomeLocal chome = (CustomerHomeLocal) Locator.getHome("CustomerHomeLocal");
    prop = chome.create(cform.getName(), cform.getAddress(), cform.getZipcode(), cform.getCity(),cform.getCountry(),
    cform.getEmail(), cform.getPhone(), cform.getHomepage());
                             And the error message and stack is:
    <<
    javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception
    is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: XA error:
    XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'CaciPool - Pointbase - XA': XAER_RMERR : A resource manager
    error has occured in the transaction branch javax.transaction.xa.XAException:
    start failed for XAResource 'CaciPool - Pointbase - XA': Due to vendor limitations,
    setting transaction isolation upon enlistment for "PointBase XA" JDBC XA driver
    is not supported. at weblogic.jdbc.wrapper.XA.createException(XA.java:104) at
    weblogic.jdbc.jta.DataSource.start(DataSource.java:631) at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1069)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1001)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:203)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1230) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1193)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:371) at weblogic.jdbc.jta.DataSource.connect(DataSource.java:329)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:1841)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.execGenKeyNamedSequenceTableUpdateAndQuery(RDBMSPersistenceManager.java:2392)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyPreFetch(RDBMSPersistenceManager.java:2174)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyNamedSequenceTable(RDBMSPersistenceManager.java:2147)
    at com.caci.ejb.CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.ejbCreate(CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.java:5403)
    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:324) at weblogic.ejb20.manager.DBManager.create(DBManager.java:1139)
    at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:1118) at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:171)
    at com.caci.ejb.CustomerEJB_6i2zhv_LocalHomeImpl.create(CustomerEJB_6i2zhv_LocalHomeImpl.java:133)
    at com.caci.ui.CustomerEditAction.execute(CustomerEditAction.java:58) at
    >>
    Regards,
    Olivier

    Hi !
    I've been developping a simple webapplication with a few Entity CMP EJB, Struts
    and some JSP.
    I registred a Pointbase XA JDBC driver in Weblogic 8.1.
    When I want to create a new post in the database via one of my EJB, I get "Due
    to vendor limitations, setting transaction isolation upon enlistment for "Pointbase
    XA" JDBC XA driver is not supported".
    What do I have to add in my xml files to make it work ?
    Something with <transaction-isolation> in the weblogic-ejb-jar.xml ?
    I'll appreciate some help here...
    Extract of my code (CustomerEditAction.java):
    <<
    CustomerHomeLocal chome = (CustomerHomeLocal) Locator.getHome("CustomerHomeLocal");
    prop = chome.create(cform.getName(), cform.getAddress(), cform.getZipcode(), cform.getCity(),cform.getCountry(),
    cform.getEmail(), cform.getPhone(), cform.getHomepage());
                             And the error message and stack is:
    <<
    javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception
    is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: XA error:
    XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'CaciPool - Pointbase - XA': XAER_RMERR : A resource manager
    error has occured in the transaction branch javax.transaction.xa.XAException:
    start failed for XAResource 'CaciPool - Pointbase - XA': Due to vendor limitations,
    setting transaction isolation upon enlistment for "PointBase XA" JDBC XA driver
    is not supported. at weblogic.jdbc.wrapper.XA.createException(XA.java:104) at
    weblogic.jdbc.jta.DataSource.start(DataSource.java:631) at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1069)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1001)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:203)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1230) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1193)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:371) at weblogic.jdbc.jta.DataSource.connect(DataSource.java:329)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:1841)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.execGenKeyNamedSequenceTableUpdateAndQuery(RDBMSPersistenceManager.java:2392)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyPreFetch(RDBMSPersistenceManager.java:2174)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyNamedSequenceTable(RDBMSPersistenceManager.java:2147)
    at com.caci.ejb.CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.ejbCreate(CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.java:5403)
    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:324) at weblogic.ejb20.manager.DBManager.create(DBManager.java:1139)
    at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:1118) at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:171)
    at com.caci.ejb.CustomerEJB_6i2zhv_LocalHomeImpl.create(CustomerEJB_6i2zhv_LocalHomeImpl.java:133)
    at com.caci.ui.CustomerEditAction.execute(CustomerEditAction.java:58) at
    >>
    Regards,
    Olivier

  • Java - PHP communication

    Hi,
    I'm quite new to EJB3 and going to build web application using (probably) EJB3 and Struts 2. My problem is, that I need to bound some parts of my new business logic with this older PHP website. I just need to call some simple Java methods (e.g. searching in db - pass on one or two parameters and get a result) from this PHP website. I've done some research and it looks like I should use Web services. There is a lot of materials for this topic in the web, but somewhere I've read, that web services are overkill for such the simple scenario. Is here any easier way to call Java business logic from PHP. Thank you very much for your answer.
    Edited by: esembaJ on 13.10.2008 22:53

    As I understood, your "application" consists of two parts: web site written on php and EJB+Struts.
    If so, you can easily make HTTP requests from php to your Struts actions.
    Your actions can make response in JSON (JavaScript Object Notation) with the help of json-plugin.
    With these approach you beat two things: you can make actions which can be easily used asynchronously (JSON helps to do this) also they can be used by any application that can parse JSON response.
    You don't need to dig into WS. Your case is very simple because of powerful java web-framework. WS will make your solution too complicated. Also you'll have troubles with WS on php-side.
    Once, I've had to send some data to java-WS from php4. I've tried to realize it in many ways, but finally I've made simple HTTP request with manually formed XML-body (it was SOAP).

  • Java Client and J2EE

    Hello
    I am new in j2ee, and have developed to an application using ejb, struts and jsp's.
    Now I need to make an application in swing and nonencounter the way to be able �
    to make calls from the classes of swing.
    Or if tecnologia exists some with which I can replace to Struts. Any aid I am thankful to them.

    Hi
    I'm not sure about the design you've followed for the web based application. The easiest way to solve the problem is to create a stateless session bean as front controller then let the swing client interact with the front controller. From the front controller , controll can be diverted to different business services as per your need.
    HTH
    Jobinesh

  • Java to SAP career prospects

    Hi Experts,
    I need small suggestion from you all regarding my Career . I  am a programmer in Java having around 6 years of experience. I want to step into SAP for better career prospects and survival in volatile market condition. Will it be worthwhile to learn any SAP module and will there be any better prospects because of that. I worked on Java, JSP, EJB, Struts.. etc, in financial domain. Which module in SAP should I get into. I have also come to know about Enterprise Portal. Would it be better to learn EP or to switch to some module in SAP and what would be the career prospects if I learn some SAP module.
    I would also like to know what would be the career prospects for Java Professionals ?
    Would learning of some SAP module benefits me ?
    Thanks in advance. Waiting for your valuable suggestions.
    Regards,
    Vishnu Priya

    Hi Vishnu Priya ,
    I wonder u asking this question who is holding 258 posts and 22 points as well & well versed in dialog programming???
    Regards
    sas
    Ps: Already abap 6.0 flooded with oops concepts and u gyes from java making abapers life more complicated:-) Best of luck ...If u post in CC u will recieve like this answers...u can see suggestions category...

  • [PM] Looking for JDeveloper 10g preview users

    The JDeveloper Product Management team is looking for people who are currently using the preview version of Oracle JDeveloper 10g to develop their soon to be production applications.
    We want to get your feedback on a some questions.
    If you are using JDeveloper 10g Preview to develop what would become a production application please email us at:
    Jdeveloperbeta_us@ oracle.com , with the subject: Currently Using JDeveloper 10g.
    Thanks,
    Shay.
    Oracle Corporation.

    I am using JD 10g!
    I am following the steps to the tutorial: Developing J2EE application using EJB, Struts, JSP and ADF Databinding.
    JD10g does not bring up the New Gallery as the step labeled: Reverse engineer tables as CMP beans instructs.
    How can I can if my install in correct?
    How can I solve this issue?
    Thanks
    Patrick

  • How to print reports?

    I m creating view object in .uix file using EJB-struts platform.How to print the result in view object which is getting after query execution ?

    double post
    http://forum.java.sun.com/thread.jspa?threadID=718185&tstart=0

Maybe you are looking for