Default  Transaction Attribute for EJBs

Guys,
Can you tell me the default transaction attributes if any in Weblogic 7.0 i.e.
the attributes used
if not explicitly specified for a bean method when using in CMT ?
For CMP entity beans,
MDBs,
Other beans (?) :
thanks for your help
regards
Ved

Hello Mr. Woollen,
As always, thank you for your excellent insight into the internals of BEA WebLogic.
I now have a better understanding of what happens "by default" in WLS. I do agree
that changing this now would definitely break existing applications. It's always
difficult to decide when to officially deprecate a "feature" or to leave it in
forever.
Best regards,
Ryan LeCompte
[email protected]
http://www.louisiana.edu/~rml7669
Rob Woollen <[email protected]> wrote:
For better or worse, MDBs default to NotSupported and everything else
defaults to Supports.
I say for better or worse because I would have liked to change it to
always require the user to set a default transaction attribute.
Unfortunately we have many customer's applications who depend on this
behavior, and I believe if we change it we will break all of them.
Regardless, I would not recommend depending on our default tx attribute
and instead always set one for '*'.
In general, entity beans should run as Required or Mandatory. Session
beans are usually required or notsupported. MDBs are required or
notsupported.
-- Rob
Ved Gangaputra wrote:
Guys,
Can you tell me the default transaction attributes if any in Weblogic7.0 i.e.
the attributes used
if not explicitly specified for a bean method when using in CMT ?
For CMP entity beans,
MDBs,
Other beans (?) :
thanks for your help
regards
Ved

