Serialize String containing only whitespace such as a " " character

I'm having dufficulty figuring out how to serialize a String property
[XmlElement("DescriptionDelimiter1")]
public String DescriptionDelimiter1
    get { return _DescriptionDelimiter1; }
    set { _DescriptionDelimiter1 = value; }
Granted, I don't really need the XmlElement tag but just in case I want to change the name of the XML element...
Anyway, what I get in XML is
<ImportProfiles>
  <ImportProfile Name="HPH Import Profile">
    <ConcatenateDescriptions>true</ConcatenateDescriptions>
    <DescriptionDelimiter1 />
    <DescriptionDelimiter2>\r\n</DescriptionDelimiter2>
    <DescriptionDelimiter3>\t</DescriptionDelimiter3>
  <ImportProfile>
</ImportProfiles>
The problem is when serialized, if the value is " " or a single space, the result is <DescriptionDelimiter1 /> which when deserialized sets the string's value to "" with is not the value I need. I've looked into using CData but there doesn't seem to be a simple way to implement it... I expect
<DescriptionDelimiter1> </DescriptionDelimiter1>
or
<DescriptionDelimiter1><[CDATA[ ]]></DescriptionDelimiter1>
Is there some setting I can use when serializing the object to indication the process should not trim away whitespace?
The following is the method used to serialize my object:
public static String Serialize(DataImportBase dib)
    System.Type[] ArrType = new Type[1];
    ArrType[0] = typeof(System.DBNull);
    XmlSerializer xs = new XmlSerializer(typeof(DataImportBase), ArrType);
    System.IO.MemoryStream aMemoryStream = new System.IO.MemoryStream();
    xs.Serialize(aMemoryStream, dib);
    return System.Text.Encoding.UTF8.GetString(aMemoryStream.ToArray());
Thanks for any assistance!!!
Chris

I have looked through the classes for XML serialization but I haven't found anything that seems to allow one to set that attribute xml:space declaratively on members.
One way to change the serialization behaviour would be to write a specialized XmlWriter that takes a list of element names for which it writes out the xml:space attribute. This can be done with a few lines if you use the XmlWrappingWriter from the project http://www.codeplex.com/Wiki/View.aspx?ProjectName=MVPXML. The code for XmlWrappingWriter is also shown in Oleg's blog.
If you use that then you can set up a specialized XmlWriter as follows:
public class XmlSpaceWriter : XmlWrappingWriter
private XmlQualifiedName[] ElementNames;
public XmlSpaceWriter(TextWriter output, XmlQualifiedName[] elementNames)
: base(XmlWriter.Create(output))
ElementNames = elementNames;
public override void WriteStartElement(string prefix, string localName, string ns)
base.WriteStartElement(prefix, localName, ns);
foreach (XmlQualifiedName name in ElementNames)
if (name.Namespace == ns && name.Name == localName && base.XmlSpace != XmlSpace.Preserve)
base.WriteAttributeString("xml", "space", "http://www.w3.org/XML/1998/namespace", "preserve");
break;
and use it like this
Foo foo = new Foo();
foo.Bar = " ";
foo.Example = " ";
XmlSerializer serializer = new XmlSerializer(typeof(Foo));
StringWriter stringWriter = new StringWriter();
XmlSpaceWriter spaceWriter = new XmlSpaceWriter(stringWriter, new XmlQualifiedName[] {new XmlQualifiedName("Bar")});
serializer.Serialize(spaceWriter, foo);
spaceWriter.Close();
string markup = stringWriter.ToString();
The result then looks like this:
<?xml version="1.0" encoding="utf-16"?><Foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Bar xml:space="preserve"> </Bar><Example> </Example></Foo>
The example code above has just one constructor for a TextWriter but the code could obviously easily extended to have further constructors taking e.g. a stream.

