Stateful bean storing its state.

how will a stateful session bean stores its state.?

In stateful session beans we will store the state using the instance variables used in the bean. so, that instance variables can be used between methods.In stateless session beans also we will be using the instances variables but the state will not be available. since it is valid for the one method only.

Similar Messages

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • Problem with Maintaining State with EJB3 Stateful Bean

    I'm a newbie in EJB3. I've wrote a Stateful bean together with JSF as the UI tier. Below is my Stateful bean.
    package com.dhydrated.business;
    import com.dhydrated.entity.User;
    import java.io.Serializable;
    import javax.ejb.Remove;
    import javax.ejb.Stateful;
    @Stateful
    public class LogonBean
            implements LogonRemote, Serializable {
        private User user;
        public void setUser(User user) {
            this.user = user;
        public User getUser() {
            return user;
    }In above code, I'm storing User object as the private variable. The problem is, whenever I set the User object in the 1st page, I'm unable to retrieve the same user object in the 2nd page. Seems like my Stateful bean does not saved the state or conversation of the bean.
    Appreciate if someone could tell me on how to save the state of above Stateful bean. Is there some other conf. that I might missed out?

    I was find good solution! =)
    *** JScript ***
    <script TYPE="text/javascript">
    <!--
    function popup(myform)
    if (! window.focus) return true;
    var d = new Date();
    windowname = d.getTime();
    window.open('', windowname, 'top=100,left=100,height=200,width=200,location=no,resizable=no,scrollbars=no,status=no');
    myform.target=windowname;
    return true;
    -->
    </script>
    *** JSF ***
    <h:form onsubmit="popup(this)">
    <h:commandButton value="Press Me" actionListener="#{sessionBean.resetCursor}" action="selectElemList" />
    </h:form>
    But it work only with <h:commandButton> tag. If you try to use <h:commandLink>, then 'onsubmit' attribute by <form> tag don't work.
    If you know how make necessary functional with <h:commandLink> tag, please let me know.

  • Statful Session bean and its life

    Hi,
    I don't know how long a Stateful session bean lives in the memory. What keeps
    the stateful bean around?
    I do have a Stateful session bean in my application creating some problem. When
    the user first uses the stateful session bean, the bean remote reference is stored
    in the user session object. Even though the user session is active and not invalidated,
    stateful session bean is getting timed-out. I am using weblogic 6.1 with SP2.
    Please help. Thanks.
    Below is the exception stack trace:
    weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:SearchList
    HandlerBean with primary key:10,085,579,643,420,691 timed-out after waiting 0
    ms
    . The transaction or thread requesting the lock was:Thread[ExecuteThread: '10'
    f
    or queue: 'default',5,Thread Group for Queue: 'default'].
    at weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLo
    ckManager.java:448)
    at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.j
    ava:258)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSes
    sionManager.java:226)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSes
    sionManager.java:216)
    at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessi
    onManager.java:310)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:11
    7)
    at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject
    .java:170)
    at com.sherwin.sweep.services.common.SearchListHandlerBean_w4ccs4_EOImpl
    .getSize(SearchListHandlerBean_w4ccs4_EOImpl.java:234)

    The usual cause is a user loads a page, the request takes a while so
    they hit stop and reload. There's other possibilities like frames etc.
    -- Rob
    Sai S Prasad wrote:
    Thanks Rob for the response. Every instance of the sfsb is tied to a particular
    user web session. I am not sure how the concurrent calls take place. I am almost
    certain that I am not calling any methods in sfsb concurrently. Thanks again.
    Rob Woollen <[email protected]> wrote:
    The sfsb hasn't timed out. This is the EJB lock manager that's
    complaining. I suspect you are trying to make concurrent calls on a
    sfsb instance.
    -- Rob
    Sai S Prasad wrote:
    Hi,
    I don't know how long a Stateful session bean lives in the memory.What keeps
    the stateful bean around?
    I do have a Stateful session bean in my application creating some problem.When
    the user first uses the stateful session bean, the bean remote referenceis stored
    in the user session object. Even though the user session is activeand not invalidated,
    stateful session bean is getting timed-out. I am using weblogic 6.1with SP2.
    Please help. Thanks.
    Below is the exception stack trace:
    weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:SearchList
    HandlerBean with primary key:10,085,579,643,420,691 timed-out afterwaiting 0
    ms
    The transaction or thread requesting the lock was:Thread[ExecuteThread:'10'
    f
    or queue: 'default',5,Thread Group for Queue: 'default'].
    at weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLo
    ckManager.java:448)
    at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.j
    ava:258)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSes
    sionManager.java:226)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSes
    sionManager.java:216)
    at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessi
    onManager.java:310)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:11
    7)
    at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject
    java:170)
    at com.sherwin.sweep.services.common.SearchListHandlerBean_w4ccs4_EOImpl
    getSize(SearchListHandlerBean_w4ccs4_EOImpl.java:234)

  • Windows domain controller in a virtual machine: how dangerous is saving its state for a short period of time?

    I have a Windows Server 2012 R2 virtualization cluster. All the hosts are connected to an external storage system, and virtual machines' files are stored on external volumes (CSVs). All the hosts and virtual machines are a part of the same AD domain
    (mixed Windows Server 2012 RTM / 2008 R2 domain controllers). All the domain controllers are running in the virtual machines on the hosts of this cluster.
    To prevent problems when all the hosts are turned off and then on simultaneously (for example, because of a power failure) all the domain controller VM files has been placed on local disks of the virtualization hosts (not on the Cluster Shared
    Volumes). As Hyper-V services don't depend on other Windows Server services (except its networking components), it means that my domain controllers can always start, providing the virtualization host can start at all. However, it also means
    that those DCs cannot be (quickly) migrated to other hosts while their current hosts are being rebooted. So if I need to reboot a virtualization host to install new updates, for example, I have to shut down the corresponding DC, reboot the host
    and wait for the DC to finish cold boot and come back online. It means some interruption of service for our users, which, in turn, requires me to perform the reboots late in night.
    The downtime can be significantly decreased by saving the state of the VM in which the DC is running. However, all the articles I've found on the Internet strongly recommend against it. I'm trying to understand why this recommendation was issued in the first
    place. However, I'm unable to find a clear explanation. I've found some statements that saving state of a DC can cause serious AD replication problems because of tombstoning, and that the password of a DC computer account may be changed
    while the DC itself stays in the saved state, which could prevent the DC from connecting to the domain after its state has been restored. However, those considerations are non-significant when we discuss a short-time
    (5 to 10 minutes) saved state.
    I work with AD and virtualization long time, and I fail to see any danger in saving state of a DC for several minutes. In my opinion, after its state has been restored it would simply replicate all the AD changes from other DCs, and that's all.
    What's your opinion?
    Evgeniy Lotosh
    MSCE: Server infractructire, MCSE: Messaging

    Hello,
    as stated in "http://technet.microsoft.com/en-us/library/virtual_active_directory_domain_controller_virtualization_hyperv(v=ws.10).aspx"
    Operational Considerations for Virtualized Domain Controllers
    Domain controllers that are running on virtual machines have operational restrictions that do not apply to domain controllers that are running on physical machines. When you use a virtualized domain controller, there are some virtualization software features
    and practices that you should not use:
    Do not pause, stop, or store the
    saved state of a domain controller
    in a virtual machine for time periods longer than the tombstone lifetime of the forest and then resume from the paused or saved state.
    This may sound as it is supported to store it for shorter times and use it.
    BUT recommendation also from the Hyper-V Program manager in
    http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/11/24/the-domain-controller-dilemma.aspx recommends against using them.
    Also best practices
    http://blogs.technet.com/b/vikasma/archive/2008/07/24/hyper-v-best-practices-quick-tips-2.aspx
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • Help me in Stateless & Stateful Bean

    hi,
    I'm trying to understand to difference between the stateless and stateful bean. I had created an simple application to test it. But both the beans seems to work in the same way. Could some one explain me with an example the difference between the stateful and stateless bean ...
    I'm using J2EE Reference Implementation and Deploytool .
    Please help me .. Urgent ....
    Cheers !!!
    Prabs

    Thanks!!
    The State Session Bean tries to hold data , even after the client has finished execution. Moreover, the ejbCreate() get fired only once and not for different client.
    Is there anything that I should do to make it stateless.
    this is my code
    Session Bean
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.util.*;
    public class cartEJB implements SessionBean {
         private Map m;
         public cartEJB() { }
         public void ejbCreate() {
         m = new HashMap();
         System.out.println("ejbCreate()");
         public void ejbActivate() { }
         public void ejbPassivate() { }
         public void ejbRemove() { }     
         public void setSessionContext(SessionContext sc) { }
         public void addCart(String product, String price) {
         System.out.println("Its here Man 1");
         m.put(product, price);
         public void showCart() {
              System.out.println("Its here Man 2");
              Set s = m.entrySet();
              Iterator it = s.iterator();
              while(it.hasNext()) {
                   System.out.println(it.next());
    REMOTE
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface cart extends EJBObject {
         public void addCart(String product , String price) throws RemoteException;
         public void showCart() throws RemoteException;
    HOME
    import javax.ejb.EJBHome;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    public interface cartHome extends EJBHome {
         public cart create() throws CreateException, RemoteException;
    client application is an web based application ..
    Client code. ... (jsp:useBean)
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.servlet.http.*;
    public class cartJSP implements HttpSessionBindingListener{
         String Product = new String();
         String Price = new String();
         HttpSession session;
         public cartJSP() {
         public void setProduct(String p){
              this.Product = p;
         public void setPrice(String price) {
              this.Price=price;
         public String getPrice() {
              return Price;
         public String getProduct() {
              return Product;
         public void addIt(String product , String price ) {
         try {
              System.out.println("Comes here");
              Context ic = new InitialContext();
              Object objref = (Object)ic.lookup("ejb/cartJNDI");
              cartHome home = (cartHome)PortableRemoteObject.narrow(objref, cartHome.class);
              cart remote = home.create();          
              remote.addCart(product, price);
              System.out.println("Comes here");
              remote.showCart();     
         catch(Exception e) {
              e.printStackTrace();
         public void showIt() {
         try {
              Context ic = new InitialContext();
              Object objref = (Object)ic.lookup("ejb/cartJNDI");
              cartHome home = (cartHome)PortableRemoteObject.narrow(objref, cartHome.class);
              cart remote = home.create();
              remote.showCart();          
              System.out.println("Comes here 1");
         catch(Exception e) {
              e.printStackTrace();
         public void valueBound(HttpSessionBindingEvent e) {
              session = e.getSession();
              session.setMaxInactiveInterval(60);
              System.out.println("Value Bound");
         public void valueUnbound(HttpSessionBindingEvent e) {
              System.out.println("Value UnBound");
    I'm using J2EE RI 1.3 and I'm deploying components using deploytool.
    Please help me,
    Check the code is wrong or is it a bug in the EJB container.
    regards
    prabu.

  • WL 7.0 Fault-tolerant stateful beans. (Newbie)

    Hello,
    I was wondering if in WL 7.0 there is a way to make a stateful session
    bean automatically persist its state without having to be passivated
    as a whole.
    The bean that I need to build would persist its state to a DB each
    time a remote method call is executed in it. The purpose is to make
    this bean fault tolerant without having to serialize the whole object
    graph by using passivation.
    I heard that WL 7.0 has a new feature that can make this happen but I
    can't seem to find any info on this. Could anyone point me into the
    right search path?
    Thanks in advance.
    Mateo.

    I'm not aware of such feature in WLS 7.0 EJB container.
    Where did you heard about it? If at all there's a feature you should
    be able to locate at our online docs.
    Here's the link
    http://e-docs.bea.com/wls/docs70/ejb/index.html
    Kumar
    Mateo wrote:
    Hello,
    I was wondering if in WL 7.0 there is a way to make a stateful session
    bean automatically persist its state without having to be passivated
    as a whole.
    The bean that I need to build would persist its state to a DB each
    time a remote method call is executed in it. The purpose is to make
    this bean fault tolerant without having to serialize the whole object
    graph by using passivation.
    I heard that WL 7.0 has a new feature that can make this happen but I
    can't seem to find any info on this. Could anyone point me into the
    right search path?
    Thanks in advance.
    Mateo.

  • Stateful  bean handle in HttpSession

              Hi ,
              I have environment where i create a pool of stateful EJB's and I store the pool
              in the servlet context. For each requests I obtain the refernce to the ejbhandle
              from the pool and exceute the method on the stateful bean. I use this ejbhandle till
              the session is ended. Is there any problem with this sort of design in the clustering
              environment?
              As per the httpsession replication after the state of the object stored in the sesion
              is changed , setAttribute method has to be called for the replication. So is it the
              same for ejbhandle also?
              After I call some methos on the SFEJB (getting a reference via EJBHandle in the session),
              do I have to call set sttaribute and pass the ejb handle for the replication?
              Any amount of feed back is appreciated.
              Thanks,
              sri
              

    The handle is serializable and portable. You can put it into the HTTP
              session. If you don't use setAttribute, the data won't get replicated. For
              example:
              Object[] ao = new Object[10];
              session.putAttribute("test", ao);
              // replication occurs
              ... later ...
              Object[] ao = (Object[]) session.getAttribute("test");
              ao[3]="hello world";
              // no replication occurs
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com/coherence.jsp
              Tangosol Coherence: Clustered Replicated Cache for Weblogic
              "sri" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi ,
              >
              > I have environment where i create a pool of stateful EJB's and I store
              the pool
              > in the servlet context. For each requests I obtain the refernce to the
              ejbhandle
              > from the pool and exceute the method on the stateful bean. I use this
              ejbhandle till
              > the session is ended. Is there any problem with this sort of design in
              the clustering
              > environment?
              >
              > As per the httpsession replication after the state of the object stored in
              the sesion
              > is changed , setAttribute method has to be called for the replication. So
              is it the
              > same for ejbhandle also?
              > After I call some methos on the SFEJB (getting a reference via EJBHandle
              in the session),
              > do I have to call set sttaribute and pass the ejb handle for the
              replication?
              >
              > Any amount of feed back is appreciated.
              >
              > Thanks,
              > sri
              >
              

  • Stateful bean not failing over

              I have a cluster of two servers and a Admin server. Both servers are running NT
              4 sp6 and WLS6 sp1.
              When I stop one of the servers, the client does n't automatically failover to
              the other server, instead it fails unable to contact server that has failed.
              My bean is configured to have its home clusterable and is a stateful bean. My
              client holds onto the remote interface, and makes calls through this. If Server
              B fails then it should automatically fail over to server A.
              I have tested my multicast address and all seems to be working fine between servers,
              my stateless bean work well, load balancing between servers nicely.
              Does anybody have any ideas, regarding what could be causing the stateful bean
              remote interface not to be providing failover info.
              Also is it true that you can have only one JMS destination queue/topic per cluster..The
              JMS cluster targeting doesn't work at the moment, so you need to deploy to individual
              servers?
              Thanks
              

    Did you enable stateful session bean replication in the
              weblogic-ejb-jar.xml?
              -- Rob
              Wayne Highland wrote:
              >
              > I have a cluster of two servers and a Admin server. Both servers are running NT
              > 4 sp6 and WLS6 sp1.
              > When I stop one of the servers, the client does n't automatically failover to
              > the other server, instead it fails unable to contact server that has failed.
              >
              > My bean is configured to have its home clusterable and is a stateful bean. My
              > client holds onto the remote interface, and makes calls through this. If Server
              > B fails then it should automatically fail over to server A.
              >
              > I have tested my multicast address and all seems to be working fine between servers,
              > my stateless bean work well, load balancing between servers nicely.
              >
              > Does anybody have any ideas, regarding what could be causing the stateful bean
              > remote interface not to be providing failover info.
              >
              > Also is it true that you can have only one JMS destination queue/topic per cluster..The
              > JMS cluster targeting doesn't work at the moment, so you need to deploy to individual
              > servers?
              >
              > Thanks
              Coming Soon: Building J2EE Applications & BEA WebLogic Server
              by Michael Girdley, Rob Woollen, and Sandra Emerson
              http://learnweblogic.com
              

  • SelectBooleanCheckbox keeping its state during a session.

    Hello,
    I have this checkbox and I want to save its state (selected or unselected).
    I want to select the checkbox, go to another page and come back, and still the checkbox has to be selected.
    What I did so far was:
    Set the "binding" property on a selectBooleanCheckbox attribute in the backing bean.
    Set the "valueChangeListener" to a method in the backing bean.
    Create a managed session bean with a checkboxstate boolean variable and getters and setters.
    Set the "value" property on the variable in the session bean through an EL expression (created with the wizard when you press the "..." button).
    Besides that I'm not sure I'm doing the right things I get an error when I run the page.
    javax.faces.el.PropertyNotFoundException: Error testing property 'checkBoxState' in bean of type null.
    Anyone who can point me in the right direction?
    Lennert

    Hi,
    check the EL you use. It seems to point either to a non existing managed bean or a non existing method
    Frank

  • Stateful beans in cache doesn't seem to work

    I have a stateful bean that I have set max beans in cache to "1". When I deploy it, no errors reported or so, the Weblogic console still states "8" in the column "Cached Beans Current Count" when monitoring the bean.
    When I view the descriptor in the console it looks fine. What can be wrong here?
    Using Weblogic 8.1 SP4, here's the statueful descriptor:
    <weblogic-enterprise-bean>
    <ejb-name>MyStatefulBean</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-cache>
    <max-beans-in-cache>1</max-beans-in-cache>
    </stateful-session-cache>
    <allow-concurrent-calls>True</allow-concurrent-calls>
    </stateful-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>test.mystatefulbean/MyStatefulBean/Home</jndi-name>
    <local-jndi-name>test.mystatefulbean/MyStatefulBean/LocalHome</local-jndi-name>
    </weblogic-enterprise-bean>

    I agree with you about the host not being able to install (or at least don't want to install/upgrade) their servers to php5.4...  Unfortunately, I can't change that...  but by shutting them off took care of all the quotes (single & double) and any other characters which would basically function like an addslashes() command.  I'll paste the script below...  It's still pretty much the same as when you helped me out with the script...  Just minor adjustments:::  If you can show me (even though I fixed the problem) how I would integrate the stripslashes() function to the comment field it would be helpful to know for future reference.
    <?php // Script 1.0 - contactlist.php
    if (isset($_POST['submit']) && !empty($_POST['submit'])) // Test if submit button named submit was clicked and not empty
              if (!empty($_POST['first']) && !empty($_POST['last'])  && !empty($_POST['email']) && !empty($_POST['phone']) && !empty($_POST['comment'])) {
    $comment=stripslashes($_POST[comment]);
                        $body = "First Name: {$_POST['first']}\nLast Name: {$_POST['last']}\nEmail Address: {$_POST['email']}\nContact Phone Number: {$_POST['phone']}\nContact Preference: {$_POST['contactvia']}\n\nBest Time To Contact: {$_POST['timepref']}\n\nComments:\n {$_POST['comment']}";
                        $body = wordwrap($body, 70);
                        mail([email protected]', 'NEW Customer Inquiry Submission',$body, "From: {$_POST['email']}");
                        header('Location: index.html');  //Redirect to new url if form submitted
    ?>

  • HT1212 How do I reset my sons Ipad, when its states that its Disabled and to connect to itunes, and when I do its states that its locked and I need to entre that password, but I cant because its DISABLED!

    How do I reset my sons Ipad, when its states that it's disabled and to conect to itunes, and when I do i get a message thats that says I need to entre a password, but I cant as the Ipad is Disabled

    Ive found the solution,
    TillyLove13 wrote:
    Sorry to hear, I am having the same issue myself, I entered a new passcode last night after i synced the new ios 7 cant rememeber my numbers all i remember is i used 2 and 3 and i got it to where i disabled my ipad. I used the connect to itunes as my restore but its not giving me any options thats helpfull it says restore and update im thinking maybe wipe my ipad and than put the new ios 7 in but nope seens mine was synced yesterday it only restores it back to previous locked position. im trying to get some way around it myself as soon as i find out ill make you aware. good luck. im sorry your probably just as flusterated as me

  • Function of 'Declare' in Stored Procedure statements

    Dear Readers,
    Can someone tell me what is the difference when we use Declare and don't use declare in the create stored procedure statement. Please see below:
    Create proc education
    AS
     Declare @name varchar(20)
    Select @name='John'
    GO
    When I run this store procedure nothing is happening, I don't know why?
    BUT
    When I run the same procedure without Declare it runs. see e.g. below:
    Create Proc learn
    @name varchar(20)
    AS
    Select @name
    GO
    It runs successfully. What is the difference between Declare  and when I don't use Declare?

    Try:
    Create proc education
    AS
    Declare @name varchar(20)
    Select @name='John'
    Select @name
    GO
    exec education;
    -- John
    The first SELECT is only an assignment statement. You can use SET as well.
    Create proc education1
    AS
    Declare @name varchar(20)
    SET @name='John'
    Select @name
    GO
    exec education1;
    -- John
    In the parameterized sp, the @name is set when the sp is called (exec).
    Example for stored procedure with parameters:
    http://www.sqlusa.com/bestpractices2008/stored-procedure-parameters/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Issue with : Stateful BSP Applications: New State Management Option

    Reference:weblog by Thomas Jung -  /people/thomas.jung3/blog/2004/11/09/updated-stateful-bsp-applications-new-state-management-option
    I see a comment by one user to send the complete code... I am not sure what else can be sent   - try it out rather than getting spoon-fed. - getting offline - sorry...
    I had two issues with this ITSM way of session handling.
    First - if you are using an SP42 environment, check CL_BSP_RUNTIME=>ON_SESSION_CMD() to see if CANCEL is defined as an option. If not make sure that you use &sap-sessioncmd=CLOSE" instead of the &sap-sessioncmd=CANCEL" . If CANCEL is not defined , it will give you shortdumps...
    Second - when I closed the window, the session was not terminated. I used onbeforeUnLoad="exitBSPApplication(); instead of onUnLoad="exitBSPApplication(); and it worked fine. Not sure if it has any other issues.
    But now I am facing a new issue... all but one application is not ending... I have no clue on why this is happening.. I am still checking..
    Thanks Thomas, you are the best, as always...

    Thanks for checking the code in your system.
    After some investigation, I found the behavior as explained below.
    If the actual url has any fields passed as parameters, e.g.. /default.htm?var1=a&var2=2 ...
    - if I use CANCEL as the option, a shortdump is created and the session is not closed. if I use CLOSE, Session is terminated and no shortdump happens.
    If the actual url does not have any parameters, e.g.. /default.htm ...
    - CANCEL does the work, but CLOSE does not exit the session.
    In my applications I used request->get_form_fields to see if there are any parameters, and if there are, then I use CLOSE as the option and else, I use CANCEL. So now, the session
    management works beautifully...
    There is a good chance that I am doing something wrong here too.

  • Stateful skins with custom states

    Hi, i'm desperately trying to create a stateful skins with
    custom states defined in my component.
    However, all stateful skins examples i've found so far use
    built-in flex statex, mostly from buttons, to accomplish this.
    when i define my own states, the ProgrammaticSkin class
    doesn't seem to know about my custom states.
    Has anyone a hint how to do this ?
    thanks!

    "pulse00" <[email protected]> wrote in
    message
    news:gmaoou$bta$[email protected]..
    > Hi, i'm desperately trying to create a stateful skins
    with custom states
    > defined in my component.
    >
    > However, all stateful skins examples i've found so far
    use built-in flex
    > statex, mostly from buttons, to accomplish this.
    >
    > when i define my own states, the ProgrammaticSkin class
    doesn't seem to
    > know
    > about my custom states.
    >
    > Has anyone a hint how to do this ?
    What are you wanting to apply the skins to that knows how to
    get the state
    information into your skin?

Maybe you are looking for