gpt4 book ai didi

com.arjuna.ats.jta.xa.XidImple.packInto()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 22:25:05 26 4
gpt4 key购买 nike

本文整理了Java中com.arjuna.ats.jta.xa.XidImple.packInto()方法的一些代码示例,展示了XidImple.packInto()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XidImple.packInto()方法的具体详情如下:
包路径:com.arjuna.ats.jta.xa.XidImple
类名称:XidImple
方法名:packInto

XidImple.packInto介绍

暂无

代码示例

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror(xid));
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror());
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: org.jboss.narayana.jta/jta

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror(xid));
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: jbosstm/narayana

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror(xid));
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: jbosstm/narayana

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror(xid));
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public static final void pack(OutputObjectState os, Xid xid)
    throws IOException {
  if (xid instanceof XidImple) {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(jtaLogger.i18NLogger.get_xid_packerror());
  } else {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: jboss.jbossts/jbossjts

/**
 * @message com.arjuna.ats.jta.xid.packerror Could not pack XidImple.
 */
public static final void pack (OutputObjectState os, Xid xid)
    throws IOException
{
  if (xid instanceof XidImple)
  {
    XidImple x = (XidImple) xid;
    os.packBoolean(true);
    if (!x.packInto(os))
      throw new IOException(
          jtaLogger.logMesg.getString("com.arjuna.ats.jta.xid.packerror"));
  }
  else
  {
    os.packBoolean(false);
    ByteArrayOutputStream s = new ByteArrayOutputStream();
    ObjectOutputStream o = new ObjectOutputStream(s);
    o.writeObject(xid);
    o.close();
    os.packBytes(s.toByteArray());
  }
}

代码示例来源:origin: jboss.jbossts/jbossjts

public boolean save_state (OutputObjectState os, int t)
{
  if (_theXid != null)
  {
    try
    {
      os.packBoolean(true);
      
      ((XidImple) _theXid).packInto(os);
    }
    catch (IOException ex)
    {
      return false;
    }
  }
  return super.save_state(os, t);
}

代码示例来源:origin: jboss.jbossts/jbossjts

public boolean save_state (OutputObjectState os, int ot)
{
  try
  {
    if (_theXid != null)
      os.packBoolean(true);
    else
      os.packBoolean(false);
    
    _theXid.packInto(os);
    
    return super.save_state(os, ot);
  }
  catch (IOException e)
  {
    e.printStackTrace();
  }
  return false;
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public boolean save_state (OutputObjectState os, int ot)
{
  try
  {
    if (_theXid != null) {
      os.packBoolean(true);
      _theXid.packInto(os);
    } else {
      os.packBoolean(false);
    }
    
    return super.save_state(os, ot);
  }
  catch (IOException e)
  {
    jtaxLogger.i18NLogger.warn_cant_save_state(os, ot, e);
  }
  return false;
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: org.jboss.narayana.jta/jta

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: jbosstm/narayana

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: jbosstm/narayana

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: jbosstm/narayana

@Test
  public void testPackUnpack () throws Exception
  {
    XidImple xid1 = new XidImple(new Uid());
    OutputObjectState os = new OutputObjectState();
    
    assertTrue(xid1.packInto(os));
    
    InputObjectState is = new InputObjectState(os);
    
    XidImple xid2 = new XidImple();
    
    assertTrue(xid2.unpackFrom(is));
    
    assertTrue(xid1.equals(xid2));
    
    os = new OutputObjectState();
    
    XidImple.pack(os, xid1);
    
    is = new InputObjectState(os);
    
    xid2 = (XidImple) XidImple.unpack(is);
    
    assertTrue(xid1.equals(xid2));
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com