Similar Messages

  • Setting transaction attributes for EJB Create methods

    Dear developers
    How do I set transaction attributes at the method level. I am able to set this only at the bean level.
    I am trying to use container managed transactions.
    Thanks
    Naveen

    if you specify * in the <method-name> element, then it is the bean
    otherwise, you can specify a particular method name in the <method-name> element.
    Best regards...
    Dear developers
    How do I set transaction attributes at the method
    level. I am able to set this only at the bean level.
    I am trying to use container managed transactions.
    Thanks
    Naveen

  • Creating a query that provides a default transaction type for those transactions not categorized?

    How could I create a query that provides a default transaction type for those transactions not categorized?
    So assuming I have:
    * Transactions table (with transactions)
    * Categories table
    * transactions_categories table - allows to allocate multiple categories (with a percentage)
     - tranactionID
     - categoryID
     - percentageAllocation
    * Usage is such that only non-personal categories have been applied through out data.  So there is a lot of transactions with no categories applied
    Aim:
    * Want to create a query that creates a list of all the allocated amounts, so would include as columns:  transaction.tDate, transaction.tTitle, categories.name, allocatedAmount(calculated from percentage * transaction amount)
    BUT:
    * How could I include in the query, the entries that cover all transaction that haven't been allocated, to a default category "personal", where the allocated Amount would be 100% of the transaction value
    * And also (if it were possible), for transactions that have been categorized but not for the complete transaction value (say only 50% was allocated to a category), how to to cover this off to.  

    To default the value of the category:
    select IIf(IsNull(Category),"Personal",Category) as Category,IIf(IsNull(Category),"100%",PercentageAllocation
    ) as PercentageAllocation from [yourtable]
    What do you want to put the values of these ones:
    And also (if it were possible), for transactions that have been categorized but not for the complete transaction
    value (say only 50% was allocated to a category), how to to cover this off to.  
    Fouad Roumieh

  • Assignment of transaction attributes in ejb-jar.xml

    Hi all,
    I'm going through the employee example from the book "Java programming in SAP web application server". I have followed the instrucstions to the letter and have triple checked that i did not miss anything.
    During the part "Defining Transaction Control", when i go to the "Assembly" tab, choose "Container-transaction" and click add; i get the following error message.
    You have to create and reference EJBs first. Afterwards you can choose them here.
    Newly created EJBs are referenced automatically in the ejb-jar.xml, in special cases you might have to reference them manually.
    Below is a copy of the ejb-jar. Both beans are referenced in the file so i don't really understand the error message!
    Thanks for your help.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>EmployeeServicesBean</ejb-name>
                   <home>com.sap.demo.EmployeeServicesHome</home>
                   <remote>com.sap.demo.EmployeeServices</remote>
                   <local-home>com.sap.demo.EmployeeServicesLocalHome</local-home>
                   <local>com.sap.demo.EmployeeServicesLocal</local>
                   <ejb-class>com.sap.demo.EmployeeServicesBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/Employee</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                        <local>com.sap.demo.EmployeeLocal</local>
                        <ejb-link>EmployeeEjb.jar#EmployeeBean</ejb-link>
                   </ejb-local-ref>
              </session>
              <entity>
                   <ejb-name>EmployeeBean</ejb-name>
                   <home>com.sap.demo.EmployeeHome</home>
                   <remote>com.sap.demo.Employee</remote>
                   <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                   <local>com.sap.demo.EmployeeLocal</local>
                   <ejb-class>com.sap.demo.EmployeeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Long</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>EmployeeBean</abstract-schema-name>
                   <cmp-field>
                        <field-name>lastname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>firstname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>department</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <description>Query for getting all employee objects.</description>
                        <query-method>
                             <method-name>findAllEmployees</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>Select object (p) from EmployeeBean p</ejb-ql>
                   </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor/>
    </ejb-jar>

    I was able to add the transaction attributes manually to the ejb-jar.xml file. below is what the file looks like now for those interested.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>EmployeeServicesBean</ejb-name>
                   <home>com.sap.demo.EmployeeServicesHome</home>
                   <remote>com.sap.demo.EmployeeServices</remote>
                   <local-home>com.sap.demo.EmployeeServicesLocalHome</local-home>
                   <local>com.sap.demo.EmployeeServicesLocal</local>
                   <ejb-class>com.sap.demo.EmployeeServicesBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/Employee</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                        <local>com.sap.demo.EmployeeLocal</local>
                        <ejb-link>EmployeeEjb.jar#EmployeeBean</ejb-link>
                   </ejb-local-ref>
              </session>
              <entity>
                   <ejb-name>EmployeeBean</ejb-name>
                   <home>com.sap.demo.EmployeeHome</home>
                   <remote>com.sap.demo.Employee</remote>
                   <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                   <local>com.sap.demo.EmployeeLocal</local>
                   <ejb-class>com.sap.demo.EmployeeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Long</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>EmployeeBean</abstract-schema-name>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>lastname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>firstname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>department</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <description>Query to get all employee objects.</description>
                        <query-method>
                             <method-name>findAllEmployees</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>Select object (p) from EmployeeBean p</ejb-ql>
                   </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <description>container-transaction</description>
                   <method>
                        <ejb-name>EmployeeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>EmployeeServicesBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    Thanks

  • Changing default transaction timeout for 5.1

              Hi
              Does someone know a way to change the default ejb transaction timeout for
              WL5.1?
              The default is 300 secs, which is a bit too long for me.
              I know I can change it in each deployment descriptor but it would be easier
              and quicker if I could just change the default :-)
              Thanks
              Nicolas
              

    There is another way but I think it's more complicated.
    After reading the file you can use a java code (java embedded activity) and split the file.
    For each part of the split you can PUT by FTP the file with append mode. That way your transaction will run in few cycles with less time.

  • How to get rid of Default Transaction Attribute warning at deployment

    Hi,
    When I deploy Entity and Session Beans on BEA 8.1 SP3,
    I get warings about Default Trabsaction setting.
    I need to know which @XDoclet Tags to insert in my Entity or Session Beans in order
    to get rid of this Deployment waring: The Default Transaction is set to Supported...
    with kind regards,
    Harry van Rijn

    I think @ejbgen:entity 'default-transaction ' should avoid the warning.
    http://e-docs.bea.com/wls/docs81/ejb/EJBGen_reference.html#1126084
    --Sathish
    <Harry van RIjn> wrote in message news:[email protected]..
    Hi,
    When I deploy Entity and Session Beans on BEA 8.1 SP3,
    I get warings about Default Trabsaction setting.
    I need to know which @XDoclet Tags to insert in my Entity or Session Beans
    in order
    to get rid of this Deployment waring: The Default Transaction is set to
    Supported...
    with kind regards,
    Harry van Rijn

  • Error in retrieving session attribute for ejb remote in clustered env

              We store EJB remote object in session and differnt clients retrieve it from sessionbefore
              making a business method call. This seems to work in most cases but sometimes
              it gives the exception attached. This happens only in a clustered environment.What
              has been observed is that if we put the remote object inside a hashtablewhich
              in-turn is stored in session retrieval from hashtable does not give thisproblem.
              Any suggestion / solution would be greatly appreciated.
              Regards,
              Shilpa
              The exception Stack trace is attachedjava.rmi.NoSuchObjectException: Unable to
              locate EJBHome: 'BalconHome' on server:'t3://176.19.183.6,176.19.183.15:9616 at
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80) at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:395)
              at com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(AccountInfoAccessor.java:362)
              at com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311)
              at com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88) at
              com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              at jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs_mm_tgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:482)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:308)
              at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116) at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              at com.epicentric.template.Style.execute(Style.java:538) at com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              at jsp_servlet.__index._jspService(__index.java:560) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:242)
              at com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatcherServlet.java:195)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

              The EJB is stateful session EJB. Have seen some posts pointing to problems
              with
              stateful session EJB and cluster and the suggested solution was SP4 (we are
              on 6.1 SP3).
              Hope this gets more clarity (and some solutions!!!).
              regards,
              Rajesh / Shilpa
              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > It's probably caused by the fact that the session attributes get
              serialized
              > when they are in a cluster. (Something to do with ser/deser process?)
              >
              > Peace,
              >
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com/coherence.jsp
              > Tangosol Coherence: Clustered Replicated Cache for Weblogic
              >
              >
              > "Shilpa" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > We store EJB remote object in session and differnt clients retrieve it
              > from sessionbefore
              > > making a business method call. This seems to work in most cases but
              > sometimes
              > > it gives the exception attached. This happens only in a clustered
              > environment.What
              > > has been observed is that if we put the remote object inside a
              > hashtablewhich
              > > in-turn is stored in session retrieval from hashtable does not give
              > thisproblem.
              > > Any suggestion / solution would be greatly appreciated.
              > >
              > > Regards,
              > > Shilpa
              > >
              > > The exception Stack trace is attachedjava.rmi.NoSuchObjectException:
              > Unable to
              > > locate EJBHome: 'BalconHome' on
              > server:'t3://176.19.183.6,176.19.183.15:9616 at
              > >
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80)
              > at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              > > at
              >
              weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:
              > 395)
              > > at
              >
              com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(Acco
              > untInfoAccessor.java:362)
              > > at
              >
              com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311
              > )
              > > at
              > com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88)
              at
              > > com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at
              > com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              > > at
              >
              jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs
              > mmtgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:482)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:308)
              > > at
              weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
              > at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              > > at com.epicentric.template.Style.execute(Style.java:538) at
              >
              com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              > > at jsp_servlet.__index._jspService(__index.java:560) at
              > weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
              > l.java:242)
              > > at
              >
              com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatch
              > erServlet.java:195)
              > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              > ntext.java:2546)
              > > at
              >
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              > :2260)
              > > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at
              > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              

  • How to override the default "required" attribute for the UIComponent?

    Hi, consider the following markup: <h:inputText id="txt_firstName" value="#{myBean.firstName}" required="true"/>
    if I leave this field empty and hit the submit button, the required validator will fire an error msg. If however, I leave an empty space in the text box and hit submit button, it will go through no problem.
    I'd like to override the required attribute, so it will trim the spaces first before decide if it really is empty:
    //whatever the name of the method i'm overriding....
    String value = (String)value;
    if(value==null)throw new ValidatorException(whateverDefinedInTheBundle);
    value = value.trim();
    if(value.length==0)throw new ValidatorException(whateverDefinedInTheBundle);
    How can I go about doing that?
    Thank you.

    Did you already try
               <af:treeTable value="#{bindings.DashProjectPhasesDev.treeModel}"
                                  var="node"
                                  selectionListener="#{bindings.DashProjectPhasesDev.treeModel.makeCurrent}"
                                  rowSelection="none" rowBandingInterval="0"
                             inlineStyle="width:810px; height:1100px;"> Check the last line with inlineStyle...
    Julian

  • Error deploying EJB on weblogic: Unable to set the transaction attribute

    Hi,
    I'm trying to deploy an application in WL10.3.2 and an error occurred during activation of changes.
    Here is the error message from the log file:
    <Jun 6, 2011 1:28:27 PM MDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'serverEAR-2' due to error weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processCTs(MBeanDeploymentInfoImpl.java:1502)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processSpecificMethodCTs(MBeanDeploymentInfoImpl.java:1472)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:773)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:259)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1190)
         Truncated. see log file for complete stacktrace
    Please help me...Thanks.

    In your ejb-jar.xml you are referring to a method saveActionGroup(EditableActionGroup) which is not defined in your remote interface.
    Maybe you have made some typo in the configuration. Check your transaction section, i.e.,
    <container-transaction>
                <method>
                    <ejb-name>ViewBean</ejb-name>
                    <method-name>saveActionGroup</method-name>
                    <method-params>
                        <method-param>package.EditableActionGroup</method-param>
                    </method-params>
                </method>
                <trans-attribute>Required</trans-attribute>
    </container-transaction>or something similar. See if the defined methods are corresponding to the methods defined in the remote interface.

  • EJB + "transaction attributes" + "best practice"

    hi
    For EJBs, when you specify multiple transaction attributes for a single
    method, is the latest attribute taken or the first?
    for e.g. In Jbuilder8 in the container transaction section for an EJB,
    if i were to put
    Method Transaction attribute
    * Required
    getSomeThing() Supported
    As you can see all the methods were initially given the required attribute,
    and then the method getSomeThing() was given Supported. will the
    getSomething() method use Required or else Supported. Secondly, will this
    cause an extra overload (Transaction attributes are set and the again
    reset), is it a recommended best practice?
    suren

    getSomeThing() Supported
    As you can see all the methods were initially given
    the required attribute,
    and then the method getSomeThing() was given
    Supported. will the
    getSomething() method use Required or else Supported.It will use supported.
    Secondly, will this
    cause an extra overload (Transaction attributes are
    set and the againIt won't cause extra overload.
    reset), is it a recommended best practice?It really depends on your needs - what you're trying to achieve. There is no best practice for that it depends on the application you're building.
    Regards,
    Dimitar

  • Help required specifying Transation attributes for this scenario

    Hi ,
    I am trying to create/update rows in a database using BMP and CMP beans.
    A business method ( Method1 )in session bean calls a non-business method ( Method2) in the same session bean which inturn calls an EntityBean ( EB1-BMP) . EB1 can throw a certain business exception upon which , the Method1 in the session bean calls another EntityBean in a loop( EB2-CMP).
    The problem is that , when the EB1 throws the business exception, i am getting an exception ( part of the stack trace attached below ).
    Could any please explain what should be the transaction attributes to be specified for this scenario.
    Using RequiresNew for the EntityBeans would not work ( or would it ?? ) because the entity bean is being called in a loop and the commit or rollback should happen for all the methods.
    I feel the problem should be solved by specifying the transaction attribute for Method2 ( non business method in session bean ) as Required, but i guess this is not possible.
    How exactly will the transaction behave in this scenario, is the exception caused because EB1 has thrown an exception and i am trying to continue the transaction.
    Could someone please suggest a solution or workaround for this problem.
    Regards,
    Harsha
    ---- Begin backtrace for nested exception
    java.lang.IllegalStateException
    at com.ibm.ws.Transaction.JTA.TransactionImpl.enlistResource(TransactionImpl.java:1694)
    javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@28d16547
    .

    tryout business method ( Method1 )in session bean with transaction as RequiresNew.
    catch exception in Method2 originated from EB1-BMP
    make the method in EB2-CMP as Required/Mandatory
    I have made a guess here so just tryout and let me know if works.
    Its recommend that not to use both BMP's and CMPs in your application. Have any one either.

  • Transaction handling between EJBs

    hi,
    I am having a delegate kind of Stateless Session Bean(SSB which calls three other SSBs and perform database operations. My delegate bean does not have any database activities associated with it.
    I am using container managed transaction and setting transaction attribute for the business function calling the 3 SSBs as RequiresNew. I have set the transaction attribute for the other 3 beans as Required. But when there is a update error, the transaction is not rolling back. Have someone come across similar problem?
    Thanks in advance.
    Regards,
    Karthik

    An user exception (in the EJB spec. called application exception) must not be extend RunTimeException.
    Hi crackers, here are some sentences from the EJB specification:
    Code that you develop should not throw EJBException - that's "reserved" for the container vendor to signal a container failure.EJB Spec. 2.0 (page373):
    If the bean method performs an operation that results in a checked exception[32] that the bean
    method cannot recover, the bean method should throw the javax.ejb.EJBException
    that wraps the original exception.
    Not entirely accurate. If a user-defined Exception extends the Exception class, yes, you must explicitly rollback the transaction. However, if the user-defined Exception extends RuntimeException, the container will roll back the exception for you.EJB Spec. 2.0 (page372):
    An application exception class must be a subclass (direct or indirect) of java.lang.Exception.
    An application exception class must not be defined as a subclass of the java.lang.RuntimeException
    or of the java.rmi.RemoteException.

  • Transaction attribute definition

    In the remote and home interface for a BMP entreprise bean, how and where I have to define transaction attributes for each method?

    Specify the <trans-attribute> element in ejb-jar.xml
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute></trans-attribute>
    </container-transaction>
    </assembly-descriptor>

  • Set Default Report Attributes

    Hi,
    Is is possible to set the default report attributes for interactive reports so when I create a new one I don't have to go through and change the defaults. Basically I want to set the "Show Null Values as" variable to null rather than a dash for all newly created Interactive Reports, I know I can change the value once the report is created but I'd rather it default to null in case I forget to change it.
    I've searched though the interface and OTN with no luck, any ideas?
    Thanks in advance.

    Joe
    Standard reports (and hence the evil that is tabular forms) store sort columns persistently as user preferences. The <tt>apex_util.remove_sort_preferences</tt> method can be used to remove them, resetting reports to the default sort order. However this is not a precision instrument: it removes the user's sort preferences for all reports...
    It is possible to remove the sort preference for individual reports using the <tt>apex_util.remove_preference</tt> method by reverse engineering the required sort preference name from the admin user preference report.

  • R1213: Default Transaction Phase at the Order type

    We have a scenario as below.
    1. We have a custom responsibility that has both Quote and Quick Sales order form
    2. The profile OM: Default Transaction Phase for Sales order has been set as "Negotiation" at the Responsibility level
    3. But we need users to create RMA from this responsibility using Quick Sales Order form.
    4. Hence we set the "Default Transaction Phase" for RMA order type as "Fulfillment"
    Still when we try to create an RMA from quick sales order form, it's giving an error that Return is not possible since the default transaction phase is Negotiation..
    How can we achieve this with out creating a second responsibility just to create RMA from Quick sales order form ??
    Any help would be appreciated
    Regards
    Gopi

    Have the control on Default Transaction Phase only on the Order type level and NOT the responsibility level. Instead use processing constraints to restrict/allow creation of certain Type of Sales Order to certain responsibilities. Validation Templates can be created on Database Table level for Sales Order Type - use those to restrict to responsibilities. let me know if that works for you.

Maybe you are looking for