rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public String getServerPeerID() | public int getServerPeerID() | public String getServerPeerID() { return serverPeerID; } |
createRecoverable(); | public synchronized void startService() throws Exception { try { if (started) { return; } log.debug(this + " starting"); if (queuedExecutorPoolSize < 1) { throw new IllegalArgumentException("queuedExecutorPoolSize mus... | |
removeRecoverable(); | public synchronized void stopService() throws Exception { try { if (!started) { return; } log.debug(this + " stopping"); started = false; removeRecoverable(); shutdownLogger.shutdown(serverPeerID); ... | |
InitialContext ic = new InitialContext(); ds = new BasicDataSource(); ic.close(); | BasicDataSource bds = new BasicDataSource(); bds.setDriverClassName("org.hsqldb.jdbcDriver"); bds.setUsername("sa"); bds.setPassword(""); bds.setUrl(dbURL); bds.setDefaultAutoCommit(false); bds.setDefaultReadOnly(false); bds.setInitialSize(0); bds.setMaxActive(20); bds.setMaxIdle(20); bds.setPoolPreparedStatements(tru... | public void start() throws Exception { InitialContext ic = new InitialContext(); ds = new BasicDataSource(); ic.close(); Connection conn = null; String sql = null; try { conn = ds.getConnection(); try { if (log.isTraceEnabl... |
u.p("right set to auto"); | public static void setupAbsolute( Context c, Box box ) { String position = getPosition( c, box ); if ( position.equals( "absolute" ) ) { if ( c.css.hasProperty( box.node, "right", false ) ) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... | |
u.p("right set to : " + box.right); | public static void setupAbsolute( Context c, Box box ) { String position = getPosition( c, box ); if ( position.equals( "absolute" ) ) { if ( c.css.hasProperty( box.node, "right", false ) ) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... | |
u.p("left set to auto"); | public static void setupAbsolute( Context c, Box box ) { String position = getPosition( c, box ); if ( position.equals( "absolute" ) ) { if ( c.css.hasProperty( box.node, "right", false ) ) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... | |
u.p("left set to : " + box.left); | public static void setupAbsolute( Context c, Box box ) { String position = getPosition( c, box ); if ( position.equals( "absolute" ) ) { if ( c.css.hasProperty( box.node, "right", false ) ) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... | |
InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment()); | ic = new InitialContext(ServerManagement.getJNDIEnvironment()); | protected void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); setupDestinations(); final String defaultSecurityConfig = "<security><role name=\"def\" read=\"true\" write=\"true\" create=\"true\"/></security>"; oldDefaultConfig = ServerManageme... |
ic.close(); | protected void tearDown() throws Exception { ServerManagement.setDefaultSecurityConfig(oldDefaultConfig); ServerManagement.undeployQueue("testQueue"); ServerManagement.undeployTopic("testTopic"); ServerManagement.undeployTopic("securedTopic"); ServerManagement.undeployTopic("unsecure... | |
public static MessageDelegate createThinDelegate(JBossMessage m) | public static MessageDelegate createThinDelegate(JBossMessage m, int deliveryCount) | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new BytesMessageDelegate((JBossBytesMessage)m); | del = new BytesMessageDelegate((JBossBytesMessage)m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new MapMessageDelegate((JBossMapMessage)m); | del = new MapMessageDelegate((JBossMapMessage)m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new ObjectMessageDelegate((JBossObjectMessage)m); | del = new ObjectMessageDelegate((JBossObjectMessage)m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new StreamMessageDelegate((JBossStreamMessage)m); | del = new StreamMessageDelegate((JBossStreamMessage)m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new TextMessageDelegate((JBossTextMessage)m); | del = new TextMessageDelegate((JBossTextMessage)m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
del = new MessageDelegate(m); | del = new MessageDelegate(m, deliveryCount); | public static MessageDelegate createThinDelegate(JBossMessage m) { MessageDelegate del = null; if (m instanceof BytesMessage) { del = new BytesMessageDelegate((JBossBytesMessage)m); } else if (m instanceof MapMessage) { del = new MapMessageDelegate((JBossMapMessa... |
debugShow.add( new JCheckBoxMenuItem( new FontMetricsAction() ) ); | public HTMLTest( String[] args ) throws Exception { super( BASE_TITLE ); panel.setPreferredSize( new Dimension( text_width, text_width ) ); JScrollPane scroll = new JScrollPane( panel ); scroll.setVerticalScrollBarPolicy( scroll.VERTICAL_SCROLLBAR_ALWAYS ); scroll.setHorizo... | |
if (Thread.currentThread().getContextClassLoader() != null) { try { factory = (AbstractWorkflowFactory) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); } catch (ClassNotFoundException e) { factory = (AbstractWorkflowFactory) Class.forName(clazz).newInstance(); } } else { factory = (Abst... | factory = (AbstractWorkflowFactory) ClassLoaderUtil.loadClass(clazz, getClass()).newInstance(); | public void load(URL url) throws FactoryException { InputStream is = getInputStream(url); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = null; try { db = dbf.newDocume... |
return rowHeight; | return direction * rowHeight; | public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r... |
return getColumnCount() == 0 ? 10 : sum / getColumnCount(); | int inc = getColumnCount() == 0 ? 10 : sum / getColumnCount(); return direction * inc; | public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r... |
Box box = panel.findElementBox(evt.getX(), evt.getY()); | Box box = findElementBox(panel.getRootBox(),evt.getX(),evt.getY(),null); | private Box findBox(MouseEvent evt) { Box box = panel.findElementBox(evt.getX(), evt.getY()); if (box == null) return null; if (box instanceof LineBox) return null; return box; } |
if(box.getParent()!=null) { if(box.getParent().getParent()!=null) { if(box.element == box.getParent().getParent().element) { return getDeepestHover(box.getParent()); } } } | private Box getDeepestHover(Box box) { if(box == null) { return null; } if(panel.getContext().getCss().isHoverStyled(box.element)) { return box; } //System.out.println("going to parent: " + box.getParent()); return getDeepestHover(box.getParent()); } | |
return new SimpleDelivery(ms.reference(r), true); | return new SimpleDelivery(true); | public Delivery handle(DeliveryObserver sender, Routable r, Transaction tx) { if (log.isTraceEnabled()){ log.trace(this + " handles " + r + (tx == null ? " non-transactionally" : " in transaction: " + tx) ); } Set deliveries = router.handle(sender, r, tx); // must insure that all deliveries are comp... |
res.initTime = initTime; res.testTime = testTime; | res.startTime = startTime; res.endTime = endTime; | public JobResult getResult() { log.info("Getting result"); JobResult res = new JobResult(); res.failed = failed; if (res.failed) { log.info("Failed"); res.throwables = throwables; } else { log.info("Didn't fail"); res.initTime = initTime; ... |
startTime = System.currentTimeMillis(); | public void run() { try { startTime = System.currentTimeMillis(); log.info("==============Running job:" + this); setup(); logInfo(); runTest(); tearDown(); log.info("================Finished running job"); } catch (Throwa... | |
long testStartTime = System.currentTimeMillis(); initTime = testStartTime - startTime; | long now = System.currentTimeMillis(); | protected void runTest() throws Exception { failed = false; Thread[] servitorThreads = new Thread[numSessions]; Servitor[] servitors = new Servitor[numSessions]; for (int i = 0; i < numSessions; i++) { Servitor servitor = createServitor(numMessages); servi... |
long endTime = System.currentTimeMillis(); testTime = endTime - testStartTime; System.out.println("*********************************************Test time is:" + testTime); | endTime = System.currentTimeMillis(); | protected void runTest() throws Exception { failed = false; Thread[] servitorThreads = new Thread[numSessions]; Servitor[] servitors = new Servitor[numSessions]; for (int i = 0; i < numSessions; i++) { Servitor servitor = createServitor(numMessages); servi... |
log.info("Started callback server on: " + callbackServer.getLocator()); | if (log.isTraceEnabled()) log.trace("Started callback server on: " + callbackServer.getLocator()); | public static synchronized Connector getCallbackServer() throws Exception { Connector callbackServer = new Connector(); // use an anonymous port - 0.0.0.0 gets filled in by remoting as the current host String locatorURI = "socket://0.0.0.0:0"; callbackServer.setInvokerLocator(locatorURI);... |
public static boolean isBlockLevel(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); | public static boolean isBlockLevel(CascadedStyle style) { if (!style.hasProperty(CSSName.DISPLAY)) return false; String display = style.propertyByName(CSSName.DISPLAY).getValue().getCssText(); | public static boolean isBlockLevel(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); if (display.equals("block")) return true; if (display.equals("list-item")) return true; if (display.equals("table")) return true; return false; } |
public static boolean isFloated(CalculatedStyle style) { String float_val = style.getStringProperty("float"); | public static boolean isFloated(CascadedStyle style) { if (!style.hasProperty(CSSName.DISPLAY)) return false; String float_val = style.propertyByName(CSSName.DISPLAY).getValue().getCssText(); | public static boolean isFloated(CalculatedStyle style) { String float_val = style.getStringProperty("float"); if (float_val == null) { return false; } if (float_val.equals("left")) { return true; } if (float_val.equals("right")) { return tru... |
public static boolean mayHaveFirstLetter(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); | public static boolean mayHaveFirstLetter(CascadedStyle style) { if (!style.hasProperty(CSSName.DISPLAY)) return false; String display = style.propertyByName(CSSName.DISPLAY).getValue().getCssText(); | public static boolean mayHaveFirstLetter(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); if (display.equals("block")) return true; if (display.equals("list-item")) return true; if (display.equals("table-cell")) return true; if (display.equals("t... |
public static boolean mayHaveFirstLine(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); | public static boolean mayHaveFirstLine(CascadedStyle style) { if (!style.hasProperty(CSSName.DISPLAY)) return false; String display = style.propertyByName(CSSName.DISPLAY).getValue().getCssText(); | public static boolean mayHaveFirstLine(CalculatedStyle style) { String display = style.getStringProperty(CSSName.DISPLAY); if (display.equals("block")) return true; if (display.equals("list-item")) return true; if (display.equals("run-in")) return true; if (display.equals("table")... |
if (ref == null) { log.warn("Could not find reference for message"); } | public List undelivered(Filter filter) { // unreliable messages first List undelivered = super.undelivered(filter); try { List persisted = pm.messages(channelID); for(Iterator i = persisted.iterator(); i.hasNext(); ) { StorageIdentifier id = (StorageIdentifier... | |
if (child.isChildrenExceedBounds()) { setChildrenExceedBounds(true); } if (child.isFixedDescendant()) { setFixedDescendant(true); } | propagateChildProperties(child); | public void addChild(Box child) { if (child == null) { throw new NullPointerException("trying to add null child"); } child.setParent(this); boxes.add(child); if (child.isChildrenExceedBounds()) { setChildrenExceedBounds(true); } if (child.isFixe... |
public static ComponentUI createUI(final JComponent c) { return new BasicViewportUI(); } | public static ComponentUI createUI(JComponent c) { return new BasicViewportUI(); } | public static ComponentUI createUI(final JComponent c) { return new BasicViewportUI(); } |
{ Dimension d = new Dimension(100,100); System.out.println("BasicViewportUI->preff->"+d); return d; } | { Dimension d = new Dimension(100,100); return d; } | public Dimension getPreferredSize(JComponent c) { Dimension d = new Dimension(100,100); System.out.println("BasicViewportUI->preff->"+d); return d; } |
public void installUI(final JComponent c) { super.installUI(c); } | public void installUI(JComponent c) { super.installUI(c); installListeners(c); } | public void installUI(final JComponent c) { super.installUI(c); } |
{ System.out.println("BasicViewportUI->paint->"+c); } | { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); if (backingStoreImage == null || backingStoreWidth != viewBounds.width || backingStoreHeight != viewBounds.height) { backingStoreImage = v.createImage(viewB... | public void paint(Graphics g, JComponent c) { System.out.println("BasicViewportUI->paint->"+c); } |
handleConnectionFailure(cd); | handleConnectionFailure(cd, cd.getRemotingConnection()); | public void handleConnectionException(Throwable throwable, Client client) { try { log.debug(this + " is being notified of connection failure: " + throwable); handleConnectionFailure(cd); } catch (Throwable e) { log.error("Caught excepti... |
lockValve = new ReentrantWriterPreferenceReadWriteLock(); | ValveAspect(ClientConnectionDelegate delegate, HAAspect copy) { super(copy); this.delegate = delegate; ConnectionListener listener = new ConnectionFailureListener(delegate); ((ConnectionState) ((DelegateSupport) delegate).getState()). getRemotingConnectionListener().addDelegateListener(... | |
protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate, JMSRemotingConnection jmsConnection) throws Exception | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception { Valve localValve = null; // The idea is to reset the Valve synchronized with a reset valve synchronized (this) // I'm not sure if this synchronized is necessary. I will keep it here just to be safe... |
Valve localValve = null; | log.info("Processing handleConnectionFailure "); | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception { Valve localValve = null; // The idea is to reset the Valve synchronized with a reset valve synchronized (this) // I'm not sure if this synchronized is necessary. I will keep it here just to be safe... |
synchronized (this) | lockValve.writeLock().acquire(); try | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception { Valve localValve = null; // The idea is to reset the Valve synchronized with a reset valve synchronized (this) // I'm not sure if this synchronized is necessary. I will keep it here just to be safe... |
localValve = valve; | if (jmsConnection.isFailed()) { log.info("Failover on " + failedConnDelegate + " was already performed, so just ignoring call to handleConnectionFailure"); return; } log.info("Processing valve on exception failure"); jmsConnection.setFailed(true); super.handleConnectionFailure(failedConnDelegate); log.info("Failover o... | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception { Valve localValve = null; // The idea is to reset the Valve synchronized with a reset valve synchronized (this) // I'm not sure if this synchronized is necessary. I will keep it here just to be safe... |
if (localValve.open()) { try { log.info("Processing valve on exception failure"); super.handleConnectionFailure(failedConnDelegate); } finally { localValve.close(); synchronized (this) { valve = new Valve(); } } } else { log.info("The valve was closed, so this invocation waited another invocation to finish on handleFa... | protected void handleConnectionFailure(ClientConnectionDelegate failedConnDelegate) throws Exception { Valve localValve = null; // The idea is to reset the Valve synchronized with a reset valve synchronized (this) // I'm not sure if this synchronized is necessary. I will keep it here just to be safe... | |
valve.isOpened(true); | public Object invoke(Invocation invocation) throws Throwable { Object returnObject = null; boolean failure = false; // Eventually retries in case of listed exceptions for (int i = 0; i < MAX_IO_RETRY_COUNT; i++) { // We shouldn't have any calls being made while the failover is bein... | |
handleConnectionFailure(delegate); | handleConnectionFailure(delegate, delegate.getRemotingConnection()); | public Object invoke(Invocation invocation) throws Throwable { Object returnObject = null; boolean failure = false; // Eventually retries in case of listed exceptions for (int i = 0; i < MAX_IO_RETRY_COUNT; i++) { // We shouldn't have any calls being made while the failover is bein... |
toSend = new JBossMessage(m, 0); | if(m instanceof BytesMessage) { toSend = new JBossBytesMessage((BytesMessage)m,0); } else if(m instanceof MapMessage) { toSend = new JBossMapMessage((MapMessage)m,0); } else if(m instanceof ObjectMessage) { toSend = new JBossObjectMessage((ObjectMessage)m,0); } else if(m instanceof StreamMessage) { toSend = new JBossSt... | public Object handleSend(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; Object[] args = mi.getArguments(); Destination destination = (Destination)args[0]; Message m = (Message)args[1]; int deliveryMode = ((Integer)args[2]).intValu... |
if ( ( factory == null && cssRule.getType() == CSSRule.STYLE_RULE ) || | if ( | public static Iterator fromCSSPropertyDecl( CSSRule cssRule, CSSStyleDeclaration style, String propName, int sequence ) { // HACK: special cases for RuleNormalizer...need to work this out cleanly PropertyFactory factory = (PropertyFactory)PRP_FACTORIES.get( propName ); if ( ( factory == null &&... |
Boolean result = (Boolean) cache.get(action); | Boolean result = null; if (cache != null) { result = (Boolean) cache.get(action); } | private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps, int stepId) throws WorkflowException { if (action == null) { return false; } WorkflowDescriptor wf = getWorkflowDescriptorForAction(action); Map cache = (Map) stateCache.get(); ... |
cache.clear(); | if (cache != null) { cache.clear(); } else { stateCache.set(new HashMap()); } | protected boolean transitionWorkflow(WorkflowEntry entry, List currentSteps, WorkflowStore store, WorkflowDescriptor wf, ActionDescriptor action, Map transientVars, Map inputs, PropertySet ps) throws WorkflowException { Map cache = (Map) stateCache.get(); cache.clear(); Step step = getCurrentSt... |
public Class getCategory() | public final Class getCategory() | public Class getCategory() { return JobMediaSheets.class; } |
public String getName() | public final String getName() | public String getName() { return "job-media-sheets"; } |
this.drainDestination(cf, queue); | public void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); ServerManagement.undeployQueue("Queue"); ServerManagement.deployQueue("Queue"); InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)ic.lo... | |
public ConnectionState(ConnectionDelegate delegate) | public ConnectionState(ConnectionDelegate delegate, String serverId) | public ConnectionState(ConnectionDelegate delegate) { super(null, delegate); children = new SyncSet(new HashSet(), new WriterPreferenceReadWriteLock()); this.delegate = delegate; resourceManager = new ResourceManager(delegate); //TODO size should be configurable pooledExecutor =... |
resourceManager = new ResourceManager(delegate); | resourceManager = ResourceManagerFactory.instance.getResourceManager(serverId); | public ConnectionState(ConnectionDelegate delegate) { super(null, delegate); children = new SyncSet(new HashSet(), new WriterPreferenceReadWriteLock()); this.delegate = delegate; resourceManager = new ResourceManager(delegate); //TODO size should be configurable pooledExecutor =... |
public DelegateSupport(String objectID, InvokerLocator locator) | public DelegateSupport(String objectID) | public DelegateSupport(String objectID, InvokerLocator locator) { this.id = objectID; this.locator = locator; } |
this.id = objectID; this.locator = locator; | this.id = objectID; | public DelegateSupport(String objectID, InvokerLocator locator) { this.id = objectID; this.locator = locator; } |
try { client = new Client(locator, "JMS"); } catch (Exception e) { throw new RuntimeException("Failed to create client", e); } SimpleMetaData md = getMetaData(); md.addMetaData(MetaDataConstants.JMS, MetaDataConstants.INVOKER_CLIENT, client, PayloadKey.TRANSIENT); md.addMetaData(MetaDataConstants.JMS, MetaDataCons... | public void init() { ((Advised)this)._getInstanceAdvisor().appendInterceptor(this); checkMarshallers(); try { client = new Client(locator, "JMS"); } catch (Exception e) { throw new RuntimeException("Failed to create client", e); } ... | |
InvocationResponse response = (InvocationResponse)client.invoke(invocation, null); | InvocationResponse response = (InvocationResponse)getClient().invoke(invocation, null); | public Object invoke(Invocation invocation) throws Throwable { if (log.isTraceEnabled()) { log.trace("invoking " + ((MethodInvocation)invocation).getMethod().getName() + " on server"); } invocation.getMetaData().addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, ... |
public static void log( String where, Level level, String msg ) { if ( initPending ) { init(); | public static void log(String where, Level level, String msg) { if (initPending) { init(); } getLogger(where).log(level, msg); | public static void log( String where, Level level, String msg ) { if ( initPending ) { init(); } getLogger( where ).log( level, msg ); } |
getLogger( where ).log( level, msg ); } | public static void log( String where, Level level, String msg ) { if ( initPending ) { init(); } getLogger( where ).log( level, msg ); } | |
public static void main( String args[] ) { try { XRLog.cascade( "Cascade msg" ); XRLog.cascade( Level.WARNING, "Cascade msg" ); XRLog.exception( "Exception msg" ); XRLog.exception( "Exception msg", new Exception() ); XRLog.general( "General msg" ); XRLog.general( Level.WARNING, "General msg" ); XRLog.init( "Init msg" )... | public static void main(String args[]) { try { XRLog.cascade("Cascade msg"); XRLog.cascade(Level.WARNING, "Cascade msg"); XRLog.exception("Exception msg"); XRLog.exception("Exception msg", new Exception()); XRLog.general("General msg"); XRLog.general(Level.WARNING, "General msg"); XRLog.init("Init msg"); XRLog.init(Lev... | public static void main( String args[] ) { try { XRLog.cascade( "Cascade msg" ); XRLog.cascade( Level.WARNING, "Cascade msg" ); XRLog.exception( "Exception msg" ); XRLog.exception( "Exception msg", new Exception() ); XRLog.general( "General msg" ); XRLog.general( Level.WARNING, "Gener... |
} | public static void main( String args[] ) { try { XRLog.cascade( "Cascade msg" ); XRLog.cascade( Level.WARNING, "Cascade msg" ); XRLog.exception( "Exception msg" ); XRLog.exception( "Exception msg", new Exception() ); XRLog.general( "General msg" ); XRLog.general( Level.WARNING, "Gener... | |
cname = RemoteRef.packagePrefix + '.' + cname; | cname = "gnu.java.rmi.server." + cname; | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String cname = in.readUTF(); if (!cname.equals("")) { if (cname.equals ("UnicastRef2")) { // hack for interoperating with JDK cname = "UnicastRef"; in.read (); //some unknown UnicastRef2 field } c... |
TestWorkflow.configFile = "osworkflow-badfactory.xml"; | TestWorkflow.configFile = "/osworkflow-badfactory.xml"; | public void testFactoryException() { TestWorkflow.configFile = "osworkflow-badfactory.xml"; //we expect an InternalWorkflowException (can't throw a checked exception in constructor, otherwise the ejb provider //will break spec by having a constructor try { TestWorkflow workflow = new TestWorkflow... |
TestWorkflow.configFile = "osworkflow-jdbc.xml"; | TestWorkflow.configFile = "/osworkflow-jdbc.xml"; | public void testStoreException() throws Exception { TestWorkflow.configFile = "osworkflow-jdbc.xml"; TestWorkflow workflow = new TestWorkflow("testuser"); //correct behaviour is to get a store exception since we can't look up the DS try { workflow.initialize("file:auto1.xml", 1, new HashMap()); ... |
workflow.initialize("file:auto1.xml", 1, new HashMap()); | workflow.initialize(getClass().getClassLoader().getResource("/auto1.xml").toString(), 1, new HashMap()); | public void testStoreException() throws Exception { TestWorkflow.configFile = "osworkflow-jdbc.xml"; TestWorkflow workflow = new TestWorkflow("testuser"); //correct behaviour is to get a store exception since we can't look up the DS try { workflow.initialize("file:auto1.xml", 1, new HashMap()); ... |
if (child.isFixedDescendant()) { setFixedDescendant(true); } | public void addChild(Box child) { if (child == null) { throw new NullPointerException("trying to add null child"); } child.setParent(this); boxes.add(child); if (child.isChildrenExceedBounds()) { setChildrenExceedBounds(true); } } | |
throw new XAException(XAException.XAER_NOTA); | throw new MessagingXAException(XAException.XAER_NOTA); | public void commit(Xid xid, boolean onePhase, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("commiting xid " + xid + ", onePhase=" + onePhase); } TxState tx = removeTx(xid); if (onePhase) { //Invalid xid if (tx == null) { ... |
throw new XAException(XAException.XAER_PROTO); | throw new MessagingXAException(XAException.XAER_PROTO); | public void commit(Xid xid, boolean onePhase, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("commiting xid " + xid + ", onePhase=" + onePhase); } TxState tx = removeTx(xid); if (onePhase) { //Invalid xid if (tx == null) { ... |
throw new XAException(XAException.XA_RBROLLBACK); | log.info("Cause is" + e.getCause()); if (e.getCause() != null) { log.error("Cause", e.getCause()); } throw new MessagingXAException(XAException.XA_RBROLLBACK, e); | private void sendTransactionXA(TransactionRequest request, ConnectionDelegate connection) throws XAException { try { connection.sendTransaction(request); } catch (TransactionRolledBackException e) { log.error("An error occurred in sending transaction and the transactio... |
throw new XAException(XAException.XAER_RMERR); | throw new MessagingXAException(XAException.XAER_RMERR, t); | private void sendTransactionXA(TransactionRequest request, ConnectionDelegate connection) throws XAException { try { connection.sendTransaction(request); } catch (TransactionRolledBackException e) { log.error("An error occurred in sending transaction and the transactio... |
u.p("really starting new thread"); u.p("threaded = " + threaded); | public synchronized void startLayout(Graphics g) { if(isLayoutDone()) { u.p("really starting new thread"); u.p("threaded = " + threaded); done = false; graphics = g; if(threaded) { new Thread(this).start(); } else { ... | |
protected void startLayout(Graphics g) { | public void startLayout(Graphics g) { | protected void startLayout(Graphics g) { this.removeAll(); if ( g == null ) { return; } if ( doc == null ) { return; } Element html = (Element)doc.getDocumentElement(); //Element body = x.child( html, "body" ); //body = html; // se... |
public void doRender() { | protected void doRender() { | public void doRender() { layout.getRenderer().paint( getRenderingContext().getContext(), body_box ); } |
xoff = -rect.x + rect.width - block.width - block.right; | xoff += -rect.x + rect.width - block.width - block.right; | public static void paintAbsoluteBox(Context c, Box block, boolean restyle) { Rectangle rect = c.getExtents(); //why this? int xoff = 0; int yoff = 0; BlockFormattingContext bfc = c.getBlockFormattingContext(); xoff += bfc.getX(); yoff += bfc.getY(); xoff += ... |
xoff = block.left; | xoff += block.left; | public static void paintAbsoluteBox(Context c, Box block, boolean restyle) { Rectangle rect = c.getExtents(); //why this? int xoff = 0; int yoff = 0; BlockFormattingContext bfc = c.getBlockFormattingContext(); xoff += bfc.getX(); yoff += bfc.getY(); xoff += ... |
MessageHolder(MessageReference ref, Message msg) | private MessageHolder(Message msg) | MessageHolder(MessageReference ref, Message msg) { this.ref = ref; this.msg = msg; } |
this.ref = ref; | MessageHolder(MessageReference ref, Message msg) { this.ref = ref; this.msg = msg; } | |
this.refCount = 1; | MessageHolder(MessageReference ref, Message msg) { this.ref = ref; this.msg = msg; } | |
public MessageReference reference(Routable r) | public MessageReference reference(Message m) | public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } if (r.isReliable() && !acceptReliableMessages) { throw new IllegalStateExcepti... |
if (r.isReference()) | if (m.isReliable() && !acceptReliableMessages) | public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } if (r.isReliable() && !acceptReliableMessages) { throw new IllegalStateExcepti... |
if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; | throw new IllegalStateException(this + " does not accept reliable messages (" + m + ")"); | public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } if (r.isReliable() && !acceptReliableMessages) { throw new IllegalStateExcepti... |
if (r.isReliable() && !acceptReliableMessages) { throw new IllegalStateException(this + " does not accept reliable messages (" + r + ")"); } if (log.isTraceEnabled()) { log.trace(this + " referencing " + r); } MessageReference ref = getReference(r.getMessageID()); if (ref == null) { ref = createReference((Message)r);... | public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } if (r.isReliable() && !acceptReliableMessages) { throw new IllegalStateExcepti... | |
public void remove(MessageReference ref) throws Throwable | protected void remove(String messageId, boolean reliable) throws Exception | public void remove(MessageReference ref) throws Throwable { //Nothing is referencing the message reference any more so we can remove it // and the message from the maps if (log.isTraceEnabled()) { log.trace("removing " + ref.getMessageID() + " from memory cache"); } messages.remove(... |
if (log.isTraceEnabled()) { log.trace("removing " + ref.getMessageID() + " from memory cache"); } messages.remove(ref.getMessageID()); | messages.remove(messageId); | public void remove(MessageReference ref) throws Throwable { //Nothing is referencing the message reference any more so we can remove it // and the message from the maps if (log.isTraceEnabled()) { log.trace("removing " + ref.getMessageID() + " from memory cache"); } messages.remove(... |
if ((currentState == WorkflowEntry.CREATED) || (currentState == WorkflowEntry.SUSPENDED)) { | if (currentState == WorkflowEntry.CREATED || currentState == WorkflowEntry.SUSPENDED) { | public boolean canModifyEntryState(long id, int newState) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); int currentState = entry.getState(); boolean result = false; switch (newState) { case Workflow... |
if ((currentState == WorkflowEntry.CREATED) || (currentState == WorkflowEntry.ACTIVATED) || (currentState == WorkflowEntry.SUSPENDED)) { | if (currentState == WorkflowEntry.CREATED || currentState == WorkflowEntry.ACTIVATED || currentState == WorkflowEntry.SUSPENDED) { | public boolean canModifyEntryState(long id, int newState) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); int currentState = entry.getState(); boolean result = false; switch (newState) { case Workflow... |
if ((newState == WorkflowEntry.KILLED) || (newState == WorkflowEntry.COMPLETED)) { | if (newState == WorkflowEntry.KILLED || newState == WorkflowEntry.COMPLETED) { | public void changeEntryState(long id, int newState) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() == newState) { return; } if (canModifyEntryState(id, newState)) { if ((newSt... |
if (isCompleted == true) { | if (isCompleted) { | protected void checkImplicitFinish(long id) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName()); Collection currentSteps = store.findCurrentSteps(id);... |
log.debug("Outcome: stepId=" + nextStep + ", status=" + theResult.getStatus() + ", owner=" + theResult.getOwner() + ", actionId=" + actionId + ", currentStep=" + ((currentStep != null) ? currentStep.getStepId() : 0)); | log.debug("Outcome: stepId=" + nextStep + ", status=" + theResult.getStatus() + ", owner=" + theResult.getOwner() + ", actionId=" + actionId + ", currentStep=" + (currentStep != null ? currentStep.getStepId() : 0)); | private Step createNewCurrentStep(ResultDescriptor theResult, WorkflowEntry entry, WorkflowStore store, int actionId, Step currentStep, long[] previousIds, Map transientVars, PropertySet ps) throws WorkflowException { try { int nextStep = theResult.getStep(); if (nextStep == -1) { ... |
owner = (o != null) ? o.toString() : null; | owner = o != null ? o.toString() : null; | private Step createNewCurrentStep(ResultDescriptor theResult, WorkflowEntry entry, WorkflowStore store, int actionId, Step currentStep, long[] previousIds, Map transientVars, PropertySet ps) throws WorkflowException { try { int nextStep = theResult.getStep(); if (nextStep == -1) { ... |
if ((theResult.getDueDate() != null) && (theResult.getDueDate().length() > 0)) { | if (theResult.getDueDate() != null && theResult.getDueDate().length() > 0) { | private Step createNewCurrentStep(ResultDescriptor theResult, WorkflowEntry entry, WorkflowStore store, int actionId, Step currentStep, long[] previousIds, Map transientVars, PropertySet ps) throws WorkflowException { try { int nextStep = theResult.getStep(); if (nextStep == -1) { ... |
if ((actions == null) || (actions.size() == 0)) { | if (actions == null || actions.size() == 0) { | protected List getAvailableActionsForStep(WorkflowDescriptor wf, Step step, Map transientVars, PropertySet ps) throws WorkflowException { List l = new ArrayList(); StepDescriptor s = wf.getStep(step.getStepId()); if (s == null) { log.warn("getAvailableActionsForStep called for non-ex... |
Map transientVars = (inputs == null) ? new HashMap() : new HashMap(inputs); | Map transientVars = inputs == null ? new HashMap() : new HashMap(inputs); | protected int[] getAvailableAutoActions(long id, Map inputs) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry == null) { throw new IllegalArgumentException("No such workflow id " + id); } ... |
if ((actions == null) || (actions.size() == 0)) { | if (actions == null || actions.size() == 0) { | protected List getAvailableAutoActionsForStep(WorkflowDescriptor wf, Step step, Map transientVars, PropertySet ps) throws WorkflowException { List l = new ArrayList(); StepDescriptor s = wf.getStep(step.getStepId()); if (s == null) { log.warn("getAvailableAutoActionsForStep called fo... |
Configuration config = (configuration != null) ? configuration : DefaultConfiguration.INSTANCE; | Configuration config = configuration != null ? configuration : DefaultConfiguration.INSTANCE; | public Configuration getConfiguration() { Configuration config = (configuration != null) ? configuration : DefaultConfiguration.INSTANCE; if (!config.isInitialized()) { try { config.load(null); } catch (FactoryException e) { log.fatal("Error initiali... |
if ((stepId != null) && stepId.equals("-1")) { | if (stepId != null && stepId.equals("-1")) { | protected boolean passesCondition(ConditionDescriptor conditionDesc, Map transientVars, PropertySet ps, int currentStepId) throws WorkflowException { String type = conditionDesc.getType(); Map args = new HashMap(conditionDesc.getArgs()); for (Iterator iterator = args.entrySet().iterator(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.