- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.arjuna.ats.jta.xa.XidImple.packInto()
方法的一些代码示例,展示了XidImple.packInto()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XidImple.packInto()
方法的具体详情如下:
包路径:com.arjuna.ats.jta.xa.XidImple
类名称: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));
}
}
我正在编写一个程序,需要将大量小数据 block 发送到服务器(主要是整数或字符串),所以我正在使用结构库。现在我正在使用 struct.pack,但我想知道是否应该使用 struct.pack_in
本文整理了Java中com.arjuna.ats.jta.xa.XidImple.packInto()方法的一些代码示例,展示了XidImple.packInto()的具体用法。这些代码示例主要来源于
我是一名优秀的程序员,十分优秀!