Beans and Struts

I'm new to JSP, can someone give me a hint which is more advisable to use in a JSP Page?: Struts or Beans? Why?

I am looking for a better answer, but for starter your may wish to post this to the Java Studio Creator Forum. Creator makes big use of Struts. More later ...

Similar Messages

  • JSP, BEANS AND DAO best practice... (and a little of STRUTS & JSTL)

    Hi,
    Want to get your opinion on how to really use bean and dao in jsp pages.
    Imagine that you wants to display a news list on the jsp index page for example.
    You've got a dao with method getLastNews(int size) which returns a Collection of News beans. Then with jstl or struts you iterate ove the collection to display the news in a formatted way.
    Easy to build collection with scriptlets & co but not very clean...
    What is the best way to call my dao and its method with a tag whithout using scriplets ?
    Thanks

    Yes this is the solution i use when the collection is displayed alone in a jsp page, but how do you do this when you include this collection in a page, and if you have other collections in other parts of the page ? Is there a clean solution of doing this in the jsp page? For example:
    <sometag:loadmycollection name="list"/>
    <logic:iterate id="myCollectionElement" name="list">
    Element Value: <bean:write name="myCollectionElement" />
    </logic:iterate>
    I know that i can write my own tag by if there is an existing solution...

  • Struts, beans, and unique IDs

    Hi,
    I'm trying to capture info from a web form using Struts, and I have a ActionForm (bean?) for that. When submitted (or instantiated - I don't know the details of how or when exactly it's being created), I want that bean to somehow get assigned a uniqueID so I could locate it easily in a database later.
    Where and when should I be doing this? Is it in the action class after the form has been submitted that I should assign ID to the bean (bean.setID(generatedInt); - but that's not good practice, I think), or inside the bean in its constructor? Or maybe there's a simple and clean way Struts can do this?
    And generally, is there good info on how and when the bean is being created by Struts? From Struts docs I got an idea of a bean representing a form through which the data is being submitted. Is this so?

    There are beans and then there are beans. They are used for many purposes.
    Struts ActionForm beans are used to gather together and validate the data from a JSP page (or some other view) and present it to the Action. Those are the beans they were probably talking about in the struts docs.
    Your business logic for the most part should be stored in different beans from these ActionForm beans.
    Database properties don't always correspond directly to all the fields on a form and vice versa. The whole point is that these business beans are your model - they should not in any way be affected by the view.
    On assigning Ids - my approach would be to have it in your business layer, rather than in the action class. That would mean that the beans could be usable outside of struts. Each individual class should be responsible for getting its id - ideally the first time it is saved.
    Just my 2 cents,
    evnafets

  • Retrieve data  from entity bean to struts and display in JSP

    I am integrating Struts+EJB3.0.
    Now i need to retrieve data stored in mysql database through entity bean to struts framework*(Action Form*).Then i need to display it in JSP page.(display using combo box).
    Please Any one give suggestions!!!!!
    Thanks in advance

    I got the solution.
    --Jagan.+                                                                                                                                                                                                                               

  • EJB 3.0 and Struts 1.0

    Have a Struts/EJB question...
    If I have a web-form backed by an ActionForm in Struts, where the user
    types in a record that maps directly to an EJB3 entity class and a
    corresponding db-table, is it advisable (or even possible) to somehow
    use the same class for the ActionForm and the EJB?
    Im thinking the 2 beans, they have basically the same setter/getter
    methods,
    but the form-bean extends ActionForm, while the Entity class
    implements serializable...
    Is it possible to use one and the same class for both purposes... or
    maybe one extends the other...
    Or should they just be two different classes, and have to copy data
    back and forth between them?
    What is "best practice" here?
    Edited by: vb.bajpai on Feb 13, 2009 4:13 AM

    Well, the "best practice" is the one that better fits for you. Your idea of making another bean for struts, has been thought before. That technique is called "DTO Pattern". Search the java blueprints for the DTO Pattern.
    So you have 2 options
    Use EJB entities through all your app
    pros: less code to write
    cons: highly coupled code. struts must stick to your EJB entity beans.
    Use the DTO pattern
    pros: loose coupled design. you can change your entities and your struts forms wont be affected.
    cons: more code to write. You may need help from a bean to bean mapper like dozer or ezconvert
    PS: DTO (Data Transfer Object), VO (Value Object), and TO (Transfer Object) are all synonyms.

  • Please hepl me. i m intergrating ejb3 and struts in two server. but is not working

    it is simple application i m runing in tow server but i m get classsnotfound error pleas solve my problem. i will give my direct structure of application
    i m runing ejb3 in weblogic 10.3 and struts in tomcat server. both communication is not happening pleas help me. i m try from many days. But is not working form me
    root dir
    onlyenb6
    account class
    package ejb3.onlyejb;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    @Entity
    public class account implements Serializable{
    @Id
    int accno;
      public int getAccno() {
        return accno;
    public void setAccno(int accno) {
        this.accno = accno;
    public String getName() {
        return name;
    public void setName(String name) {
        this.name = name;
    public float getBalance() {
        return balance;
    public void setBalance(float balance) {
        this.balance = balance;
    String name;
    float balance;
    Int6_clss code
    package ejb3.onlyejb;
    import java.io.Serializable;
    public interface Int6_cls extends Serializable {
        public void storing(int acc, String name, float amt);
    Session.class code
    package ejb3.onlyejb;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(mappedName="saigoud")
    @Remote
    public class Session_ben implements Int6_cls {
        @PersistenceContext
        EntityManager mrg;
        public void storing(int acc, String name, float amt) {
    System.out.println("session="+acc);
    System.out.println("sess="+name);
            account accs=new account();
            accs.setAccno(acc);
            accs.setName(name);
            accs.setBalance(amt);
            mrg.persist(accs);
    build.xml
    <project name="onlyejb5" default="saifile">
    <property name="bea.home" value="C:/bea"/>
    <property name="wl_home" value="${bea.home}/wlserver_10.3"/>
    <path id="main.class.path">
    <pathelement path="${bea.home}/modules/com.bea.core.utils_1.4.0.0.jar"/>
    <pathelement path="${bea.home}/modules/com.bea.core.jarbuilder_1.2.0.0.jar"/>
    <pathelement path="${java.class.path}"/>
    </path>
    <target name="saifile">
    <echo message="***ANT Script should run from inside the ${wl.home}/server/lib *****" />
    <echo message="***** ********* ********* *****" />
    <java classname="com.bea.jarbuilder.JarBuilder">
    <classpath refid="main.class.path"/>
    <jvmarg value="-d ${wl.home}/server/lib -jar wljarbuilder.jar"/>
    </java>
    </target>
    </project>
    after run with ant i get successfully create wlfullclient.jar
    i m taking this wlfullclient.jar and pasting in tomcat lib directery and run webapplication
    my webapplication code
    package ejb3.onlyejb;
    import java.io.Serializable;
    public interface Int6_cls extends Serializable {
        public void storing(int acc, String name, float amt);
    package ejb3.onlywed;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Properties;
    import javax.ejb.EJB;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import ejb3.onlyejb.Int6_cls;
    public class Action_cls extends Action {
            public ActionForward execute(ActionMapping map, ActionForm fm, HttpServletRequest req, HttpServletResponse res)
        throws IOException{
            String respkey="fails";
            Action_form_bean bean=(Action_form_bean)fm;
            int ac=bean.getAccno();
            String na=bean.getName();
            float bal=bean.getAmt();
            System.out.println("accno="+ac);
    System.out.println("na="+na);
    System.out.println("bal="+bal);
    System.out.println("enter in to if loop");
               Hashtable p=new Hashtable();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,"t3://localhost:7001");
            System.out.println("jndi properties nuderprocess");
               try {
    System.out.println("loading p file="+p);
                InitialContext ic = new InitialContext(p);
    System.out.println("loading p file over="+ic);
            System.out.println("jndi file is  loaded");
          //System.out.println("wrs="+wrs);
    System.out.println("entry in try block");
    Int6_cls wrs=(Int6_cls)ic.lookup("saigoud#ejb3.onlyejb.Int6_cls");
           System.out.println("lookup susfull");
              wrs.storing(ac, na, bal);
        respkey="ok";
              } catch (NamingException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
            catch (Exception e) {
                // TODO: handle exception
            ActionForward fw=map.findForward(respkey);
            return fw;
    get error
    accno=44
    na=hjhjhj
    bal=777.0
    enter in to if loop
    jndi properties nuderprocess
    jndi properties nuderprocess22
    loading p file={java.naming.provider.url=t3://localhost:7001, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory}
    loading p file over=javax.naming.InitialContext@12f9bcd
    jndi file is  loaded
    entry in try block
    Jul 5, 2013 1:36:22 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet action threw exception
    java.lang.ClassNotFoundException: ejb3.onlyejb.Int6_cls
        at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151)
        at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.loadClass(RemoteBizIntfClassLoader.java:96)
        at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:54)
        at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.readObject(RemoteBusinessIntfProxy.java:205)
        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:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
        at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
        at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
        at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
        at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at ejb3.onlywed.Action_cls.execute(Action_cls.java:62)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

    Locking multipost.

  • How to map GUI Bean with struts action form?

    Hi,
    I am new to struts and I have to integrate a GUI Based Bean to struts actionform. I am desperately looking for some tips. I would be much gratefull.
    See ya :)

    Hello.
    public vlass MyForm extends ActionForm {
    private MyBean myBean;
    public MyBean getMyBean() {
    return myBean;
    public void setMyBean(MyBean myBean) {
    this.myBean = myBean;
    }

  • Form Beans - BC4J Struts

    Can anyone out there gimme some guide on how to create Form Beans in JDeveloper.
    I did an approach on creating it base on the BC4JTOystore but it didn't quite work.
    Here's wat i did:
    1. Define a form bean and map it in the struts-config.xml
    2. Edited the JSP + ***Action.java.
    3. Run it
    and this is wat i get:
    java.lang.NullPointerException
         org.apache.struts.action.ActionForward oracle.jbo.html.struts11.actions.EditAction.create(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              EditAction.java:97
         org.apache.struts.action.ActionForward betting.loginAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              loginAction.java:16
         org.apache.struts.action.ActionForward org.apache.struts.action.RequestProcessor.processActionPerform(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.Action, org.apache.struts.action.ActionForm, org.apache.struts.action.ActionMapping)
              RequestProcessor.java:446
         void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              RequestProcessor.java:266
         void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              ActionServlet.java:1292
         void org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              ActionServlet.java:492
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    anyone ??

    No replies as yet...

  • XForms and Struts

    I'm working on the presentation tier for my project.
    XForms and struts are going to be used, But I have no idea how to integrate XForms and Struts actionforms.
    Does anybody have experience on this? If you do, can you share some examples?
    Thanks in advance.

    Hi
    I have worked on both of them.
    I believe Struts and Xforms follow different paths. Its hard to integrate or redundant to use both together. Althought Struts is a very good solution with existing technologies, XFORMS sounds to be a more standard one.
    Advantage conflict of Struts and XFORMS
    Struts :
    1. View - JSP
    2. Model - Form Bean
    XFORMS processor on server side:
    1. View & Model all handled by XFORMS processor, XML & XSL (Great :) !)
    In case of XFORMS processor u can do renderer independent authoring quite easily, and XML is a preferrable way to have data now a days.
    Himanshu Thube

  • Comparing 2 form beans in Struts???

    Hi,
    How to compare 2 form beans in struts??? I have an edit screen with
    some data in it. If user does not edit any of the values present in the
    component(textfield) and try to submit the values that are old(already displayed)then i need to capture the data from form and compare it with the same data that is stored in another bean or session for example.
    if both are equal, then prevent the user from submit otherwise allow the
    user to submit the form with modified datas.
    In order to proceed further,how we can actually compare 2 form beans which does have the same values in it???
    Thanks,
    JavaCrazyLover

    No replies as yet...

  • What is difference between Managed Bean and Backing Bean?

    What is difference between Managed Bean and Backing Bean? Please guide me how to create them and when to use them?
    Please post sample for both beans.

    Hi,
    managed beans and backing beans are quite the same in that the Java object is managed by the JavaServer Faces framework. Manage in this respect means instantiation. The difference is that backing beans contain component "binding" references, which managed beans usually don't. Do backing beans are page specific versions of managed beans.
    Managed beans are configured either in the faces-config.xml file, or using ADF Faces and ADFc, in the adfc-config.xml file
    Frank
    Edited by: Frank Nimphius on Jan 31, 2011 8:49 AM

  • Message Driven Bean and transaction handling

    We are using container managed transactions with MDB's running on OC4J version 10.1.2. We have two database serveres, both running Oracle 10g.
    The MDB consume messages from the AQ-database through JMS (connected to a JDBC datasource registered as "jdbc/OracleAQDS").
    The MDB onMessage() code update the second database, using a JDBC datasource registered as "jdbc/OracleDBDS".
    We need atomic behaviour - if the MDB enforce a roll-back we want the updates aginst the second database to be rolled-back as well.
    (1) Should we use XA-datasources since AQ and DB runs on two different servers or do the OC4J container "magically" provide two-phase-commit for us?
    (2) If the MDB does a roll-back we would like to add an error record to a database table. Can we configure a third datasource and prevent if from beeing part of the container managed MDB roll-back?
    (3) When the MDB force a roll-back, is there some way for us to override the retry-delay in our Java code? If we catch certain errors during processing in onMessage we know that it is not necessary to retry for at least one hour (while less severe errors should be retried in just seconds).

    {color:#008000}Hi Friends,
    Thought of updating the answers for my questions in case somebody else would find it helpful.
    {color}
    {color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
    But since I'm doing this for the first time I have very limited knowledge.
    The following are my doubts :
    1. Should I have a main function while using the MDB?{color}
    {color:#008000} There is no need for any main function.{color}
    {color:#00ccff}2. Is it mandatory to have JNDI setup done?
    {color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
    Websphere by creating valid entries inside Resources namely -
    Queue Connection Factory, Queues and Listener Ports under the server.
    Thanks,
    Arun Prithviraj{color}

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

  • Hi frnds i want to help in servlet,java bean and JSP

    hi friends i'm right now in M.SC(IT) and i want to do project in SERVLET,,JAVA BEANS and JSP ,
    so pls give me a title about that
    NOTE: I develop a project in group(2 persons there)
    my email id is : [email protected] , [email protected] , [email protected]

    You cannot pair your iPod to a cell phone, so forget about it.
    The only way you can get free WiFi is to hang out at a Denny's, a Starbucks, or a truck stop, and I don't think your parents would approve....

  • Message Driven Bean and Distributed transaction

    Hi ALL
    I am developing an asynchronous application using MDB. My application flow is as follows:
    1. From MDB onMessage i am calling a method MethodA that
    a. calls a simple pojo1 where I am getting a Connection on XA enable datasource1 and executing Stored Procedure1 of DatabaseSchema1.
    b. In that pojo without committing m closing the connection and coming back in MethodA.
    c. Again from MethodA m calling a different pojo2 where I am getting a new Connection on XA enable datasource2 and executing Stored Procedure2 of
    DatabaseSchema1. In this pojo also without committing m closing the connection and coming back in MethodA.
    d. Again from MethodA m calling pojo1 where I am getting a new Connection on XA enable datasource1 and executing a different function of Stored Procedure1 of DatabaseSchema1.
    Public class MDB{
    Public void onMessage(��.)
    Try{
    Method1();
    Catch(Exception x)
    mdbcontext.setRollbackOnly();
    Private void MethodA()
    Call pojo1;
    Call pojo2
    Pojo1
    Public void CallSP1()
    Get connection from Datasource1 (shema1,user1, pwd1);
    Call sp1();
    //return without commit;
    Pojo2
    Public void CallSP2()
    Get connection from Datasource2 (shema1,user2, pwd2);
    Call sp2();
    //return without commit;
    SP1:
    Insert table1
    Savepoint 1
    Insert into Table1
    Rollback to 1
    Insert a row
    End SP1 (without commit)
    SP2:
    Insert table2
    Savepoint 2
    Update table2
    Rollback to 2
    Insert table2
    End SP2 (without commit)
    In ejb-jar.xml
    Transaction type is Container
    Transaction attribute is Required for all
    Now problem is:
    Case 1: success case when no exception is there at Java layer
    SP1 works fine I mean there is only 2 inserts in Table 1
    But In SP2 there are 3 inserts
    Case 2: if an exception comes at Java layer
    SP1 is fine
    Rollback is not happening in SP2
    In ejb-jar.xml transaction attributes is Required for all methods and transaction type is Container.
    Backend is Oracle 10g and init.xa has already been run on that.
    Will be very obliged if can have a single hint of the problem.
    Both datasource are XA enable
    Backend is Oracle 10g
    Application server is WAS 6.0
    Queue is WAS MQ 6.0
    Thanks

    {color:#008000}Hi Friends,
    Thought of updating the answers for my questions in case somebody else would find it helpful.
    {color}
    {color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
    But since I'm doing this for the first time I have very limited knowledge.
    The following are my doubts :
    1. Should I have a main function while using the MDB?{color}
    {color:#008000} There is no need for any main function.{color}
    {color:#00ccff}2. Is it mandatory to have JNDI setup done?
    {color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
    Websphere by creating valid entries inside Resources namely -
    Queue Connection Factory, Queues and Listener Ports under the server.
    Thanks,
    Arun Prithviraj{color}

Maybe you are looking for

  • Condition Type in Pricing Procedure Determination

    Dear All, I want some clarity in Pricing Procedure determination. As I know in IMG we determine pricing procedure by the combination of Sales Org, Dist. Channel, Division,  Cust. Pricing procedure and document Pricing procedure. There is additional t

  • Installing Oracle 8.1.7 on RedHat 7.2

    Hi I can't install Oracle 8.1.7 on RedHat 7.2 the machine I want to install it on is a P4. when I execute runInstaller nothing happens Please help me

  • Are there any exams for LabWindows​/CVI for my assessment​?

    Hi I'm new in CVI I'm still studying its features Can anyone give me a link where I can learn more about CVI, a tutorial perhaps. I'm really interested about data manipulation and databases. What database can I use with CVI? And Are there any exams I

  • Scheduling process priority

    hello linux guru's im trying to run a db backup job ( shell script ) with nice scheduling priority 19 ( lowest priority) but the job seems to be taking too much of cpu when i execute top command. and its constantly at the top of queue. does this mean

  • Photos app years does not show countries

    After updating to iOS 7 I noticed that under the "Years" section, pictures from 2010 to 2012 all displayed the names and number of countries I have visited. However, no countries are listed in the year 2013, beside the heading even though this was th