diff --git a/pom.xml b/pom.xml index 26ec00c490..a933d988f8 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,7 @@ https://github.com/jbosstm/quickstart + tooling/browser jca-and-tomcat jca-and-hibernate jta-and-hibernate diff --git a/tooling/browser/pom.xml b/tooling/browser/pom.xml new file mode 100644 index 0000000000..32d29649f8 --- /dev/null +++ b/tooling/browser/pom.xml @@ -0,0 +1,64 @@ + + + org.jboss.narayana.quickstart.tooling + 5.0.3.Final-SNAPSHOT + + + Examples showing how to use Narayana tooling + + 4.0.0 + tooling + jar + Narayana Tooling + + + UTF-8 + 0.9.3 + 5.0.3.Final-SNAPSHOT + 3.1.3.GA + 1.1.0.Final + 1.0.0.Final + 7.1.0.Final + 4.11 + 1.2.1 + + + + org.jboss.narayana.jta + narayana-jta + ${version.org.jboss.narayana} + + + org.jboss.logmanager + jboss-logmanager + + + + + + + org.jboss.logging + jboss-logging + 3.1.0.GA + + + + org.jboss.spec.javax.transaction + jboss-transaction-api_1.2_spec + ${version.org.jboss.spec.javax.transaction} + + + + org.jboss + jboss-transaction-spi + ${version.org.jboss.jboss-transaction-spi} + + + org.jboss.logging + jboss-logging-spi + + + + + + diff --git a/tooling/browser/readme.txt b/tooling/browser/readme.txt new file mode 100644 index 0000000000..52f7be9ae0 --- /dev/null +++ b/tooling/browser/readme.txt @@ -0,0 +1,47 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2014, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +OVERVIEW +-------- + +Interactive browser for examining transaction log MBeans + +USAGE +----- +mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.BrowserCommand -Dexec.args="path to tx-object-store" + +EXPECTED OUTPUT +--------------- +help - show command options and syntax +quit - exit the browser +store_dir - get/set the location of the object store +probe - refresh the view of the object store +exception_trace - true | false - show full exception traces +types - list record types +select - - start browsing a particular transaction type +ls - [type] - list transactions of type type. Use the select command to set the default type +> + +WHAT JUST HAPPENED? +------------------- +The quickstart shows how to browse transaction record MBeans. Starting the example presents a list of +possible commands and instructions on how to proceed. Type help and press return for help on all commands. diff --git a/tooling/browser/src/main/java/org/jboss/narayana/jta/quickstarts/BrowserCommand.java b/tooling/browser/src/main/java/org/jboss/narayana/jta/quickstarts/BrowserCommand.java new file mode 100644 index 0000000000..f2adc914de --- /dev/null +++ b/tooling/browser/src/main/java/org/jboss/narayana/jta/quickstarts/BrowserCommand.java @@ -0,0 +1,305 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat, Inc. and/or its affiliates, + * and individual contributors as indicated by the @author tags. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2014, + * @author JBoss, by Red Hat. + */ +package org.jboss.narayana.jta.quickstarts; + +import java.io.IOException; +import java.io.PrintStream; +import java.util.*; + +import com.arjuna.ats.arjuna.common.CoreEnvironmentBean; +import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean; +import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; +import com.arjuna.ats.arjuna.objectstore.StoreManager; +import com.arjuna.ats.arjuna.recovery.RecoveryManager; +import com.arjuna.ats.arjuna.state.InputObjectState; +import com.arjuna.ats.arjuna.tools.osb.mbean.*; +import com.arjuna.ats.arjuna.tools.osb.util.JMXServer; +import com.arjuna.common.internal.util.propertyservice.BeanPopulator; + +import javax.management.*; + +public abstract class BrowserCommand { + private static String currentStoreDir;// = "/home/mmusgrov/tmp/tx-object-store"; + private static ObjStoreBrowser osb; + private static String currentType = ""; + private static List recordTypes = new ArrayList (); + + private enum CommandName { + HELP("show command options and syntax"), + SELECT(" - start browsing a particular transaction type"), + STORE_DIR("get/set the location of the object store"), + START(null), + TYPES("list record types"), + PROBE("refresh the view of the object store"), + LS("[type] - list transactions of type type. Use the select command to set the default type"), + QUIT("exit the browser"), + EXCEPTION_TRACE("true | false - show full exception traces"); + + String cmdHelp; + + CommandName(String cmdHelp) { + this.cmdHelp = cmdHelp; + } + } + + static BrowserCommand getCommand(CommandName name) { + return getCommand(name.name()); + } + + static BrowserCommand getCommand(String name) { + name = name.toUpperCase(); + + for (BrowserCommand command : commands) { + if (command.name.name().startsWith(name)) + return command; + } + + return getCommand(CommandName.HELP); + } + + public static void main(String[] args) throws Exception { + BrowserCommand.getCommand(CommandName.START).execute(new PrintStream(System.out, true), Arrays.asList(args)); + } + + + CommandName name; + boolean verbose; + + private BrowserCommand(CommandName name) { + this.name = name; + } + + abstract void execute(PrintStream printStream, List args) throws Exception; + protected void help(PrintStream printStream) { + if (name.cmdHelp != null) + printStream.printf("%s - %s%n", name.name().toLowerCase(), name.cmdHelp); + } + + protected boolean cancel() {return true;} + + private static void setupStore(String storeDir) throws Exception { + BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class).setRecoveryModuleClassNames(Arrays.asList( + "com.arjuna.ats.internal.jta.recovery.arjunacore.CommitMarkableResourceRecordRecoveryModule", + "com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule", + "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule" + )); + BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).setObjectStoreDir(storeDir); + BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore").setObjectStoreDir(storeDir); + BeanPopulator.getDefaultInstance(CoreEnvironmentBean.class).setNodeIdentifier("no-recovery"); + + osb = new ObjStoreBrowser(storeDir); + osb.start(); // only required if we want to use JMX + } + + private static BrowserCommand[] commands = { + + new BrowserCommand(CommandName.HELP) { + @Override + void execute(PrintStream printStream, List args) { + for (BrowserCommand command : commands) + command.help(printStream); + } + }, + + new BrowserCommand(CommandName.START) { + boolean finished; + + @Override + void execute(PrintStream printStream, List args) throws Exception { + if (args.size() == 0) + currentStoreDir = BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).getObjectStoreDir(); + else + currentStoreDir = args.get(0); + + setupStore(currentStoreDir); + + RecoveryManager.manager(RecoveryManager.INDIRECT_MANAGEMENT).suspend(true); + Scanner scanner = new Scanner(System.in); + + while (!finished) + processCommand(printStream, scanner); + + RecoveryManager.manager().terminate(); + StoreManager.shutdown(); + } + + protected boolean cancel() { + finished = true; + return true; + } + + private void processCommand(PrintStream printStream, Scanner scanner) { + printStream.printf("%s> ", currentType); + + List args = new ArrayList (Arrays.asList(scanner.nextLine().split("\\s+"))); + BrowserCommand command = args.size() == 0 ? getCommand(CommandName.HELP) : getCommand(args.remove(0)); + + try { + command.execute(printStream, args); + } catch (Exception e) { + printStream.printf("%s%n", e.getMessage()); + + if (verbose) + e.printStackTrace(printStream); + } + } + }, + + new BrowserCommand(CommandName.QUIT) { + + @Override + void execute(PrintStream printStream, List args) throws Exception { + getCommand(CommandName.START).cancel(); + } + }, + + new BrowserCommand(CommandName.STORE_DIR) { + + @Override + void execute(PrintStream printStream, List args) throws Exception { + if (args.size() == 0) + printStream.print(currentStoreDir); + + setupStore(args.get(0)); + } + }, + + new BrowserCommand(CommandName.PROBE) { + + @Override + void execute(PrintStream printStream, List args) { + osb.probe(); + } + }, + + new BrowserCommand(CommandName.EXCEPTION_TRACE) { + + @Override + void execute(PrintStream printStream, List args) throws Exception { + BrowserCommand startCmd = getCommand(CommandName.START); + + if (args.size() == 1) + startCmd.verbose = Boolean.parseBoolean(args.get(0)); + + printStream.printf("exceptionTrace is %b", startCmd.verbose); + } + }, + + new BrowserCommand(CommandName.TYPES) { + @Override + void execute(PrintStream printStream, List args) throws Exception { + recordTypes.clear(); + + InputObjectState types = new InputObjectState(); + + if (StoreManager.getRecoveryStore().allTypes(types)) { + String typeName; + + do { + try { + typeName = types.unpackString(); + recordTypes.add(typeName); + printStream.printf("%s%n", typeName); + } catch (IOException e1) { + typeName = ""; + } + } while (typeName.length() != 0); + } + } + }, + + new BrowserCommand(CommandName.SELECT) { + + @Override + void execute(PrintStream printStream, List args) throws Exception { + if (args.size() < 1) + currentType = ""; + else if (!recordTypes.contains(args.get(0))) + printStream.printf("%s is not a valid transaction type%n", args.get(0)); + else + currentType = args.get(0); + } + }, + + new BrowserCommand(CommandName.LS) { + @Override + void execute(PrintStream printStream, List args) throws Exception { + if (args.size() > 0) + getCommand(CommandName.SELECT).execute(printStream, args); + + if (currentType.length() == 0) { + printStream.printf("No type selected. Choose one of:%n"); + getCommand(CommandName.TYPES).execute(printStream, null); + help(printStream); + } else { + //List uids = osb.probe(currentType); + listMBeans(printStream, currentType); + } + } + + void listMBeans(PrintStream printStream, String itype) throws MalformedObjectNameException, ReflectionException, InstanceNotFoundException, IntrospectionException { + MBeanServer mbs = JMXServer.getAgent().getServer(); + String osMBeanName = "jboss.jta:type=ObjectStore,itype=" + itype; + //Set allTransactions = mbs.queryMBeans(new ObjectName("jboss.jta:type=ObjectStore,*"), null); + Set transactions = mbs.queryMBeans(new ObjectName(osMBeanName + ",*"), null); + + printStream.printf("Transactions of type %s%n", osMBeanName); + for (ObjectInstance oi : transactions) { + String transactionId = oi.getObjectName().getCanonicalName(); + + if (!transactionId.contains("puid") && transactionId.contains("itype")) { + printStream.printf("Transaction: %s%n", oi.getObjectName()); + String participantQuery = transactionId + ",puid=*"; + Set participants = mbs.queryMBeans(new ObjectName(participantQuery), null); + + printAtrributes(printStream, "\t", mbs, oi); + + printStream.printf("\tParticipants:%n"); + for (ObjectInstance poi : participants) { + printStream.printf("\t\tParticipant: %s%n", poi); + printAtrributes(printStream, "\t\t\t", mbs, poi); + } + } + } + } + + void printAtrributes(PrintStream printStream, String printPrefix, MBeanServer mbs, ObjectInstance oi) + throws IntrospectionException, InstanceNotFoundException, ReflectionException { + MBeanInfo info = mbs.getMBeanInfo( oi.getObjectName() ); + MBeanAttributeInfo[] attributeArray = info.getAttributes(); + int i = 0; + String[] attributeNames = new String[attributeArray.length]; + + for (MBeanAttributeInfo ai : attributeArray) + attributeNames[i++] = ai.getName(); + + AttributeList attributes = mbs.getAttributes(oi.getObjectName(), attributeNames); + + for (javax.management.Attribute attribute : attributes.asList()) { + Object value = attribute.getValue(); + String v = value == null ? "null" : value.toString(); + + printStream.printf("%s%s=%s%n", printPrefix, attribute.getName(), v); + } + } + }, + }; +} diff --git a/tooling/hayk/pom.xml b/tooling/hayk/pom.xml new file mode 100644 index 0000000000..d2c4f036fc --- /dev/null +++ b/tooling/hayk/pom.xml @@ -0,0 +1,80 @@ + + + org.jboss.narayana.quickstart.tooling + 5.0.4.Final-SNAPSHOT + + Examples showing how to use Narayana tooling + 4.0.0 + browser + jar + Narayana Tooling + + + UTF-8 + 0.9.3 + ${project.version} + 3.1.3.GA + 1.1.0.Final + 1.0.0.Final + 7.1.0.Final + 4.11 + 1.2.1 + + + + + org.jboss.narayana.jts + narayana-jts-jacorb + + ${version.org.jboss.narayana} + + + org.jboss.logmanager + jboss-logmanager + + + + + + org.jacorb + jacorb + 2.3.1.jbossorg-1 + + + + org.slf4j + slf4j-jdk14 + 1.5.6 + + + + + + org.jboss.logging + jboss-logging + 3.1.0.GA + + + + org.jboss.spec.javax.transaction + jboss-transaction-api_1.2_spec + ${version.org.jboss.spec.javax.transaction} + + + + org.jboss + jboss-transaction-spi + ${version.org.jboss.jboss-transaction-spi} + + + org.jboss.logging + jboss-logging-spi + + + + + + diff --git a/tooling/hayk/readme.txt b/tooling/hayk/readme.txt new file mode 100644 index 0000000000..d460d95eef --- /dev/null +++ b/tooling/hayk/readme.txt @@ -0,0 +1,41 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2014, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +OVERVIEW +-------- + +Inspect JTS transactions. The interface requested by the QA team is: + +src/main/java/org/jboss/narayana/jta/quickstarts/HayksJTSHelper.java + +Let me know what else would be useful to add. + +USAGE +----- +mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.JTSRecordHelper + +EXPECTED OUTPUT +--------------- + + +WHAT JUST HAPPENED? +------------------- diff --git a/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/ArjunaTransactionWrapper.java b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/ArjunaTransactionWrapper.java new file mode 100644 index 0000000000..fa56920478 --- /dev/null +++ b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/ArjunaTransactionWrapper.java @@ -0,0 +1,41 @@ +package org.jboss.narayana.jta.quickstarts; + +import com.arjuna.ats.arjuna.common.Uid; +import com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple; + +import java.util.ArrayList; +import java.util.Collection; + +public class ArjunaTransactionWrapper extends ArjunaTransactionImple { + String type; + byte[] gtid; + + private Collection participants = new ArrayList(); + + public ArjunaTransactionWrapper (String type, Uid uid) { + super(uid); + + this.type = type; + } + + public String getType() { + return type; + } + + public byte[] getGtid() { + return gtid; + } + + public Uid getUid() { + return get_uid(); + } + + public void add(JTSXAResourceRecordWrapper xar) { + participants.add(xar); + gtid = xar.getGlobalTransactionId(); + } + + public Collection getParticipants() { + return participants; + } +} diff --git a/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/HayksJTSHelper.java b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/HayksJTSHelper.java new file mode 100644 index 0000000000..a1de131740 --- /dev/null +++ b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/HayksJTSHelper.java @@ -0,0 +1,60 @@ +package org.jboss.narayana.jta.quickstarts; + +import com.arjuna.ats.arjuna.common.Uid; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +public interface HayksJTSHelper { + + /** + * 1. Read the xids of pending transactions. To check the count of pending transactions. + * + * Obtain a map of transaction Uid to the wrapper that encapsulates it. + * + * If a transaction has participants then the global transaction id is available by calling + * the method {@link ArjunaTransactionWrapper#getGtid()} + * + * Use {@link ArjunaTransactionWrapper#getUid()} to get the unique Uid for the transaction + * + * To get the {@link com.arjuna.ats.arjuna.coordinator.AbstractRecord#type()} of the + * txn use {@link ArjunaTransactionWrapper#getType()} on the returned values + * + * @return txns a map pending JTS transactions in the current store + */ + Map getPendingJTSTxns(); + + /** + * 2. Read participant ids of a pending transaction. To check the count of participants. + * Find JTS transaction participants + * + * @param txn a JTS transaction as returned by {@link HayksJTSHelper#getPendingJTSTxns()} + * @return the xids of participants in txn that may be pending + */ + Collection getParticipants(ArjunaTransactionWrapper txn); + + /** + * 3. Read participant resources. To check participant status. + * + * Use {@link org.jboss.narayana.jta.quickstarts.JTSXAResourceRecordWrapper#getHeuristicValue()} + * to get the heuristic status of the participant. The meaning of the integer value is defined by constants + * in {@link com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome} + * + * @return a collection of xid wrappers for receiving all pending JTS transaction XA participants + */ + Collection getPendingXids(); + + /** + * @return the record types in the current object store + * @throws Exception + */ + Set getTypes() throws Exception; + + /** + * Convert bytes represent a component of an Xid into a human readable string + * @param bytes + * @return + */ + StringBuilder convertXidBytes(byte[] bytes); +} \ No newline at end of file diff --git a/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSRecordHelper.java b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSRecordHelper.java new file mode 100644 index 0000000000..d320dcff22 --- /dev/null +++ b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSRecordHelper.java @@ -0,0 +1,213 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat, Inc. and/or its affiliates, + * and individual contributors as indicated by the @author tags. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2014, + * @author JBoss, by Red Hat. + */ +package org.jboss.narayana.jta.quickstarts; + +import java.io.File; +import java.io.IOException; +import java.util.*; + +import com.arjuna.ats.arjuna.common.*; +import com.arjuna.ats.arjuna.exceptions.ObjectStoreException; +import com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator; +import com.arjuna.ats.arjuna.recovery.RecoveryManager; +import com.arjuna.ats.internal.arjuna.objectstore.hornetq.HornetqJournalEnvironmentBean; +import com.arjuna.ats.internal.jts.ORBManager; +import com.arjuna.ats.jta.xa.XidImple; +import com.arjuna.ats.jts.common.jtsPropertyManager; +import com.arjuna.common.internal.util.propertyservice.BeanPopulator; +import com.arjuna.ats.arjuna.objectstore.StoreManager; +import com.arjuna.ats.arjuna.state.InputObjectState; +import com.arjuna.orbportability.OA; +import com.arjuna.orbportability.ORB; +import org.omg.CORBA.ORBPackage.InvalidName; + +public class JTSRecordHelper implements HayksJTSHelper { + private static final String JTS_PARTICIPANT_REC_TYPE = "CosTransactions/XAResourceRecord"; + + private static final String[] JTS_TYPES = new String[] { + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/AssumedCompleteHeuristicTransaction", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/AssumedCompleteTransaction", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/AssumedCompleteHeuristicServerTransaction", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/AssumedCompleteServerTransaction", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/ServerTransaction", + "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/ServerTransaction/JCA" + }; + + private Map txns = new HashMap(); + private Collection xarUids = new ArrayList(); + + private static Set recordTypes = new HashSet (); + private ORB orb; + private OA oa; + + public static void main(String[] args) throws Exception { + //String storeDir = "/home/mmusgrov/source/forks/narayana/master/ArjunaJTS/jtax/target/test-classes/ObjectStore"; + //String storeDir = "/home/mmusgrov/source/forks/narayana/master/eap-tests-transactions/integration/jbossts/target/jbossas-jbossts/standalone/data/tx-object-store"; + //String storeDir = "/home/mmusgrov/source/forks/wildfly/wildfly/build/target/wildfly-9.0.0.Alpha2-SNAPSHOT-node2/standalone/data/tx-object-store"; + String storeDir = "/home/mmusgrov/Downloads/tx-object-store"; // the one gytis gave me + + JTSRecordHelper h = new JTSRecordHelper(storeDir); + + for (Map.Entry e :h.txns.entrySet()) { + Collection participants = e.getValue().getParticipants(); + + System.out.printf("\tParticipants of %s%n", h.convertXidBytes(e.getValue().getGtid()).toString()); + + for (JTSXAResourceRecordWrapper w : participants) + System.out.printf("\t\tgtid=%s bqual=%s heuristic=%d%n", + h.convertXidBytes(w.getGlobalTransactionId()), h.convertXidBytes(w.getBranchQualifier()), + w.getHeuristicValue()); + } + } + + public JTSRecordHelper(String osDir) throws Exception { + setupStore(osDir, false); + initOrb(); + + refresh(); + + shutdown(); + } + + public void shutdown() { + RecoveryManager.manager().terminate(true); + StoreManager.shutdown(); + oa.destroy(); + orb.destroy(); + } + + public void refresh() throws ObjectStoreException, IOException { + Collection uids = getUids(JTS_PARTICIPANT_REC_TYPE); + + for (String type : JTS_TYPES) + for (Uid uid : getUids(type)) + txns.put(uid, new ArjunaTransactionWrapper(type, uid)); + + for (Uid xarUid : uids) { + JTSXAResourceRecordWrapper wrapper = new JTSXAResourceRecordWrapper(xarUid); + XidImple xid = (XidImple) wrapper.getXid(); + Uid txOfXar = new Uid(xid.getGlobalTransactionId()); + ArjunaTransactionWrapper txn = txns.get(txOfXar); + + xarUids.add(wrapper); + + if (txn != null) + txn.add(wrapper); + } + } + + public Collection getParticipants(ArjunaTransactionWrapper txn) { + return txn.getParticipants(); + } + + public Map getPendingJTSTxns() { + return txns; + } + + public Collection getPendingXids() { + return xarUids; + } + + public Set getTypes() throws Exception { + recordTypes.clear(); + + // if there is access to the physical store then use the direct store API: + InputObjectState types = new InputObjectState(); + + if (StoreManager.getRecoveryStore().allTypes(types)) { + String typeName; + + do { + try { + typeName = types.unpackString(); + recordTypes.add(typeName); + } catch (IOException e1) { + typeName = ""; + } + } while (typeName.length() != 0); + } + + return recordTypes; + } + + private void setupStore(String storeDir, boolean hqstore) throws Exception { + + if (hqstore) { + final String storeClassName = com.arjuna.ats.internal.arjuna.objectstore.hornetq.HornetqObjectStoreAdaptor.class.getName(); + File hornetqStoreDir = new File(storeDir); + + BeanPopulator.getDefaultInstance(HornetqJournalEnvironmentBean.class).setStoreDir(hornetqStoreDir.getCanonicalPath()); + + BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).setObjectStoreType(storeClassName); + BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).setObjectStoreDir(storeDir); + + BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore").setObjectStoreType(storeClassName); + BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore").setObjectStoreDir(storeDir); + + } else { + BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).setObjectStoreDir(storeDir); + BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore").setObjectStoreDir(storeDir); + BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, null).setObjectStoreDir(storeDir); + } + } + + private void initOrb() throws InvalidName { + final Properties initORBProperties = new Properties(); + initORBProperties.setProperty("com.sun.CORBA.POA.ORBServerId", "1"); + initORBProperties.setProperty("com.sun.CORBA.POA.ORBPersistentServerPort", "" + + jtsPropertyManager.getJTSEnvironmentBean().getRecoveryManagerPort()); + + orb = ORB.getInstance("test"); + oa = OA.getRootOA(orb); + + orb.initORB(new String[] {}, initORBProperties); + oa.initOA(); + + ORBManager.setORB(orb); + ORBManager.setPOA(oa); + } + + private Collection getUids(String type) { + Collection uids = new ArrayList(); + ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type); + + while (true) { + Uid u = iter.iterate(); + + if (u == null || Uid.nullUid().equals(u)) + break; + + uids.add(u); + } + + return uids; + } + + public StringBuilder convertXidBytes(byte[] bytes) { + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < bytes.length; i++) + sb.append(bytes[i]); + + return sb; + } +} diff --git a/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSXAResourceRecordWrapper.java b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSXAResourceRecordWrapper.java new file mode 100644 index 0000000000..f4b65c9b78 --- /dev/null +++ b/tooling/hayk/src/main/java/org/jboss/narayana/jta/quickstarts/JTSXAResourceRecordWrapper.java @@ -0,0 +1,60 @@ +package org.jboss.narayana.jta.quickstarts; + + +import com.arjuna.ats.arjuna.common.Uid; +import com.arjuna.ats.arjuna.state.InputObjectState; +import com.arjuna.ats.internal.jta.recovery.jts.XARecoveryResourceImple; +import com.arjuna.ats.jta.xa.XATxConverter; +import com.arjuna.ats.jta.xa.XidImple; + +import java.io.IOException; + +/** + * Extension of an XAResource record for exposing the underlying XAResource which is protected + */ +public class JTSXAResourceRecordWrapper extends XARecoveryResourceImple { //com.arjuna.ats.internal.jta.resources.jts.orbspecific.XAResourceRecord { + int heuristic; + boolean committed; + XidImple xidImple; + + public JTSXAResourceRecordWrapper(Uid uid) { + super(uid); // calls loadState which in turn calls restoreState + } + + public boolean restoreState(InputObjectState os) { + InputObjectState copy = new InputObjectState(os); + try { + heuristic = copy.unpackInt(); + committed = copy.unpackBoolean(); + xidImple = new XidImple(XidImple.unpack(copy)); + + return super.restoreState(os); + } catch (IOException e) { + return false; + } + } + + public byte[] getGlobalTransactionId() { + return xidImple.getGlobalTransactionId(); + } + + + public byte[] getBranchQualifier() { + return xidImple.getBranchQualifier(); + } + + public int getFormatId() { + return xidImple.getFormatId(); + } + + public String getNodeName() { + return XATxConverter.getNodeName(xidImple.getXID()); + } + + public int getHeuristicValue() { + return heuristic; + } + + public boolean isCommitted() { return committed; } +} + diff --git a/tooling/hayk/src/main/resources/jacorb.properties b/tooling/hayk/src/main/resources/jacorb.properties new file mode 100644 index 0000000000..0af76ea318 --- /dev/null +++ b/tooling/hayk/src/main/resources/jacorb.properties @@ -0,0 +1,741 @@ +## +## JacORB configuration options +## + +######################################## +# # +# Initial references configuration # +# # +######################################## + +# +# URLs where IORs are stored (used in orb.resolve_initial_service()) +# DO EDIT these! (Only those that you are planning to use, +# of course ;-). +# +# The ORBInitRef references are created on ORB startup time. In the +# cases of the services themselves, this may lead to exceptions being +# displayed (because the services aren't up yet). These exceptions +# are handled properly and cause no harm! + +#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root +#ORBInitRef.NameService=file:/c:/NS_Ref +ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref +#ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef + + +######################################## +# # +# Export of corbaloc IORs # +# # +######################################## + +# allow for more readable corbaloc URLs by mapping the +# actual object key to an arbitrary string. The mapping +# below would permit clients of a name service to +# access it using corbaloc::ipaddress:portnum/NameService +# Note: it is NOT necessary to define this property for +# the name service here because this is done already in the +# code of the ns implementation. +# This mapping can be altered programatically by the proprietary +# function ORB::addObjectKey(NameService, file:/home/rnc/NameSingleton.ior) +# +# The property also accepts the following mappings: +# IOR, resource, jndi, URL (e.g. file, http) +# examples: +# jacorb.orb.objectKeyMap.NameService=StandardNS/NameServer-POA/_root +# jacorb.orb.objectKeyMap.NameService=file:/home/rnc/NameSingleton.ior + +################################## +# # +# ORB version number output # +# # +################################## + +# if on, the ORB's version number and a copyright statement is printed +# any time the ORB is initialized +jacorb.orb.print_version=on + +################################## +# # +# Default Logging configuration # +# # +################################## + +# Name of the factory class that plugs in a given log kit +# The default value is JacORB's own factory for the Apache +# LogKit. Only edit (or uncomment) if you want a different +# log kit. +#jacorb.log.loggerFactory=org.jacorb.util.LogKitLoggerFactory + +# log levels: +# +# 0 = fatal errors only = "almost off" (FATAL ERRORS) +# 1 = non-fatal errors and exceptions (ERROR) +# 2 = important messages (WARN) +# 3 = informational messages and exceptions (INFO) +# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) +# NOTE: the name of this property has changed from jacorb.verbosity!! +jacorb.log.default.verbosity=2 + +# where does output go? Terminal is default +#jacorb.logfile=LOGFILEPATH + +# If logging to file whether to append to existing file or overwrite +jacorb.logfile.append=off + +# If jacorb.logfile.append is on, set rolling log size in kilobytes. +# A value of 0 implies no rolling log +jacorb.logfile.maxLogSize=0 + +# hexdump outgoing messages +jacorb.debug.dump_outgoing_messages=off + +# hexdump incoming messages +jacorb.debug.dump_incoming_messages=off + +jacorb.util.tpool.log.verbosity=0 + +################################################## +# # +# WARNING: The following properties should # +# only be edited by the expert user. They # +# can be left untouched in most cases! # +# # +################################################## + + + +################################ +# # +# Basic ORB Configuration # +# # +################################ + +# the GIOP minor version number to use for newly created IORs +jacorb.giop_minor_version=2 + +# number of retries if connection cannot directly be established +jacorb.retries=5 + +# how many msecs. do we wait between retries +jacorb.retry_interval=500 + +# log2 of maximum buffer size managed by the internal +# buffer manager. +# +# This is NOT the maximum buffer size that +# can be used, but just the largest size of buffers that +# will be kept and managed. This value will be added to +# an internal constant of 5, so the real value in bytes +# is 2**(5+maxManagedBufSize-1). You only need to increase this +# value if you are dealing with LOTS of LARGE data structures. +# You may decrease it to make the buffer manager release large +# buffers immediately rather than keeping them for later +# reuse. +jacorb.maxManagedBufSize=18 + +# If this value is 0 an extra unlimited size buffer cache is created +# for the CDROutputStreams. If this value is > 0 then the cache will +# be purged every x msecs. If this value is -1 no caching of these +# buffers will take place. This will reduce memory footprint at the +# cost of decreased performance handling large data structures. +# This value defaults to 0 if not set. +#jacorb.bufferManagerMaxFlush=-1 + +# Normally, a jacorb server will close the TCP/IP connection right +# after sending a CloseConnection message. However, it may +# occasionally happen that the client sends a message into the closed +# connection because it hasn't handled the CloseConnection yet. To +# avoid this situation, closing of the TCP/IP connection can be delayed. +#jacorb.connection.delay_close=on +#jacorb.connection.timeout_after_closeconnection=20000 + +# Initial timeout for establishing a connection. +#jacorb.connection.client.connect_timeout=0 + +# Wait the specified number of msecs for a reply to a request. If +# exceeded, a org.omg.CORBA.TIMEOUT exception will be thrown +#jacorb.connection.client.pending_reply_timeout=0 + +# client-side connection idle timeout, set no non-zero to stop +# close the connection after so many msecs. +#jacorb.connection.client.idle_timeout=0 + +# shall the orb ignore pending messages when a connection idle timeout +# is detected? If "on", the connection is closed and all pending +# messages are cancelled. Default is "off" +#jacorb.connection.client.timeout_ignores_pending_messages=off + +# whenever a network failure is detected, the orb can either +# (infinitely) retry all pending requests, or propagate a COMM_FAILURE +# back into the client code. Default is "off", i.e. throw a +# COMM_FAILURE +#jacorb.connection.client.retry_on_failure=off + +# max time (msecs) a server keeps a connection open if nothing happens +#jacorb.connection.server.timeout=10000 + +# Max no of accepted connections on the server. +#jacorb.connection.max_server_connections= + +# The number of msecs that are waited until the next attempt to find +# an idle connection is made (i.e. do not continuously spin) +#jacorb.connection.wait_for_idle_interval=500 + +# The class name of the SelectionStrategy class +#jacorb.connection.selection_strategy_class= + +# The class name of the StatisticsProvider class +#jacorb.connection.statistics_provider_class= + +#jacorb.reference_caching=off + +# +# The following property specifies the class which is used for +# reference caching. WeakHashtable uses WeakReferences, so entries +# get gc'ed if only the Hashtable has a reference to them. This +# is useful if you have many references to short-living non-persistent +# CORBA objects. It is only available for java 1.2 and above. +# +# On the other hand the standard Hashtable keeps the references until +# they are explicitely deleted by calling _release(). This is useful +# for persistent and long-living CORBA objects. +# +#jacorb.hashtable_class=org.jacorb.util.WeakHashtable +# +jacorb.hashtable_class=java.util.Hashtable + +# use GIOP 1.2 byte order markers (since CORBA 2.4-5) +jacorb.use_bom=off + +# add additional IIOP 1.0 profiles even if we are using IIOP 1.2 +jacorb.giop.add_1_0_profiles=off + +# Use DNS names in IORs +jacorb.dns.enable=off + +# Compact Typecodes (0 - off, 1 - partial (not member_names), 2 - all) +jacorb.compactTypecodes=0 + +# Cache typecode on read +jacorb.cacheTypecodes=off + +# Cache poa names +jacorb.cachePoaNames=off + +########################################### +# # +# Interoperability # +# # +########################################### + +# Turn off indirection encoding for repeated typecodes. This fixes +# interoperability with certain broken ORB's eg. Orbix2000 +jacorb.interop.indirection_encoding_disable=off + +# Iona Comet CORBA/COM bridge can incorrectly encode buffer lengths. +# Enabling this property adds additional length checking and adjustment +# for interoperability with Comet. +jacorb.interop.comet=off + +# Some ORBs do not set a byte value of 1 as a CDR encoded boolean true +# value. Enabling this property interprets any non zero CDR encoded +# boolean value as true. +jacorb.interop.lax_boolean_encoding=off + +# Control whether the method create_abstract_interface_tc performs +# a validity check on the name parameter or not. Turning this check +# off circumvents a bug in Sun's implementation of javax.rmi.CORBA.ValueHander, +# which occasionally passes an invalid name (an empty string) to +# ORBSingleton.create_abstract_interface_tc. If you are using RMI valuetypes, +# you should turn this property off. +jacorb.interop.strict_check_on_tc_creation=on + +# Custom-marshalled RMI valuetypes should be encoded as chunks, but some +# ORBs are not able to decode chunked values. Disable this property for +# interoperability with the ORB in Sun's JDK 1.4.2. +jacorb.interop.chunk_custom_rmi_valuetypes=on +########################################### +# # +# Socket Factories # +# # +########################################### + +# A factory design pattern is used for the creation of sockets and server +# sockets. +# The jacorb.net.socket_factory property can be used to configure +# a socket factory that must implement the operations defined in the +# interface org.jacorb.orb.factory.SocketFactory. +# The jacorb.net.server_socket_factory property can be used to configure a +# server socket factory that must implement the operations defined in the +# interface org.jacorb.orb.factory.ServerSocketFactory. +# +#jacorb.net.socket_factory=org.jacorb.orb.factory.DefaultSocketFactory +#jacorb.net.server_socket_factory=org.jacorb.orb.factory.DefaultServerSocketFactory +#jacorb.net.socket_factory=org.jacorb.orb.factory.PortRangeSocketFactory +#jacorb.net.server_socket_factory=org.jacorb.orb.factory.PortRangeServerSocketFactory +# +# Additional socket factores are supported that allow for the configuration +# of maximum and minimum port numbers that can be used. This can be used to +# enable firewall traversal via a fixed port range. To use these socket factories +# configure one or both of the following property pairs. The first property pair +# configures the client socket factory and the second pair the server socket +# factory. +# +#jacorb.net.socket_factory.port.min +#jacorb.net.socket_factory.port.max +#jacorb.net.server_socket_factory.port.min +#jacorb.net.server_socket_factory.port.max + +########################################### +# # +# BiDirectional GIOP # +# # +########################################### + +# uncomment this initializer if you want to use BiDirectional GIOP + +#org.omg.PortableInterceptor.ORBInitializerClass.bidir_init=org.jacorb.orb.giop.BiDirConnectionInitializer + + +########################################### +# # +# Proxy address in IOR # +# # +########################################### + +# +# with these two properties it is possible to +# tell the ORB what IP/port IORs should contain, +# if the ServerSockets IP/port can't be used +# (e.g. for traffic through a firewall). +# +# WARNING: this is just "dumb" replacing, so you +# have to take care of your configuration! +# + +#jacorb.ior_proxy_host=1.2.3.4 +#jacorb.ior_proxy_port=4711 + + +########################################### +# # +# The Object Adapter Internet Address # +# # +########################################### + +# IP address on multi-homed host (this gets encoded in +# object references). NOTE: Adresses like 127.0.0.X +# will only be accessible from the same machine! +#OAIAddr=1.2.3.4 +OAPort=37310 + + +############################ +# # +# Default Interceptors # +# Please leave them in! # +# # +############################ +org.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer + + + +############################################### +# # +# Implementation Repository Configuration # +# # +############################################### +# Switch off to avoid contacting the ImR on every server start-up +jacorb.use_imr=off + +# Switch off if you don't want to write the ImR address into server IORs +# (ignored if jacorb.use_imr=off) +jacorb.use_imr_endpoint=on + +# if set to "on", servers that don't already have an entry on their +# first call to the imr, will get automatically registered. Otherwise, +# an UnknownServer exception is thrown. +jacorb.imr.allow_auto_register=off + +# if set to "on", the imr will try to "ping" every object reference, +# that it is going to return. If the reference is not alive, TRANSIENT +# is thrown. +jacorb.imr.check_object_liveness=off + +ORBInitRef.ImplementationRepository=http://www.x.y.z/~user/ImR_Ref + +jacorb.imr.table_file=Z:\table.dat +jacorb.imr.backup_file=z:\backup.dat +jacorb.imr.ior_file=/home/bwana/brose/public_html/ImR_Ref +# Time (msecs) that the implementation will wait for a started server to register. +jacorb.imr.timeout= + +# Host for ImR endpoint +jacorb.imr.endpoint_host= +# Port number for IMR endpoint +jacorb.imr.endpoint_port_number= + +# how many millisecs should the imr wait, until a connection from an +# application client is terminated. Default is 2000. +jacorb.imr.connection_timeout=2000 + +# the implementation name, should be set to a different +# name in the code of persistent servers +jacorb.implname=StandardImplName + +# +# This is supposed to be a generic startup string for everything +# that calls Runtime.exec(). Might be replaced by jaco[.bat]. +# +jacorb.java_exec=java -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton + +# with these two properties it is possible to +# tell the ORB what IP / hostname and port the IMR IOR and IMRified server IORs should +# contain, if the ServerSockets IP/port can't be used +# (e.g. for traffic through a firewall). +# +# WARNING: this is just "dumb" replacement, so you +# have to take care of your configuration! +# +#jacorb.imr.ior_proxy_host=1.2.3.4 +#jacorb.imr.ior_proxy_port=4711 + + +######################### +# # +# SSL Configuration # +# # +######################### + +# +# The port number used by SSL, will be dynmically assigned +# by default +# + +#OASSLPort=4711 + +# This interceptor must be set if programs need access to +# certificates using the CORBA Security API, SSL works also +# without this interceptor + +#org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.SecurityServiceInitializer +#org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.iaik.SecurityServiceInitializer + +# qualified classname of access decision object +jacorb.security.access_decision=org.jacorb.security.level2.AccessDecisionImpl + +# list of qualified classnames of principal authenticator objects, +# separated by commas (no whitespaces!). The first entry (that can +# be successfully created) will be available through the +# principal_authenticator property. +jacorb.security.principal_authenticator=org.jacorb.security.level2.PrincipalAuthenticatorImpl + +# the qualified classname of the ssl socket factory class +#jacorb.ssl.socket_factory=org.jacorb.security.ssl.sun_jsse.SSLSocketFactory +jacorb.ssl.socket_factory=org.jacorb.security.ssl.iaik.SSLSocketFactory + +# the qualified classname of the ssl server socket factory class +#jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory +jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.iaik.SSLServerSocketFactory + +# IIOP/SSL parameters (numbers are hex values, without the leading "0x"): +# NoProtection = 1 +# EstablishTrustInClient = 40 +# EstablishTrustInTarget = 20 +# mutual authentication = 60 +# please see the programming guide for more explanation + +jacorb.security.support_ssl=off + +jacorb.security.ssl.client.supported_options=0 +jacorb.security.ssl.client.required_options=0 + +jacorb.security.ssl.server.supported_options=0 +jacorb.security.ssl.server.required_options=0 + +# +# If set, the following two values will be placed in the IOR, if +# "corbaloc:ssliop" ssliop. +# +# If not set, only EstablishTrustInTarget is used for both supported +# and required options. EstablishTrustInClient is not set, and the +# rest of the Association Options aren't currently used anyway. +#jacorb.security.ssl.corbaloc_ssliop.supported_options=0 +#jacorb.security.ssl.corbaloc_ssliop.required_options=0 + +# The name and location of the keystore. This may be absolute or +# relative to the home directory. +# +# NOTE (for Sun JSSE users): The "javax.net.ssl.trustStore[Password]" +# properties don't seem to take effect, so you may want to add trusted +# certificates to "normal" keystores. In this case, please set the +# property "jacorb.security.jsse.trustees_from_ks"is to "on", so trusted +# certificates are taken from the keystore instead of a dedicated +# truststore. +jacorb.security.keystore= +jacorb.security.keystore_password= + + +# +# IAIK specific settings +# + + +# files with public key certs of trusted CAs +# +# WARNING: If no CA certs are present, the IAIK chain verifier will +# accept ALL otherwise valid chains! +# +jacorb.security.trustees= + +# the name of the default key alias to look up in the keystore +jacorb.security.default_user= +jacorb.security.default_password= + +# have iaiks ssl classes print debug output to stdout +jacorb.security.iaik_debug=off + +# +# Sun JSSE specific settings +# +# Use the keystore to take trusted certs from. +jacorb.security.jsse.trustees_from_ks=off + +# A comma-separated (no whitespaces!) list of cipher suite names. See +# the JSSE docs on how to obtain the correct cipher suite strings +jacorb.security.ssl.server.cipher_suites= +jacorb.security.ssl.client.cipher_suites= + +# A comma seperated list of the names of the protocols to be set enabled on the SSL socket. +# See the JSSE documentation for javax.net.ssl.SSLSocket#setEnabledProtocols() +#jacorb.security.ssl.client.protocols= +#jacorb.security.ssl.server.protocols= + +# A user defined javax.net.ssl.TrustManager implemementation class name. +# Will be used to intialise the SSLContext. See JSSE docs for javax.net.ssl.SSLContext#init(). +# Must be capable of instantiation via a no arg constructor. +#jacorb.security.ssl.client.trust_manager=my.trust.Manager +#jacorb.security.ssl.server.trust_manager=my.trust.Manager + +######################### +# # +# POA Configuration # +# # +######################### + +# displays a GUI monitoring tool for servers +jacorb.poa.monitoring=off + +# POA log levels: +# 0 = fatal errors only = "almost off" (FATAL ERRORS) +# 1 = non-fatal errors and exceptions (ERROR) +# 2 = important messages (WARN) +# 3 = informational messages and exceptions (INFO) +# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) +jacorb.poa.log.verbosity=3 + +# thread pool configuration for request processing +jacorb.poa.thread_pool_max=20 +jacorb.poa.thread_pool_min=5 + +# if set, request processing threads in thePOA +# will run at this priority. If not set or invalid, +# MAX_PRIORITY will be used. +#jacorb.poa.thread_priority= + +# Properties controlling the POA's request queue. If queue_wait is off, +# then if there are more than queue_max requests in the queue, the +# client gets TRANSIENT exceptions for any requests. If queue_wait is on, +# then the call blocks at the server side until no more than queue_min +# requests are left in the queue. The new request is then delivered as usual. +jacorb.poa.queue_wait=off +jacorb.poa.queue_max=100 +jacorb.poa.queue_min=10 + +# Set this to on for server-side checking of expired ReplyEndTimePolicy. +# (This also applies to RelativeRoundtripTimeoutPolicy.) When this is on, +# the clocks of the server and client machine need to be synchronized. +#jacorb.poa.check_reply_end_time=off + + +################################### +# # +# Transport Layer Configuration # +# # +################################### + +# Names of the factories classes for all installed transport plug-ins +# (comma-separated list). + +#jacorb.transport.factories=org.jacorb.orb.iiop.IIOPFactories + +# ProfileId tags of all installed transports that should actually +# listen on the server side. This is a comma-separated list of numbers, +# each number must correspond to one ProfileId tag from a factory in +# jacorb.transport.factories. In IORs produced by the server, the transport +# profiles will appear in the order indicated by this list. + +#jacorb.transport.server.listeners=0 + +# Name of a class that selects the transport profile to use on the +# client side. + +#jacorb.transport.client.selector=org.jacorb.orb.DefaultProfileSelector + + +################################## +# # +# Name Service Configuration # +# # +################################## + +# log levels: +# 0 = fatal errors only = "almost off" (FATAL ERRORS) +# 1 = non-fatal errors and exceptions (ERROR) +# 2 = important messages (WARN) +# 3 = informational messages and exceptions (INFO) +# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) + +jacorb.naming.log.verbosity=3 + +# +# name of the logger factory. Implement your own subclass of +# org.jacorb.util.LoggerFactory and enter class name here to +# customize logging behavior. Built-in default is org.jacorb.util.LogKitLoggerFactory +#jacorb.log.loggerFactory= + +# Whether non active references are purged from name service +# when list operation is invoked. + +jacorb.naming.purge=on + +# Whether resolve should return references without trying to +# ping them to see if they're still alive first. + +jacorb.naming.noping=on + +# The file where the name server drops its IOR +jacorb.naming.ior_filename=c:/NS_Ref + +######################################## +# # +# Trader configuration, please see # +# src/trading/README.PROPERTIES for # +# explanation # +# # +######################################## + +jtrader.util.max_threads=10 +jtrader.util.min_threads=1 +jtrader.util.query_timeout=5000 +jtrader.impl.cache_max=100 + +# boolean values, e.g. true / false +#jtrader.modifiable_properties= +#jtrader.dynamic_properties= +#jtrader.proxy_offers= + +jtrader.debug=false +jtrader.debug_verbosity=3 + +#integer values +jtrader.def_search_card= +jtrader.max_search_card= +jtrader.def_match_card= +jtrader.max_match_card= +jtrader.def_return_card= +jtrader.max_return_card= +jtrader.max_list= +jtrader.def_hop_count= +jtrader.max_hop_count= + +#FollowOptions +#always=2 +#if_no_local=1 +#local_only=0 +jtrader.def_follow_policy= +jtrader.max_follow_policy= +jtrader.max_link_follow_policy= + +######################################################## +# # +# Notification Service configuration, please see # +# the JacORB ProgrammingGuide for a explanation # +# # +######################################################## + +jacorb.notification.filter.thread_pool_size = 2 + +jacorb.notification.proxyconsumer.thread_pool_size = 2 + +jacorb.notification.proxysupplier.thread_pool_size = 4 + +jacorb.notification.supplier.poll_intervall = 1000 + +jacorb.notification.max_batch_size = 1 + +jacorb.notification.max_events_per_consumer = 100 + +jacorb.notification.order_policy = PriorityOrder + +jacorb.notification.discard_policy = PriorityOrder + +jacorb.notification.consumer.backout_interval = 5000 + +jacorb.notification.consumer.error_threshold = 3 + +# valid values: ThreadPool, ThreadPerProxy +jacorb.notification.proxysupplier.threadpolicy = ThreadPool + +jacorb.notification.default_filter_factory = builtin + +# jacorb.notification.supplier.max_number = 10 + +# jacorb.notification.start_time_supported = 10 + +jacorb.notification.stop_time_supported = on + +jacorb.notification.proxy.destroy_causes_disconnect = on + +# Notification Service log levels: +org.jacorb.notification.log.verbosity = 3 + +######################################## +# # +# SAS configuration # +# # +######################################## + +jacorb.SAS.log.verbosity=INFO +jacorb.SAS.CSS.log.verbosity=INFO +jacorb.SAS.TSS.log.verbosity=INFO + +# This option defines the specific SAS context generator/validator +# Currently supported contexts include: +# NullContext - Sends a NULL SAS Context +# GssUpContext - Uses GSSUP security +# KerberosContext - uses Kerberos security +# At least one context must be selected for SAS support +#jacorb.security.sas.contextClass=org.jacorb.security.sas.NullContext +#jacorb.security.sas.contextClass=org.jacorb.security.sas.GssUpContext +#jacorb.security.sas.contextClass=org.jacorb.security.sas.KerberosContext + +# This initializer installs the SAS interceptors +# Comment out this line if you do not want SAS support +#org.omg.PortableInterceptor.ORBInitializerClass.SAS=org.jacorb.security.sas.SASInitializer + +# This option is used for GSSUP security and sets up the GSS Provider +# Comment out this line if you are not using GSS UP authentication +#org.omg.PortableInterceptor.ORBInitializerClass.GSSUPProvider=org.jacorb.security.sas.GSSUPProviderInitializer + +######################################## +# # +# Custom configuration # +# # +######################################## + + +# any other custom properties can be added here. +