congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
bitronix.tm.utils
Code IndexAdd Tabnine to your IDE (free)

How to use bitronix.tm.utils

Best Java code snippets using bitronix.tm.utils (Showing top 20 results out of 315)

origin: bitronix/btm

/**
 * Register the specified management object.
 *
 * @param name the name of the object.
 * @param obj  the management object.
 */
public static void register(String name, Object obj) {
  if (mbeanServer == null)
    return;
  runOrEnqueueCommand(new ManagementRegisterCommand(name, obj));
}
origin: bitronix/btm

/**
 * Unregister the management object with the specified name.
 *
 * @param name the name of the object.
 */
public static void unregister(String name) {
  if (mbeanServer == null)
    return;
  runOrEnqueueCommand(new ManagementUnregisterCommand(name));
}
origin: bitronix/btm

public void testEquals() throws Exception {
  Uid uid1 = UidGenerator.generateUid();
  Uid uid2 = UidGenerator.generateUid();
  Uid uid3 = null;
  assertFalse(uid1.equals(uid2));
  assertFalse(uid2.equals(uid3));
  assertTrue(uid2.equals(uid2));
}
origin: bitronix/btm

public void testHexaStringEncoder() throws Exception {
  byte[] result = Encoder.intToBytes(0x80);
  String hexString = new Uid(result).toString();
  assertEquals("00000080", hexString);
  result = Encoder.longToBytes(0x81);
  hexString = new Uid(result).toString();
  assertEquals("0000000000000081", hexString);
  result = Encoder.shortToBytes((short) 0xff);
  hexString = new Uid(result).toString();
  assertEquals("00FF", hexString);
}
origin: bitronix/btm

public void testSetClonedProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "clonedProps.key", "value");
  assertEquals("value", destination.getClonedProps().getProperty("key"));
}
origin: bitronix/btm

public void testSetMultipleProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "props.key1", "value1");
  PropertyUtils.setProperty(destination, "props.key2", "value2");
  assertEquals("value1", destination.getProps().getProperty("key1"));
  assertEquals("value2", destination.getProps().getProperty("key2"));
}
origin: com.github.marcus-nl.btm/btm

public void testCrypt() throws Exception {
  String textToCrypt = "java";
  String cypherText = CryptoEngine.crypt("DES", textToCrypt);
  String decryptedText = CryptoEngine.decrypt("DES", cypherText);
  assertEquals(textToCrypt, decryptedText);
}
origin: bitronix/btm

public void testSetPropertiesObjectLongKey() throws Exception {
  PrivateDestination destination = new PrivateDestination();
  PropertyUtils.setProperty(destination, "props.key", "value1");
  PropertyUtils.setProperty(destination, "props.a.dotted.key", "value2");
  assertEquals("value1", destination.getProps().get("key"));
  assertEquals("value2", destination.getProps().get("a.dotted.key"));
}
origin: com.github.marcus-nl.btm/btm

public void testHexaStringEncoder() throws Exception {
  byte[] result = Encoder.intToBytes(0x80);
  String hexString = new Uid(result).toString();
  assertEquals("00000080", hexString);
  result = Encoder.longToBytes(0x81);
  hexString = new Uid(result).toString();
  assertEquals("0000000000000081", hexString);
  result = Encoder.shortToBytes((short) 0xff);
  hexString = new Uid(result).toString();
  assertEquals("00FF", hexString);
}
origin: com.github.marcus-nl.btm/btm

public void testSetClonedProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "clonedProps.key", "value");
  assertEquals("value", destination.getClonedProps().getProperty("key"));
}
origin: com.github.marcus-nl.btm/btm

public void testEquals() throws Exception {
  Uid uid1 = UidGenerator.generateUid();
  Uid uid2 = UidGenerator.generateUid();
  Uid uid3 = null;
  assertFalse(uid1.equals(uid2));
  assertFalse(uid2.equals(uid3));
  assertTrue(uid2.equals(uid2));
}
origin: com.github.marcus-nl.btm/btm

