Weblogic shutdown and MDB method calls

Hi,
We have message driven beans deployed on Weblogic 7.0.2 server. We have a situation where there are messages pending on the JMS Queue(a persistent store is configured.) and the MDB instances will be processing the meesages from the queue. We need to restart the weblogic server at this point.
My doubt is what happens to the messgaes which were being processed in the onMessage method of the MDB. If the server is shutdown, will these messages that were being processed also be backed up to the persistent store or will these be lost?
There may be additional messages coming in while the server is being shutdown.
What is the best way to shutdown the weblogic server without losing any of the messages?
Any pointers to additional info will be highly appreciated.
Thanks in advance,
Amit

<Amit Kulkarni> wrote in message news:[email protected]..
We have message driven beans deployed on Weblogic 7.0.2 server. We have a situation where there are messages pending on the JMSQueue(a persistent store is configured.) and the MDB instances will be processing the meesages from the queue. We need to restart
the weblogic server at this point.
My doubt is what happens to the messgaes which were being processed in the onMessage method of the MDB. If the server is shutdown,will these messages that were being processed also be backed up to the persistent store or will these be lost?
There may be additional messages coming in while the server is being shutdown.
What is the best way to shutdown the weblogic server without losing any of the messages?
Any pointers to additional info will be highly appreciated.Have a standby instance running and switch network to that instance before taking first one down or set up a full-blown cluster.
Regards,
Slava Imeshev