Similar Messages

  • How to Identify whether string contains only numbers

    Hi Experts,
    How to identify whether a string contains only numbers...
    Thanks & Regards,
    Neeraj.

    Hi Neeraj,
    ISNUMERIC(String_Field)
    The above function returns '0' for non-numerics and
    '1' for numeric
    Hope this helps.
    Regards,
    Bala

  • Need reg_exp for checking the string contains only alphanumeric or not

    Dear All,
    I need to check the given string in if condtion contains only the alphanumeric or not pls help me..
    like
    if reg_exp then
    end if;
    thanks,
    Oracle

    Hi,
    REGEXP_LIKE ( str
                , '[^[:alnum:]]'
                )returns TRUE if the string str contains any character other than an alphanumeric.
    You can use this wherever conditions are allowed, such as a WHERE clause or a CASE expression. For example:
    SELECT     str
    .     CASE
             WHEN  REGEXP_LIKE ( str
                         , '[^[:alnum:]]'
             THEN  'Contains speace, punctuation or special symbol'
             ELSE  'Okay'
         END               AS is_alnum
    FROM     table_x
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    Edited by: Frank Kulash on Dec 30, 2011 4:37 AM

  • Can the encrypted string contain only alphabets?

    Hi friends,
    I have problem with the encryption. I am using Des .
    I want to get the encrypted string which contains only alphabets ( no digits or no special characters).
    Help appreciated.
    Thanks.

    Within the Java Cryptographic Extension (JCE), encryption works on bytes and generates bytes. You can convert any arbitrary String to bytes using one of the String.getBytes() methods (preferably the one where you define the encoding to use). The way you restrict what the plane text String contains is up to you.
    The JCE produces secure encryption based on well tested algorithms.
    The tone of your question implies that all you want to do is have a simple substitution cipher. The is very VERY VERY insecure and can be broken by a 2 year old. Use the JCE.

  • Code to check whether a given string contains alphanumeric

    Can anyone post the Code to check whether a given string contains only alphanumeric and no special characters

    <Rule name='isAlphaNumericString'>
    <RuleArgument name='testStr'/>
    <block>
    <defvar name='counter'>
    <i>0</i>
    </defvar>
    <defvar name='splitString'>
    <while>
    <lt>
    <ref>counter</ref>
    <length>
    <ref>testStr</ref>
    </length>
    </lt>
    <append name='splitList'>
    <substr>
    <ref>testStr</ref>
    <ref>counter</ref>
    <i>1</i>
    </substr>
    </append>
    <set name='counter'>
    <add>
    <ref>counter</ref>
    <i>1</i>
    </add>
    </set>
    </while>
    <ref>splitList</ref>
    </defvar>
    <containsAll>
    <list>
    <s>A</s>
    <s>B</s>
    <s>C</s>
    <s>D</s>
    <s>E</s>
    <s>F</s>
    <s>G</s>
    <s>H</s>
    <s>I</s>
    <s>J</s>
    <s>K</s>
    <s>L</s>
    <s>M</s>
    <s>N</s>
    <s>O</s>
    <s>P</s>
    <s>Q</s>
    <s>R</s>
    <s>S</s>
    <s>T</s>
    <s>U</s>
    <s>V</s>
    <s>W</s>
    <s>X</s>
    <s>Y</s>
    <s>Z</s>
    <s>a</s>
    <s>b</s>
    <s>c</s>
    <s>d</s>
    <s>e</s>
    <s>f</s>
    <s>g</s>
    <s>h</s>
    <s>i</s>
    <s>j</s>
    <s>k</s>
    <s>l</s>
    <s>m</s>
    <s>n</s>
    <s>o</s>
    <s>p</s>
    <s>q</s>
    <s>r</s>
    <s>s</s>
    <s>t</s>
    <s>u</s>
    <s>v</s>
    <s>w</s>
    <s>x</s>
    <s>y</s>
    <s>z</s>
    <s>0</s>
    <s>1</s>
    <s>2</s>
    <s>3</s>
    <s>4</s>
    <s>5</s>
    <s>6</s>
    <s>7</s>
    <s>8</s>
    <s>9</s>
    </list>
    <ref>splitString</ref>
    </containsAll>
    </block>
    </Rule>
    It Retruns 1 if it contains only alphanumeric otherwise 0

  • A more efficient way to assure that a string value contains only numbers?

    Hi ,
    I'm using Oracle 9.2.0.6.
    I was curious to know if there was any way I could write a more efficient query to determine if a string value contains only numbers.
    Here's my current query. This SQL is from a sub query in a Join clause.
    select distinct cta.CUSTOMER_TRX_ID, to_number(cta.SALES_ORDER) SALES_ORDER
                from ra_customer_trx_lines_all cta
                where length(cta.SALES_ORDER) = 6
                and cta.SALES_ORDER is not null
                and substr(cta.SALES_ORDER,1,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,2,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,3,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,4,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,5,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,6,1) in('1','2','3','4','5','6','7','8','9','0')This is a string where I'm finding A-Z-a-z characters and '/' and '-' characters in all 6 positions, plus there are values that are longer than 6 characters. That's what the length(cta.SALES_ORDER) = 6 is for. Also, of course. some cells are NULL.
    So the question is, is there a more efficient way to screen out only the values in this field that are 6 character numbers or is what I have the best I can do?
    Thanks,

    I appreciate all of your very helpfull workarounds. The cost is a little better in all cases than my original where clause.
    To address the discussion that's popped up about design from this question, I can say a few things that should clear , at least, my situation up.
    First of all this custom quoting , purchase order , and sales order entry system WAS written by a bunch a of 'bad' coders who didn't document their work and then left. We don't even have an ER diagram
    The whole project that I'm only a small part of is literally trying to put Humpty Dumpty together again and then move it from a bad custom solution into Oracle Applications.
    We're rebuilding, documenting, and doing ETL. This is one of your prototypical projects from hell.
    It's a huge database project so we're taking small bites as a time. Hopefully, somewhere right before Armageddon hits, this thing will be complete.
    But until then,..., well,..., you know the drill.
    Thanks Again.

  • Is there anyway of validating a string so that it contains only char's

    is there anyway of validating a string so that it contains only char's,no special char's and no numaric values
    thanx in advance
    sudharshan

    It depends what you consider a long string. Running with various lengths I get the following results (Sun jvm 1.3.1, win NT 4):String length*iterations fixed as: 10000000      
    times totalled over 10 tests
    length  charAt  toCharArray   ratio
    1       8108    23798         293.51%
    2       6234    14000         224.57%
    4       5846    9045          154.72%
    8       5423    7608          140.29%
    16      5250    5719          108.93%
    32      5142    5249          102.08%
    64      5062    5000          98.78%
    128     5094    4875          95.70%
    256     5047    4797          95.05%
    512     5014    4782          95.37%
    1024    4923    4874          99.00%
    2048    5016    4766          95.02%
    4096    5015    4813          95.97%
    8192    5016    4843          96.55%
    16384   5000    4984          99.68%
    32768   5016    5141          102.49%
    65536   5232    5643          107.86%
    131072  5374    6266          116.60%
    262144  5703    12188         213.71%
    524288  5765    12313         213.58%
    1048576 5499    9141          166.23%
    2097152 4907    6906          140.74%
    4194304 4936    6220          126.01%
    8388608 4856    5972          122.98%So there does seem some advantange in using toCharArray for strings around 100 to 10000 characters long, which might imply that the charAt method isn't inlined in Sun's JVM. Most of the web pages recommending toCharArray run their benchmarks somewhere in this region.
    Pete

  • Encode/Decode a String containing Chinese etc. characters to/from unicode

    Hi, I am working to encode a multilingual String (English, chinese, japanese, Latin etc) as unicode. The encoded string is used as follows
    1)decoded by the User Interface for display purpose. The user interface is a web UI and
    2)read by user. So it should be human readable when it contains only English and special characters.
    Thus having a string that contains letters from English, Japanese, CHinese etc, we want the Japanese/Chinese characters to be encoded by the hex values such as &#31169; be encoded as %E7%A7%81.
    However, it is preferable that other special characters like ! ? , space etc not be encoded and left as such.
    The encoding of characters is achievable by using Java.net.URLEncoder but it also replaces all special characters including space character, which becomes a pain for the reader.
    Unfortunately URLEncoder.java does not have any API to configure which characters to encode. Any suggestions how I can proceed, or what encoder i can use?
    Thanks in advance!
    Regards

    I have to say that I disagree that "%E7%A7%81" is "human-readable". On the contrary, I would say that "&#31169;" is human-readable; even though I don't understand it myself, there are a lot of humans who do.
    But let's say that "human-readable" wasn't the right term. Maybe you just wanted a representation of an arbitrary Unicode string in ASCII characters only. In which case I would recommend Base-64 encoding. It does make everything unreadable, though, whereas your requirements appear to be to only make languages other than English be unreadable. So if you don't like that you are going to have to write your own encoder.
    Note also that your original premise:
    Hi, I am working to encode a multilingual String (English, chinese, japanese, Latin etc) as unicode.is misguided, since all data in Java Strings is already Unicode characters.

  • Creating new String using only specific set of chars from another String

    I've performance troubles doing this task:
    I have a very long String A (up to 1 million character length)
    This String contains different characters.
    I need to create a String B containing only specific characthers (with a defined character code)
    An example:
    String A: [80]='P' [65]='A' [71]='G' [69]='E'For example I want to extract only character 65 and 71
    String B: [65]='A' [71]='G'I already did the code to do this, (it's quite simple) but I think I have some very big performance issues, and I suppose I can do this task much more quickly!!
    String out = "";
              for (counter = 0; counter < text.length(); counter++) {
                   char currentchar = text.charAt(counter);
                   int currentvalue = (new Integer(currentchar)).intValue();
                   switch (currentvalue) {
                   case 65:
                        char[] newstring = new char[1];
                        newstring[0] = currentchar;
                        out += new String(newstring);
                        break;
                   case 71: //
                        break;
                   // other cases
                   default:
                        // nothing to do...
              }Can you suggest me something to improve the performances?
    Thank you!

    If you've got a number of characters in your acceptance set I'd use indexOf, and I'd probably use StringCharacterIterator. Mind you, with a million characters I'd probably not load them all at once anyway, but process them as streams.
    StringBuffer out = new StringBuffer(s.length() / 5); // allocate plenty
    StringCharacterIterator it = new StringCharacterIterator(s);
    for(char c = it.first(); c != CharacterIterator.DONE; c = it.next())
      if("AG".indexOf(c) >= 0)
          out.append(c);
    return c.toString();

  • Validation Rule - Should contain only alphabets and can be upto 4 characters long

    Hi, I am using MDS 2012 and want to create a business rule for data validation which says,
    "Should contain only alphabets and can be up to 4 characters long". How can I create such a rule in MDS? Also the Code and Name attributes are 250 characters by default. How to restrict them to 4 characters if business need them to be 4 or
    less character?
    Any help appreciated.
    Thanks, Ashish Singh

    When creating a business rule, under Actions there is "Must be maximum length of" and "must contain patern".
    See:
    http://technet.microsoft.com/en-us/library/ff487015.aspx

  • InfoPath 2013: InfoPath cannot load the view. The view may have been modified to contain unsupported HTML such as frames.

    Hello Folks,
    I'm facing a strange behavior of InfoPath 2013 while using with SharePoint Designer 2013 to customize the forms. Whenever i open any SharePoint form to customize it in InfoPath 2013, it gives me error "InfoPath cannot load the view. The view may have
    been modified to contain unsupported HTML such as frames."
    Just like all other folks, i also assumed that the forms are corrupted and i need to change the extension to *.cab and blah blah blah. But, when i noticed that the error is coming with new list forms, new workflow forms as well then i tried to research on
    the issue. Surprisingly, all forms are opening on my colleague's PC but not from my PC. We're using the same server, same SharePoint Production, same SharePoint Development and similar InfoPath. Infact, our system team has prepared both of us in a similar
    way. The only difference is OS, where he is using Win 8 and mine is Win 7 Pro.
    Therefore, from last 1 week, i've to swap my PC with my colleague if i've to customize or update any form in InfoPath 2013. This is quite bizarre. Can someone let me know what's wrong with this issue?
    Regards,
    Sohaib
    Sohaib Khan

    Hi Sohaib,
    I'd like to double confirm with you that the issue only occurs to your client machine. Please log on to another machine and see if the issue is related to your account.
    If the issue is only related to your machine, I'd recommend you clear InfoPath cache and repair Office program.
    Then go to InfoPath > Options > More Options > General > Internet Options > Add SharePoint sites to your trusted sites and disbale protected mode.
    http://blogs.msdn.com/b/michael_yeager/archive/2008/07/09/infopath-cache.aspx
    http://office.microsoft.com/en-in/infopath-help/repair-office-programs-HA010357402.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Is it possible to search for strings containing spaces and special characters?

    In our RoboHelp project, there are figures with text labels such as Figure 1, Figure 3-2, etc.
    When I search for "Figure 3" I get all pages containing "Figure" and "3", even if I surround it in quotes.  Similarly, searching for "3-2" treats the '-' character as a space and searches for all pages containing '3' or '2'.
    Is there a way to search for strings containing spaces and special characters?

    In that case I think the answer is no if you are using the standard search engine. However I believe that Zoom Search does allow this type of searching. Check out this link for further information.
    http://www.grainge.org/pages/authoring/zoomsearch/zoomsearch.htm
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • [svn:fx-trunk] 13501: Bug: BLZ447 - AMF3 Deserialization: Wrongly counted reference ID of duplicated String when in the same message there are Strings with only wildcards

    Revision: 13501
    Revision: 13501
    Author:   [email protected]
    Date:     2010-01-14 06:01:23 -0800 (Thu, 14 Jan 2010)
    Log Message:
    Bug: BLZ447 - AMF3 Deserialization: Wrongly counted reference ID of duplicated String when in the same message there are Strings with only wildcards
    QA: Yes - please keep an eye on AMFX (HTTPChannel) tests.
    Doc: No
    Checkintests: Pass - except the usual 4-5 tests that time out on my machine.
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • Why jvm maintains string pool only for string objects why not for other objects?

    why jvm maintains string pool only for string objects why not for other objects? why there is no pool for other objects? what is the specialty of string?

    rp0428 wrote:
    You might be aware of the fact that String is an immutable object, which means string object once created cannot be manipulated or modified. If we are going for such operation then we will be creating a new string out of that operation.
    It's a JVM design-time decision or rather better memory management. In programming it's quite a common case that we will define string with same values multiple times and having a pool to hold these data will be much efficient. Multiple references from program point/ refer to same object/ value.
    Please refer these links
    What is Java String Pool? | JournalDev
    Why String is Immutable in Java ? | Javalobby
    Sorry but you are spreading FALSE information. Also, that first article is WRONG - just as OP was wrong.
    This is NO SUCH THING as a 'string pool' in Java. There is a CONSTANT pool and that pool can include STRING CONSTANTS.
    It has NOTHING to do with immutability - it has to do with CONSTANTS.
    Just because a string is immutable does NOT mean it is a CONSTANT. And just because two strings have the exact same sequence of characters does NOT mean they use values from the constant pool.
    On the other hand class String offers the .intern() method to ensure that there is only one instance of class String for a certain sequence of characters, and the JVM calls it implicitly for literal strings and compile time string concatination results.
    Chapter 3. Lexical Structure
    In that sense the OPs question is valid, although the OP uses wrong wording.
    And the question is: what makes class Strings special so that it offers interning while other basic types don't.
    I don't know the answer.
    But in my opinion this is because of the hybrid nature of strings.
    In Java we have primitive types (int, float, double...) and Object types (Integer, Float, Double).
    The primitive types are consessons to C developers. Without primitive types you could not write simple equiations or comparisons (a = 2+3; if (a==5) ...). [autoboxing has not been there from the beginning...]
    The String class is different, almost something of both. You create String literals as you do with primitives (String a = "aString") and you can concatinate strings with the '+' operator. Nevertheless each string is an object.
    It should be common knowledge that strings should not be compared with '==' but because of the interning functionality this works surprisingly often.
    Since strings are so easy to create and each string is an object the lack ot the interning functionality would cause heavy memory consumption. Just look at your code how often you use the same string literal within your program.
    The memory problem is less important for other object types. Either because you create less equal objects of them or the benefit of pointing to the same object is less (eg. because the memory foot print of the individual objects is almost the same as the memory footpint of the references to it needed anyway).
    These are my personal thoughts.
    Hope this helps.
    bye
    TPD

  • InfoPath cannot load the view. The view may have been modifed to contain unsupported HTML such as frames.

    Hi,
    I'm running InfoPath 2013 Designer and I'm experiencing a very annoying bug. Whenever I try to open a Infopath file I get the error, "InfoPath cannot load the view. The view may have been modifed to contain unsupported HTML such as frames."
    Sometimes it opens without a problem but most the time I get this error message. The strange thing is that I can create a new form without any frames, save it and then when I go to open it have the same problem. I've tried reinstalling InfoPath but it didn't
    help.
    Please help!!!
    Thanks in Advance,
    Mark Elliott
    Windows 7 Home Premium 64 bit; Internet Explorer 11; Office 2013 Pro

    Has anybody figured this out? I have the same problem.  InfoPath 2013 will not open any files from one computer which all work from another computer with the same version of InfoPath so this basically rules out file corruption. (The files are in
    a network share).  Both computer have InfoPath 2013. If I reboot the computer in question it will sometimes work then goes back to the error. 
    The only difference between this computer an all the others is that this one has a bunch of Office 2010 updates since it has SharePoint 2010 designer installed, (not office).  I did try to uninstall the updates but the problem has not been resolved. 
    This is the second time this happens.  Last time I had to completely remove Office 2013 & SharePoint designer then used the Windows rollback feature and finally reinstall office 2013.  Everything worked great until I installed SharePoint 2010
    designer then after a few updates the problem resurfaced.
    This is really annoying, I cant believe its not happening to more people.
    Ben
    ** Update **
    The problem went away although I am not 100% sure why. I decided to provide additional information in case someone has the same issue.  I deleted the Digital Certificate that I had previously requested from our domain server. Now suddenly everything
    is working. Like I said before, I'm not sure if this was the cause/fix but if you are having the same problem perhaps you can try the same thing and provide some feedback to possibly help others.
    I would like to thanks anyone who spent time on this.
    **Update**
    The problem came back. At this point I suspect either an update or something with Visual Studios 2012. My forms are heavy on custom code so I must be doing something wrong. I doubt it was an update since it would be happening to more people
     Again, I am able to open the same file from another computer with the only difference being that the other PC does not have Visual Studio 2012

Maybe you are looking for

  • Zen touch problem

    Hello everyone. I have a 20gig zen touch which was working fine . I have the latest drivers / firmware installed . But when i connect it to the computer windows says found new hardware creative zen , then opens the install new hardware part , even al

  • Custom Field added by AET isn't editable

    Hi all, I added a custom field in service request by AET. the problem is that it is not editable. Can anyone help me? thanks in advantage. Enzo

  • HT4366 We do not have a port to the TV. Is there a way to pug it into the cable box? The cable box has a Hdmi port

    We just purchased the Apple TV 2 and our TV doesn't have Hdmi port, but out cable box does. Can we hook it up to the cable box? Is so, how we keep trying and nothing is happening 

  • Performance Monitoring in CRM

    Hi All, I need your help to know how to tune performance in CRM 7.0. I need to tune the performance of Web UI client & get the response time of transactions executed in CRM UI, Please give your suggestions, Thanks & Regards, Sandipan

  • Flow of sessiob bean and entity bean

    Hi All, Can any one help me how is the flow of session and entity beans i.e What method is called first and what method is called next. There are so many methods like create(),ejbcreate(), ejbActivate(),ejbPassivate(),ejbDelete() etc. What is the flo