public void testSetMultipleProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "props.key1", "value1");
  PropertyUtils.setProperty(destination, "props.key2", "value2");
  assertEquals("value1", destination.getProps().getProperty("key1"));
  assertEquals("value2", destination.getProps().getProperty("key2"));
}
origin: bitronix/btm

public void testCrypt() throws Exception {
  String textToCrypt = "java";
  String cypherText = CryptoEngine.crypt("DES", textToCrypt);
  String decryptedText = CryptoEngine.decrypt("DES", cypherText);
  assertEquals(textToCrypt, decryptedText);
}
origin: com.github.marcus-nl.btm/btm

/**
 * Register the specified management object.
 *
 * @param name the name of the object.
 * @param obj  the management object.
 */
public static void register(String name, Object obj) {
  if (mbeanServer == null)
    return;
  runOrEnqueueCommand(new ManagementRegisterCommand(name, obj));
}
origin: com.github.marcus-nl.btm/btm

/**
 * Unregister the management object with the specified name.
 *
 * @param name the name of the object.
 */
public static void unregister(String name) {
  if (mbeanServer == null)
    return;
  runOrEnqueueCommand(new ManagementUnregisterCommand(name));
}
origin: bitronix/btm

public void testSetMultipleClonedProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "clonedProps.key1", "value1");
  PropertyUtils.setProperty(destination, "clonedProps.key2", "value2");
  assertEquals("value1", destination.getClonedProps().getProperty("key1"));
  assertEquals("value2", destination.getClonedProps().getProperty("key2"));
}
origin: bitronix/btm

public void testSetPropertiesDirectly() throws Exception {
  Destination destination = new Destination();
  Properties p = new Properties();
  p.setProperty("key", "value");
  PropertyUtils.setProperty(destination, "props", p);
  assertEquals("value", destination.getProps().getProperty("key"));
}
origin: com.github.marcus-nl.btm/btm

public void testSetMultipleClonedProperties() throws Exception {
  Destination destination = new Destination();
  PropertyUtils.setProperty(destination, "clonedProps.key1", "value1");
  PropertyUtils.setProperty(destination, "clonedProps.key2", "value2");
  assertEquals("value1", destination.getClonedProps().getProperty("key1"));
  assertEquals("value2", destination.getClonedProps().getProperty("key2"));
}
origin: bitronix/btm

public void testSetClonedPropertiesDirectly() throws Exception {
  Destination destination = new Destination();
  Properties p = new Properties();
  p.setProperty("key", "value");
  PropertyUtils.setProperty(destination, "clonedProps", p);
  assertEquals("value", destination.getClonedProps().getProperty("key"));
}
origin: com.github.marcus-nl.btm/btm

public void testSetClonedPropertiesDirectly() throws Exception {
  Destination destination = new Destination();
  Properties p = new Properties();
  p.setProperty("key", "value");
  PropertyUtils.setProperty(destination, "clonedProps", p);
  assertEquals("value", destination.getClonedProps().getProperty("key"));
}
bitronix.tm.utils

Most used classes

  • Decoder
    Constant to string decoder.
  • PropertyUtils
    Smart reflection helper.
  • Uid
    A constant UID byte array container optimized for use with hashed collections.
  • UidGenerator
    Helper that offers UID generation (GTRID, XID, sequences) needed by the transaction manager.Generate
  • CryptoEngine
    Simple crypto helper that uses symetric keys to crypt and decrypt resources passwords.
  • Encoder,
  • ManagementRegistrar,
  • MonotonicClock,
  • PropertyException,
  • Scheduler,
  • ClassLoaderUtils,
  • CollectionUtils,
  • CryptoEngine$Base64$OutputStream,
  • CryptoEngine$Base64,
  • ExceptionAnalyzer,
  • ExceptionUtils,
  • InitializationException,
  • Scheduler$SchedulerNaturalOrderIterator,
  • Scheduler$SchedulerReverseOrderIterator
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now