Similar Messages

  • DoPost() and doGet() method calling

    Hi All,
    What is the purpose of calling the doGet() method inside of doPost() instead of calling it directly.
              doPost(HttpServletRequest request, HttpServletResponse response){
                                    doGet(request,response);
                why we are calling the doGet() method like thisThanks in Advance,
    mahes

    Seemingly the post and the get do exactly the same thing, so to avoid duplicate code, (s)he just simply had one call the other.
    However, you shouldn't really do it this way. You should break out the parts of the methods that are the same into new methods, and call these new methods from both the post and get methods. That will allow the two methods to handle some other things slightly differently. I.E. the get method is not suppossed to cause side effects (i.e. you are not suppossed to change any data when using a get method) whereas post methods can.

  • Working with class based exception and dynamic method calls

    Hi Gurus,
    we just changed out ERP from EHP6 to EHP7.
    Since we did so we are facing an issue with an Z-Report we are using quite often.
    This reports looks up Workitems and executes the according methods so that we can go into debugging if we were facing any problems or errors.
    since the EHP Upgrade this statement has problems:
      data:        lt_parmbind   type abap_parmbind_tab,         lt_excpbind   type abap_excpbind_tab,         lo_runtime    type ref to object.     call method lo_runtime->(iv_cls_method)       parameter-table       lt_parmbind       exception-table       lt_excpbind.this CALL METHOD Statement has Problem with the Exception Table. We are quite often getting DYN_CALL_METH_EXCP_NOT_FOUND short dumps with Exception "CX_SY_DYN_CALL_EXCP_NOT_FOUND".
    The system has problems handling the content of lt_excpbind. if i clear this table the CALL METHOD statement works fine.
    AS an example we are trying to call /IDXGC/CL_PD_PROCESS_STEPS-->CREATE_DATA. This method has 2 exceptions
    /IDXGC/CX_PROCESS_ERROR
    Process Layer Exception
    CX_BO_TEMPORARY
    Temporary Business Exception
    The Content of LT_EXCPBIND is
    INDEX
    NAME
    VALUE
    2
    /IDXGC/CX_PROCESS_ERROR
    1
    2
    CX_BO_TEMPORARY
    2
    From my point of view the Problem ist, that they are marked as "class based". I think so because if you looked up the SAP Help for the EXCEPTION-TABLE Statement it is written that is statement only works for none-classbased exception.
    I think that restriction is quiet clear. But what i am wondering about is.. that restriction also exists for EHP6. And in EHP6 it work. Does anyone know why? Or how i can change me CALL METHOD Statement that i will work again?
    Best Regards
    Udo

    Class-based exceptions must be caught using try/catch statement.
    Calling dynamically a method catchable exceptions are:
    CX_SY_DYN_CALL_EXCP_NOT_FOUND
    CX_SY_DYN_CALL_ILLEGAL_CLASS 
    CX_SY_DYN_CALL_ILLEGAL_METHOD
    CX_SY_DYN_CALL_PARAM_MISSING 
    CX_SY_DYN_CALL_PARAM_NOT_FOUND 
    CX_SY_REF_IS_INITIAL
    Anyway catching cx_root (as shown by Matthias) will catch everything is catchable.

  • The dot operator and a method called 'cons'?

    I'm trying to write a static method that takes a list of things (array or List objects).
    It returns another list based on the first but changed by some rule.
    I am told that I have:
    non-static methods - head, tail, cons, isEmpty
    a static method - empty (creates a new list)
    I have to assume (was not told) that:
    'head' returns the object at the head of our list
    'tail' returns the next object from the one we are looking at
    'isEmpty' returns a boolean if nothing there.
    and lastly:
    'cons' which meant nothing to me but I have been advised that it probably does something like concatonates or adds to the end of.
    1. Is this name (cons) in popular use & what does a method with that name usually do?
    2. Assuming I'm right and I want to step through adding the elements in turn.
    Which do you think would be the right way to add/append/concatonate (or whatever) the current element to my newList?
    newList = newList.cons(lst.head()); or
    newList = lst.head().cons(newList);('lst' being the particular list we're looking at)
    Is there something else I should have written?
    For some reason I find this very confusing!

    Yes, something like that :)
    Now let's see what we have to do...
    1. if the list is empty we can just return it.
    2. if the head of the list is the same as 'target' and n is 0 (or 1), take the tail of the list, add 'alternate' to it, and return it. I.e. return lst.tail().cons(alternate); (syntax depends on what arguments your cons takes, I guess)
    3. if the head of the list matches again but n > 0 (or 1), decrement n by one and recurse with the tail, add head to the result; return changeNth(lst.tail(), ...., n-1).cons(lst.head())
    4. else it is safe to recurse with the tail; return changeNth(lst.tail(), .....).cons(lst.head())
    The code with Lots of Idiotic Silly Parentheses would look a bit like(defun changeNth (lst target alternate n)
      (cond
        ((null lst) lst)
        ((equal target (first lst))
          (if (= n 0)
            (cons alternate (rest lst))
            (cons (first lst)
              (changeNth (rest lst) target alternate (- n 1)))))
        (t (cons (first lst) (changeNth (rest lst) target alternate n)))))

  • How to print a method trace to a file (first method called to the end)

    I have a tomcat war that I am deploying. I want to use some command line parameter or some tool that will show me a method trace of each method that gets executed.
    There is some static initializer in the code that starts everything in the war (the war is not a web app) but simply a process that runs in the background that does stuff.
    I want to find out what the first method called in the war is and to locate the static initializer. Having a method trace would do this because this method would be printed out first.
    After the static initializer gets called I want to see a method trace of all methods called. Having this printed to a file like Class:Method(params) would be nice.
    Even better would be some sort of tool that I could open a trace file with and see method calls in the order they were called.
    I tried several Java profiling tools but none of them show me the order (first to last) of the methods called. All I need is to see a method trace from beginning to end.
    Any help would be appreciated.

    JProbe provided almost everything I needed to see a method call trace. The method graph feature was great.
    I have a single static class with a static initializer that runs in a loop but did not know what the class name was (I inherited some code and was told about the static initializer).
    So when I fired it up in JProbe it showed me the class running off the root thread. In fact I found another static initializer that was unknown to me and another oddity as well.
    The only problem is that the method call graph is collapsed and you need to click [+] to expand every method call.
    I am told by JProbe support that there was an "expand all" option in JProbe 7.0 but it is not there in 7.1.
    Not sure why they took the time, money and energy to take a needed feature out.
    It would be great to have something that did the same thing from the command line or to be able to print a method call trace out to a file but not sure how to do this.

  • Question about method calling (Java 1.5.0_05)

    Imagine for example the javax.swing.border.Border hierarchy.
    I'm writing a BorderEditor for some gui builder, so I need a function that takes a Border instance and returns the Java code. Here is my first try:
    1 protected String getJavaInitializationString() {
    2     Border border = (Border)getValue();
    3     if (border == null)
    4         return "null";
    5
    6     return getCode(border);
    7 }
    8
    9 private String getCode(BevelBorder border) {...}
    10 private String getCode(EmptyBorder border) {...}
    11 private String getCode(EtchedBorder border) {...}
    12 private String getCode(LineBorder border) {...}
    13
    14 private String getCode(Border border) {
    15     throw new IllegalArgumentException("Unknown border class " + border.getClass());
    16 }This piece of code fails. Because no matter of what class is border in line 6, this call always ends in String getCode(Border border).
    So I replaced line 6 with:
    6     return getCode(border.getClass().cast(border));But with the same result. So, I try with the asSubClass() method:
    6     return getCode(Border.class.asSubClass(border.getClass()).cast(border));And the same result again! Then i try putting a concrete instance of some border, say BevelBorder:
    6     return getCode(BevelBorder.class.cast(border));Guess what! It worked! But this is like:
    6     return getCode((BevelBorder)border);And I don't want that! I want dynamic cast and correct method calling.
    After all tests, I give up and put the old trusty and nasty if..else if... else chain.
    Too bad! I'm doing some thing wrong?
    Thank in advance
    Quique.-
    PS: Sorry about my english! it's not very good! Escribo mejor en espa�ol!

    Hi, your spanish is quite good!
    getCode(...) returns the Java code for the given border.
    So getCode(BevelBorder border) returns a Java string that is something like this "new BevelBorder()".
    I want Java to resolve the method to call.
    For example: A1, A2 and A3, extends A.
    public void m(A1 a) {...}
    public void m(A2 a) {...}
    public void m(A3 a) {...}
    public void m(A a) {...}
    public void p() {
        A a = (A)getValue();
        // At this point 'a' could be instance of A1, A2 or A3.
        m(a); // I want this method call, to call the right method.
    }This did not work. So, i've used instead of m(a):
        m(a.getClass().cast(a));Didn't work either. Then:
        m(A.class.asSubClass(a.getClass()).cast(a));No luck! But:
        m(A1.class.cast(a)); // idem m((A1)a);Woks for A1!
    I don't know why m(A1.class.cast(a)) works and m(a.getClass().cast(a)) doesn't!
    thanks for replying!
    Quique

  • A tricky way to twick ValueBinding language to bind a method call

    Here is the scenario:
    I'd like component can bind value to method call(with parameters) to a java instance, of course including backingBean.
    I wish this solution would be useful, especially when you are working in iteration component such as ForEach, TreeView or DataTable, EL ValueBinging language might be too restricted to complex expression. This way, you can pass iteration items as parameters into a method can and return a value to you page by valuebinding language
    In JSP:
        <h:outputText value="#{Page1.callHelper[Page1]['targetMethod']['James'][Page1.callEnd]}"/>In PageBean:
         public String targetMethod(String name){
             return "Hello, " + name +"!";
        private CallHelper callHelper = new CallHelper();
         public CallHelper getCallHelper() {
              return callHelper;
         public void setCallHelper(CallHelper callHelper) {
              this.callHelper = callHelper;
         private CallEnd callEnd = new CallEnd();
         public CallEnd getCallEnd() {
              return callEnd;
         public void setCallEnd(CallEnd callEnd) {
              this.callEnd = callEnd;
         }Util classes:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.ArrayList;
    import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Map;
    public class CallHelper extends LinkedHashMap {
         private CallHelper parent;
         public Object get(Object key){
              if(key instanceof CallEnd)return getRoot().methodCall();
              else{
                   Object value = super.get(key);          
                   if(value == null){
                        value = new CallHelper();
                        put(key, value);
                        ((CallHelper)value).parent = this;
                   return value;
         public boolean containsKey(Object key){
              return true;
         public boolean realContainsKey(Object key){
              return super.containsKey(key);
        protected CallHelper getRoot(){
             CallHelper root = this;
             if(root.parent==null)return root;
             else return root.parent.getRoot();
         protected Object methodCall(){
              Object result = null;
             List callParameters = new ArrayList(2);
             listCallParameters(callParameters, this);
             if(callParameters.size()>1){
                  Object instance = callParameters.get(0);
                  String methodName = callParameters.get(1).toString();
                  List methodParameters = new ArrayList();
                  for(int i=2; i<callParameters.size(); i++){
                       methodParameters.add(callParameters.get(i));
                  Method method = findMethod(instance, methodName, methodParameters);
                  if(method != null){
                       try {
                             result = method.invoke(instance, methodParameters.toArray());
                        } catch (IllegalArgumentException e) {
                        } catch (IllegalAccessException e) {
                        } catch (InvocationTargetException e) {
              this.clear();
              return result;
         private void listCallParameters(List list, Map map){
              if(map==null || !map.keySet().iterator().hasNext())return;
              Object key = map.keySet().iterator().next();
              if(key instanceof CallEnd)return;
              list.add(key);
              listCallParameters(list, (Map)map.get(key));
         private Method findMethod(Object instance, String methodName, List parameters){
              Method result = null;
              Method[] methods = instance.getClass().getMethods();
              for(int i=0; i<methods.length; i++){
                   if(methods.getName().equals(methodName)){
                        System.out.println(methodName);
                        Class[] paraClasses = methods[i].getParameterTypes();
                        if(paraClasses.length==parameters.size()){
                             boolean match = true;
                             for(int j=0; j<paraClasses.length; j++){
                                  if(parameters.get(j)!=null && !paraClasses[j].isInstance(parameters.get(j))){
                                       match = false;
                                       break;
                             if(match){
                                  result = methods[i];
                                  break;
              return result;
    public class CallEnd {
    Improvement:
    Anyone can make it thread safety and bind callhelper and callend directly to FacesContext properties rather than each backingBean.
    Have fun!
    And feel free to contect me at:
    [email protected]
    [email protected]

    You must seperate your parameter preparing and action method calling for sure.
    It depends on what kind of parameters you need to pass in:
    1. If action method is bound to several buttons, and it just wants to know which button was clicked, you can set actionListener to prepare it for you. Because the event includes the information you need.
    2. For other kinds of parameters, you can use ValueBinding Language to bind parameter values to backingBean, then the action method(without parameters) can pick parameters up from backingBean.

  • MDB/JRun: "Application authentication required. Incorrect method call."

    Hi people!
    I am using a message-driven EJB listening on a queue.
    Everytime a start the server, the server deploys the enterprise
    application with the MDB and the queue, and then gives this error
    message:
    "Application authentication required. Incorrect method call."
    What am I missing?
    Here are more details: The server is in fact CFMX6.1 in
    standalone installation and I am using the hidden JRun inside it.
    Here is an extract of ejb-jar.xml:
    <message-driven>
    <ejb-name>ij.portal.EventExecutor</ejb-name>
    <ejb-class>ij.portal.EventExecutor</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <!--javax.jms.Queue or javax.jms.Topic-->
    <destination-type>javax.jms.Queue</destination-type>
    <!--Durable or NonDurable-->
    <subscription-durability>Durable</subscription-durability>
    </message-driven-destination>
    <!--
    The queue that this MDB listens to. The name must be mapped
    to
    a real JNDI name in jrun-ejb-jar.xml.
    -->
    <resource-env-ref>
    <resource-env-ref-name>EventQueue</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
    </resource-env-ref>
    </message-driven>
    A part of the jrun-ejb-jar.xml is:
    <message-driven>
    <ejb-name>ij.portal.EventExecutor</ejb-name>
    <jndi-name>ij.portal.EventExecutor</jndi-name>
    <resource-env-ref>
    <resource-env-ref-name>EventQueue</resource-env-ref-name>
    <jndi-name>jms/queue/EventQueue</jndi-name>
    <mdb-destination>jms/queue/EventQueue</mdb-destination>
    </resource-env-ref>
    <message-driven-subscription>
    <client-id>MDBSubscriber</client-id>
    </message-driven-subscription>
    </message-driven>
    Finally, here is the jrun-resources.xml that defines the
    queue:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    <!DOCTYPE jrun-resources PUBLIC "-//Macromedia Inc.//DTD
    jrun-resources 4.0//EN"
    http://jrun.macromedia.com/dtds/jrun-resources.dtd">
    -->
    <jrun-resources>
    <jms-destination>
    <jndi-name>jms/queue/EventQueue</jndi-name>
    <destination-name>EventQueue</destination-name>
    <destination-type>javax.jms.Queue</destination-type>
    </jms-destination>
    <jms-connection-factory>
    <!-- jms provider factory name. Optional-->
    <factory-name>QueueConnectionFactory</factory-name>
    <!-- jndi name - name under wich this connection factory
    will be available -->
    <!-- to client in jndi. Required. -->
    <jndi-name>jms/jndi-QueueConnectionFactory</jndi-name>
    <!-- connection factory type (required ifno -->
    <!-- can be one of the -->
    <!-- following: -->
    <!-- javax.jms.QueueConnectionFactory, -->
    <!-- javax.jms.XAQueueConnectionFactory, -->
    <!-- javax.jms.TopicConnectionFactory -->
    <!-- javax.jms.XATopicConnectionFactory -->
    <type>javax.jms.QueueConnectionFactory</type>
    <!-- jms transport (rmi, tcpip, rmiiiopi, intravm). -->
    <!-- Required if no factory name was specified. -->
    <transport>RMI</transport>
    <!-- userName and password required if seamless
    authorization will be used -->
    <!-- (can be specified and updated, upon application
    deployment via resorce-ref) -->
    <username>guest</username>
    <password>guest</password>
    </jms-connection-factory>
    <!-- MDB specifc connection factory - utilizes intra vm
    connection, cannot be used by remote client -->
    <jms-connection-factory>
    <!-- jms provider factory name. Optional-->
    <factory-name>MDBQueueConnectionFactory</factory-name>
    <!-- jndi name - name under wich this connection factory
    will be available -->
    <!-- to client in jndi. Required. -->
    <jndi-name>jms/jndi-MDBQueueConnectionFactory</jndi-name>
    <!-- connection factory type (required ifno -->
    <!-- can be one of the -->
    <!-- following: -->
    <!-- javax.jms.QueueConnectionFactory, -->
    <!-- javax.jms.XAQueueConnectionFactory, -->
    <!-- javax.jms.TopicConnectionFactory -->
    <!-- javax.jms.XATopicConnectionFactory -->
    <type>javax.jms.QueueConnectionFactory</type>
    <!-- jms transport (rmi, tcpip, rmiiiopi, intravm). -->
    <!-- Required if no factory name was specified. -->
    <transport>INTRAVM</transport>
    <!-- username and password required if seamless
    authorization will be used -->
    <!-- (can be specified and updated, upon application
    deployment via resorce-ref) -->
    <username>guest</username>
    <password>guest</password>
    </jms-connection-factory>
    </jrun-resources>
    What am I doing wrong? I should add that the queue and the
    MDB actually work. I just want to get rid of the error message.
    I have found out that the error message comes from the class
    jrun.jms.wrapper.enterprise.JRunConnectionFactoryWrapper, method
    createQueueConnection, when instance variable m_useContainerAuth is
    false.

    When i login with the password and username from my custom authentication provider, my login module check ok, but logon form still there.

  • How to load a class dynamically and then a call a method?

    Hi
    I want to call a method from a class,which class is loaded dynamically.
    Consider a classA and ClassB..
    ClassB contains a method showvalue() which returns a String value.
    I want to load a ClassB dynamically in ClassA,and call the method showvalue() and print the returned value of that method (showvalue).
    How to do this?
    Thanks

    Since you found your way to Reflections and Reference Objects, I can only assume you know that reflection is the answer. Since the reflection tutorial on this site, and indeed, the many others on the web, can explain this a whole lot better and more consisely than can be done in a forum, I'll point you in that direction instead. As a starting point, and to show I'm not just fobbing you off, you're interested in the classes java.lang.Class, java.lang.reflect.Method, and the method Class.getMethod(String, Class[])

  • Error in CALL TRANSACTION and SESSION Method

    I have 8 records (1,2,3,4,5,6,7,8) to update into SAP database using CALL TRANSACTION and SESSION Method. If there is a error in 6th record. What happens in both call transaction and session method.
    Please let me know which records will process and what about the error record. How to process only the error record if all other records have updated into database.

    Hi Patil_sumeet,
    if your code for this is not protected secret of some federal agency, you may read [How to post code in SCN, and some things NOT to do...|How to post code in SCN, and some things NOT to do...; and then post relevant lines here.
    According to the facts presented until know it may have been better to ask Radio Eriwan
    Regards
    Clemens

  • WebLogic Datasources : Automatically Shutdown and Start up

    Hi there,
    I have a problem with my datasources, I have WLST script which shutdown and start automatically some datasources in my environment, all of them in my crontab !
    Follow exactly my script !
    [weblogic@wls_server restartDS]$ cat shutdownDS1.py | more
    connect('weblogic','password','t3://server:10000')
    domainConfig()
    servers = cmo.getServers()
    domainRuntime()
    for server in servers:
    try:
    print 'check ' + server.getName()
    print '/ServerRuntimes/' + server.getName() + '/JDBCServiceRuntime/' + server.getName() + '/JDBCDataSourceRuntimeMBeans/MYDATASOURCE-XA1'
    cd('ServerRuntimes/' + server.getName() + '/JDBCServiceRuntime/' + server.getName() + '/JDBCDataSourceRuntimeMBeans/MYDATASOURCE-XA1')
    objectArray = jarray.array([], java.lang.Object)
    stringArray = jarray.array([], java.lang.String)
    invoke('shutdown', objectArray, stringArray)
    except WLSTException,e:
    print server.getName() + 'is not running.'
    for server in servers:
    try:
    print 'check ' + server.getName()
    print '/ServerRuntimes/' + server.getName() + '/JDBCServiceRuntime/' + server.getName() + '/JDBCDataSourceRuntimeMBeans/MYDATASOURCE-XA2'
    cd('ServerRuntimes/' + server.getName() + '/JDBCServiceRuntime/' + server.getName() + '/JDBCDataSourceRuntimeMBeans/MYDATASOURCE-XA2')
    objectArray = jarray.array([], java.lang.Object)
    stringArray = jarray.array([], java.lang.String)
    invoke('shutdown', objectArray, stringArray)
    except WLSTException,e:
    print server.getName() + 'is not running.'
    exit()
    Don´t worry, I have another script which kill XA3 and XA4 datasources as well, so, this way, I have load balancing here !
    It works with CRONTAB !
    The problem here is : Doesn´t matter if datasources are running or not, simply , datasources automatically shutdown and after that, start it! But I would like to improve this, I would like to implement datasource status condition, I mean, when datasource it become overloaded, it kill automatically , this way, I would not use crontab, but another kind of trigger |!
    Did you see this before ?
    I would like to improve this workaround !
    Just keep in mind, me and my team, didn´t discover the root cause yet, so, this automatically datasource restart is a kind of workaround!
    Thanks in advance !
    Edson

    Hmm. what was the problem app?
    Force a shut down by holding the power button for an extended amount.
    Reboot into SafeBoot mode to clear cache files, then reboot as normal.
    SafeBoot  http://support.apple.com/kb/HT1564

  • [svn] 2622: TextBox and TextGraphic now call applyDisplayObjectProperties() at the end of their draw() method, like all other GraphicElements.

    Revision: 2622
    Author: [email protected]
    Date: 2008-07-24 16:13:32 -0700 (Thu, 24 Jul 2008)
    Log Message:
    TextBox and TextGraphic now call applyDisplayObjectProperties() at the end of their draw() method, like all other GraphicElements. This method handles setting the visibiliy of the GraphicElement's DisplayObject, among other things.
    Note: We should make it unnecessary for each GraphicElement subclass to have to call applyDisplayObjectProperties() at the end of draw(). The GraphicElement base class should ensure that this gets called at the appropriate time.
    Group now calls draw() on graphic elements even if they are invisible, because otherwise applyDisplayObjectProperties() never gets called and the TextLines stay visible. Group was assuming that the only visible stuff in a GraphicElement is drawn with Graphics calls, which isn't the case.
    This change is OK for now because every GraphicElement currently has its own DisplayObject, but it will need to be rethought when GraphicElements share DisplayObjects.
    Reviewer: Chet
    Bug: MXMLG-206 ("Setting visible property on TextGraphic does nothing")
    QA: Peter, please add a Mustella test case for the 'visible property of TextBox and TextGraphic
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/MXMLG-206
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as

    Changes for spine&#8211;aligned head:
    public class StickManTool extends JPanel
        public StickManTool ()
            limbs [16] = new Limb (lankle, lfoot, 1);
            head = new Head2D (limbs[0]);
        protected void paintComponent (Graphics g)
            head.draw(graphics);
        private void updateLimbs (Point start, Point end)
            head.setPosition();
    class Head2D extends Ellipse2D.Double
        public static double width = 30;   // width of head
        public static double height = 40;  //height of head
        Point atlas;
        Point pelvis;
        private AffineTransform xform = new AffineTransform();
        public Head2D(Limb spine)
            super ();
            atlas = spine.movingJoint;
            pelvis = spine.fixedJoint;
            setPosition();
        public void setPosition()
            // Find angle of spine.
            double dy = atlas.y - pelvis.y;
            double dx = atlas.x - pelvis.x;
            double theta = Math.atan2(dy, dx);
            //System.out.printf("theta = %.1f%n", Math.toDegrees(theta));
            // Find center of head as extension along spine from atlas.
            double cx = atlas.x + (height/2)*Math.cos(theta);
            double cy = atlas.y + (height/2)*Math.sin(theta);
            // Move to origin of head.
            xform.setToTranslation(cx-width/2, cy-height/2);
            // Rotate head about its center.
            xform.rotate(theta+Math.PI/2, width/2, height/2);
        public void draw(Graphics2D g2)
            g2.draw(xform.createTransformedShape(this));
        public double getWidth () { return width; }
        public double getHeight () { return height; }
        public void setWidth (double widthIn) { width = widthIn; }
        public void setHeight (double heightIn) { height = heightIn; }
    }

  • Method calls in switch and for statements

    I have 2 questions concerning method calls in switch and for statements. Consider these two chunks of code:
    1)
         switch (foo.getIntegerValue()){
              case 1:
              case 2:
         }My question is, is getIntegerValue() being called for every case statement (since it has to compare with each case) or is the method called only once?
    2)
    for (Foo bla : xyz.compileFoos()) {
    }Is compileFoos called once or on every iteration?
    I assume it gets called only once but I would like to be sure. The reason I ask is of course to avoid multiple method calls.
    any help is appreciated

    sdb2 wrote:
    I have 2 questions concerning method calls in switch and for statements. Consider these two chunks of code:
    1)
         switch (foo.getIntegerValue()){
              case 1:
              case 2:
         }My question is, is getIntegerValue() being called for every case statement (since it has to compare with each case) or is the method called only once?
         Once, and the value returned compared to each "case" in turn.
    2)
    for (Foo bla : xyz.compileFoos()) {
    }Is compileFoos called once or on every iteration?
    I assume it gets called only once but I would like to be sure. The reason I ask is of course to avoid multiple method calls.
    any help is appreciatedAlso once, and the returned list/set/array is iterated over.

  • Combine standard task (ABAP method call) and additional UWL Action Handlers

    Hi, i have defined a task with an asynchronous ABAP method call and a terminating event which i want to use "as is" in the universal worklist, that means that the standard action has to be the ABAP method call defined for the task.
    In addition to that i want to add an extra button to the workitem view in the worklist which opens a web dynpro application. The web dynpro needs a parameter from the workitem container. Opening the web dynpro is not required for completing the task, so i do not consider using secondary methods.
    I created an UWLConfiguration for the task type without defining the defaultAction attribute, since defaultAction should not be overwritten. I wanted to use SAPWebDynproABAPLauncher to generate the button since i can easily include values from the workitem container in the call.
    When executing a workitem from the worklist the ABAP method call is not performed, instead a window opens which just displays the workitem. The button to web dynpro is generated and works fine.
    Does anyone have a clue how i can use UWL to define an additional button with SAPWebDynproABAPLauncher without overwriting the standard task definition?
    My definition:
    <ItemTypes>
        <ItemType
    name="uwl.task.webflow.TS95100103"
    connector="WebFlowConnector"
    defaultView="DefaultView">
          <ItemTypeCriteria
    systemId="ED1CLNT100"
    externalType="TS95100103"
    connector="WebFlowConnector"/>
          <CustomAttributes>
            <CustomAttributeSource
    id="WEBFLOW_CONTAINER"
    objectIdHolder="externalObjectId"
    objectType="WebFlowContainer"
    cacheValidity="final">
              <Attribute
    name="HROBJECT_OBJEKTID"
    type="string"
    displayName="HROBJECT_OBJEKTID"/>
            </CustomAttributeSource>
          </CustomAttributes>
          <Actions>
            <Action
    name="launchWebDynPro"
    groupAction=""
    handler="SAPWebDynproABAPLauncher"
    returnToDetailViewAllowed="yes"
    launchInNewWindow="yes"
    launchNewWindowFeatures="resizable=yes,scrollbars=yes,
    status=yes,toolbar=no,menubar=no,
    location=no,directories=no">
              <Properties>
                <Property
    name="WebDynproApplication" value="hr01_app"/>
                <Property
    name="newWindowFeatures"
    value="resizable=yes,scrollbars=yes,status=yes,
    toolbar=no,menubar=no,location=no,directories=no"/>
                <Property
    name="DynamicParameter"
    value="candidacy_id=${item.HROBJECT_OBJEKTID}
    &amp;from_workflow=X"/>
                <Property
    name="openInNewWindow" value="yes"/>
                <Property
    name="System" value="SYSTEM_ALIAS_ERP"/>
                <Property
    name="WebDynproNamespace" value="hr01"/>
              </Properties>
              <Descriptions default="Show"/>
            </Action>
          </Actions>
        </ItemType>
      </ItemTypes>
    Thank you very much, best regards, Martin
    Edited by: Martin Sommer on Dec 1, 2008 5:51 PM

    found a solution with transaction launcher and custom transaction

  • I want to use both call transaction and session method in the same

    Hi,
              1. I want to use call transaction and session method in a single trans..how to do?
              2. I have 1000 records in it 500 records is updated using call transaction remaining 500 i hve to update with session how to do?
              3. Multiple transaction is possible in call transaction how?

    I suggest you try fulfilling your requirements yourself and come back with specific problems along the way.

Maybe you are looking for

  • Free Goods Problem and User Exit if needed in Sales Order

    Hello All, The problem is related to Free Goods in Sales Order which is given with an example - We have maintained Free Goods ( T Code - VBN1) in inclusive scenario which is as follows - For 210 PAC (Pack) of Material A 18 PAC Free. Where 1 PAC = 20

  • Adobe Cloud app manager failed to download.

    I just subscribed to adobe cloud. I followed the instructions to downlooad the cloud manager; but i got a message stating download failed and retry, which i did to no success. I am on a new imac using mavericks. How do i get back to the download scre

  • Exchang E-mail is very buggy. Any solution?

    I've been running an Iphone4 since it first came out. My company supports Exchange e-mail with Active Sync. About 70% of the times I reply to or create an e-mail I see the message "Sending e-mail" and it basically stalls out after a few minutes and n

  • Aol shutting down in lion

    is anyone having aproblem with aol desktop for mac since installing lion. aol keeps shutting down with an error message, saying a report is being sent to apple. i cannot sign in, as soon as i try to type my password, it just quits. i have reinstalled

  • Problem E6.5 (LabVIEW)

    I've been following Dr. Bishop book through Chapter 6. I have difficulties with problem E6.5 on page 282. Does anyone have got a solution to this problem? Thanks. Attachments: Rolling_Dice.vi ‏45 KB