buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private void processFieldRef(final DeploymentUnit deploymentUnit, final Module module, final EEModuleDescription eeModuleDescription, final WebServiceRefWrapper annotation, final FieldInfo fieldInfo) { final String fieldName = fieldInfo.name(); final String injectionType = isEmpty(annotation.type())...
private void processFieldRef(final DeploymentUnit deploymentUnit, final Module module, final EEModuleDescription eeModuleDescription, final WebServiceRefWrapper annotation, final FieldInfo fieldInfo) { final String fieldName = fieldInfo.name(); final String injectionType = isEmpty(annotation.type())...
public void contextInitialized(ServletContextEvent event) { MyService service = new MyService(); SingletonService<String> singleton = new SingletonService<String>(service, MyService.SERVICE_NAME); singleton.setElectionPolicy(new PreferredSingletonElectionPolicy(new NamePreference(PREFERRED_N...
public void contextInitialized(ServletContextEvent event) { MyService service = new MyService(); SingletonService<String> singleton = new SingletonService<String>(service, MyService.SERVICE_NAME); singleton.setElectionPolicy(new PreferredSingletonElectionPolicy(new NamePreference(PREFERRED_N...
public void activeSessions() { when(this.manager.getActiveSessions()).thenReturn(Collections.singleton("expected")); int result = this.adapter.activeSessions(); assertEquals(1, result); }
public void activeSessions() { when(this.manager.getActiveSessions()).thenReturn(Collections.singleton("expected")); int result = this.adapter.getActiveSessions().size(); assertEquals(1, result); }
public Object processInvocation(final InterceptorContext context) throws Exception { final ManagedReference reference = instanceRef.get(); final Object instance = reference.getInstance(); try { final Method method = this.method; if (withContext...
public Object processInvocation(final InterceptorContext context) throws Exception { final ManagedReference reference = instanceRef.get(); final Object instance = reference.getInstance(); try { final Method method = this.method; if (withContext...
private boolean isHibernate3(PersistenceProvider provider) { boolean result = false; // invoke org.hibernate.Version.getVersionString() try { Class targetCls = provider.getClass().getClassLoader().loadClass("org.hibernate.Version"); Method m = targetCls.getMethod("get...
private boolean isHibernate3(PersistenceProvider provider) { boolean result = false; // invoke org.hibernate.Version.getVersionString() try { Class targetCls = provider.getClass().getClassLoader().loadClass("org.hibernate.Version"); Method m = targetCls.getMethod("get...
protected String getSubsystemXml() throws IOException { //TODO: This is copied from standalone.xml you may want to try more combinations return "<subsystem xmlns=\"urn:jboss:domain:datasources:1.0\">" + " <datasources>" + " <datasource jndi-name=\"java:jbos...
protected String getSubsystemXml() throws IOException { //TODO: This is copied from standalone.xml you may want to try more combinations return "<subsystem xmlns=\"urn:jboss:domain:datasources:1.1\">" + " <datasources>" + " <datasource jndi-name=\"java:jbos...
private DeploymentOverlayDefinition() { super(DeploymentOverlayModel.DEPLOYMENT_OVERRIDE_PATH, CommonDescriptions.getResourceDescriptionResolver(ModelDescriptionConstants.DEPLOYMENT_OVERLAY), DeploymentOverlayAdd.INSTANCE, DeploymentOverlayRemove.INSTANCE); ...
private DeploymentOverlayDefinition() { super(DeploymentOverlayModel.DEPLOYMENT_OVERRIDE_PATH, CommonDescriptions.getResourceDescriptionResolver(ModelDescriptionConstants.DEPLOYMENT_OVERLAY, false), DeploymentOverlayAdd.INSTANCE, DeploymentOverlayRemove.INSTAN...
protected static final PathElement DEPLOYMENT_OVERRIDE_LINK_PATH = PathElement.pathElement(ModelDescriptionConstants.DEPLOYMENT_OVERLAY_LINK); static StandardResourceDescriptionResolver getResourceDescriptionResolver(final String keyPrefix) { return new StandardResourceDescriptionResolver(keyPrefix, RE...
protected static final PathElement DEPLOYMENT_OVERRIDE_DEPLOYMENT_PATH = PathElement.pathElement(ModelDescriptionConstants.DEPLOYMENT); static StandardResourceDescriptionResolver getResourceDescriptionResolver(final String keyPrefix) { return new StandardResourceDescriptionResolver(keyPrefix, RESOURCE_...
public interface Clusterable<T> { /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Versi...
public interface Clusterable<T> { /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Versi...
public int compare(String pattern1, String pattern2) { if (pattern1 == null && pattern2 == null) { return 0; } else if (pattern1 == null) { return 1; } else if (pattern2 == null) { return -1; } boolean pattern1EqualsPath = pattern1.equals(path); boolean pattern2EqualsPath = pattern...
public int compare(String pattern1, String pattern2) { if (pattern1 == null && pattern2 == null) { return 0; } else if (pattern1 == null) { return 1; } else if (pattern2 == null) { return -1; } boolean pattern1EqualsPath = pattern1.equals(path); boolean pattern2EqualsPath = pattern...
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { ModelNode node = context.getModelNode(); if(node.has(CommonAttributes.JMX_CONNECTOR)) { context.startSubsystemElement(Namespace.CURRENT.getUriString(...
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { ModelNode node = context.getModelNode(); if(node.has(CommonAttributes.SERVER_BINDING)) { context.startSubsystemElement(Namespace.CURRENT.getUriString...
private void doTestAnnotationInfo(AnnotationMetadata metadata) { assertEquals(AnnotatedComponent.class.getName(), metadata.getClassName()); assertFalse(metadata.isInterface()); assertFalse(metadata.isAbstract()); assertTrue(metadata.isConcrete()); assertTrue(metadata.hasSuperClass()); assertEquals(Object.c...
private void doTestAnnotationInfo(AnnotationMetadata metadata) { assertEquals(AnnotatedComponent.class.getName(), metadata.getClassName()); assertFalse(metadata.isInterface()); assertFalse(metadata.isAbstract()); assertTrue(metadata.isConcrete()); assertTrue(metadata.hasSuperClass()); assertEquals(Object.c...
public enum AllowedSolutions { /** There are no additional side restriction on the solutions for * root-finding. That is, both under-approximations and over-approximations * are allowed. So, if a function f(x) has a root at x = x0, then the * root-finding result s may be smaller than x0, equal to x0,...
public enum AllowedSolution { /** There are no additional side restriction on the solutions for * root-finding. That is, both under-approximations and over-approximations * are allowed. So, if a function f(x) has a root at x = x0, then the * root-finding result s may be smaller than x0, equal to x0, ...
public void execute(Tuple tuple) { if (TupleHelpers.isTickTuple(tuple)) { LOG.info("Received tick tuple, triggering emit of current window counts"); emitCurrentWindowCounts(); } else { countObjAndAck(tuple); } }
public void execute(Tuple tuple) { if (TupleHelpers.isTickTuple(tuple)) { LOG.debug("Received tick tuple, triggering emit of current window counts"); emitCurrentWindowCounts(); } else { countObjAndAck(tuple); } }
private void routetoMasterDomainController(OperationContext context, ModelNode operation) { // Per discussion on 2011/03/07, routing requests from a slave to the // master may overly complicate the security infrastructure. Therefore, // the ability to do this is being disabled until it's cle...
private void routetoMasterDomainController(OperationContext context, ModelNode operation) { // Per discussion on 2011/03/07, routing requests from a slave to the // master may overly complicate the security infrastructure. Therefore, // the ability to do this is being disabled until it's cle...
public ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException { final ModelNode composite = new ModelNode(); composite.get(Util.OPERATION).set(Util.COMPOSITE); composite.get(Util.ADDRESS).setEmptyList(); final ModelNode steps = composite.get(Util.STEP...
public ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException { final ModelNode composite = new ModelNode(); composite.get(Util.OPERATION).set(Util.COMPOSITE); composite.get(Util.ADDRESS).setEmptyList(); final ModelNode steps = composite.get(Util.STEP...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils("ds-mbean.sar", Test.class.getPackage(), true); utils.deploy(); ObjectName objectName = new ObjectName("jboss:name=test,type=ds"); ...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils("ds-mbean.sar", true, Test.class.getPackage()); utils.deploy(); ObjectName objectName = new ObjectName("jboss:name=test,type=ds"); ...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("jaxrs-example.war", HelloWorldResource.class.getPackage(), true); utils.deploy(); performCall(); } finally{ ...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("jaxrs-example.war", true, HelloWorldResource.class.getPackage()); utils.deploy(); performCall(); } finally{ ...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("war-example.war", SimpleServlet.class.getPackage(), true); utils.deploy(); performCall("simple"); performCall(...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("war-example.war", true, SimpleServlet.class.getPackage()); utils.deploy(); performCall("simple"); performCall(...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999); try { utils = new DeploymentUtils(); utils.addWarDeployment("wa...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999); try { utils = new DeploymentUtils(); utils.addWarDeployment("wa...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("ws-example.war", EndpointImpl.class.getPackage(), true); utils.deploy(); testWSDL(); testSO...
public static void main(String[] args) throws Exception { DeploymentUtils utils = null; try { utils = new DeploymentUtils(); utils.addWarDeployment("ws-example.war", true, EndpointImpl.class.getPackage()); utils.deploy(); testWSDL(); testSO...
private void bindFactoryToJndi(LazyValidatorFactory factory, DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext,EEModuleDescription moduleDescription) { if(moduleDescription == null) { return; } final ServiceTarget serviceTarget = phaseContext.getServiceTarget()...
private void bindFactoryToJndi(LazyValidatorFactory factory, DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext,EEModuleDescription moduleDescription) { if(moduleDescription == null) { return; } final ServiceTarget serviceTarget = phaseContext.getServiceTarget()...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); if(module...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); if(module...
private volatile HashMap<Integer, Integer> taskToQueueId = null; int roundRobinQueueId; boolean closing = false; List<TaskMessage> closeMessage = Arrays.asList(new TaskMessage(-1, null)); @SuppressWarnings("rawtypes") Server(Map storm_conf, int port) { this.storm_conf = storm...
private volatile HashMap<Integer, Integer> taskToQueueId = null; int roundRobinQueueId; boolean closing = false; List<TaskMessage> closeMessage = Arrays.asList(new TaskMessage(-1, null)); @SuppressWarnings("rawtypes") Server(Map storm_conf, int port) { this.storm_conf = storm...
public List<T> multiGet(List<List<Object>> keys) { List<T> ret = new ArrayList(); for(List<Object> key: keys) { ret.add(db.get(key)); }
public List<T> multiGet(List<List<Object>> keys) { List<T> ret = new ArrayList<T>(); for(List<Object> key: keys) { ret.add(db.get(key)); }
private RunningProcess getProcessById(List<RunningProcess> runningProcesses, String id){ for (RunningProcess proc : runningProcesses){ if (proc.getProcessId().equals(id)){ return proc; } } return null; } } p...
private RunningProcess getProcessById(List<RunningProcess> runningProcesses, String id){ for (RunningProcess proc : runningProcesses){ if (proc.getProcessId().equals(id)){ return proc; } } return null; } } p...
public void testIterationConsistency() { final MultidimensionalCounter c = new MultidimensionalCounter(2, 3, 4); final int[][] expected = new int[][] { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 2 }, { 0, 0, 3 }, { 0, 1, 0 }, { 0, 1, 1 }...
public void testIterationConsistency() { final MultidimensionalCounter c = new MultidimensionalCounter(2, 3, 4); final int[][] expected = new int[][] { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 2 }, { 0, 0, 3 }, { 0, 1, 0 }, { 0, 1, 1 }...
public void testAccessor() { final Pair<Integer, Double> p = new Pair<Integer, Double>(new Integer(1), new Double(2)); Assert.assertEquals(new Integer(1), p.getKey()); Assert.assertEquals(new Double(2), p.getValue(), Math.ulp(1d)); }
public void testAccessor() { final Pair<Integer, Double> p = new Pair<Integer, Double>(new Integer(1), new Double(2)); Assert.assertEquals(new Integer(1), p.getKey()); Assert.assertEquals(2, p.getValue().doubleValue(), Math.ulp(1d)); }
private static final PathElement FILE_STORE_PATH = PathElement.pathElement(ModelKeys.FILE_STORE, ModelKeys.FILE_STORE_NAME); // attributes static final SimpleAttributeDefinition PATH = new SimpleAttributeDefinitionBuilder(ModelKeys.PATH, ModelType.STRING, true) .setXmlName(A...
private static final PathElement FILE_STORE_PATH = PathElement.pathElement(ModelKeys.FILE_STORE, ModelKeys.FILE_STORE_NAME); // attributes static final SimpleAttributeDefinition PATH = new SimpleAttributeDefinitionBuilder(ModelKeys.PATH, ModelType.STRING, true) .setXmlName(A...
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EnterpriseBeanMetaData beanMetaData ...
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final EnterpriseBeanMetaData beanMetaData ...
public void testHelloWorldLowerCaseHex() { byte[] b = StringUtils.getBytesUtf8("Hello World"); final String expected = "48656c6c6f20576f726c64"; char[] actual; actual = Hex.encodeHex(b); assertEquals(expected, new String(actual)); actual = Hex.encodeHex(b, true); ...
public void testHelloWorldLowerCaseHex() { byte[] b = StringUtils.getBytesUtf8("Hello World"); final String expected = "48656c6c6f20576f726c64"; char[] actual; actual = Hex.encodeHex(b); assertEquals(expected, new String(actual)); actual = Hex.encodeHex(b, true); ...
public void testSingleCharEncoding() { for (int i = 0; i < 20; i++) { Base32 codec = new Base32(); byte unencoded[] = new byte[i]; byte allInOne[] = codec.encode(unencoded); codec = new Base32(); for (int j=0; j< unencoded.length; j++) { ...
public void testSingleCharEncoding() { for (int i = 0; i < 20; i++) { Base32 codec = new Base32(); byte unencoded[] = new byte[i]; byte allInOne[] = codec.encode(unencoded); codec = new Base32(); for (int j=0; j< unencoded.length; j++) { ...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttributeDefinition(DATASOURCE_DRIVER_NAME, DataSour...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttributeDefinition(DATASOURCE_DRIVER_NAME, DataSour...
private boolean has(ModelNode node, String name) { return node.has(name) && node.get(name) != null; }
private boolean has(ModelNode node, String name) { return node.has(name) && node.get(name).isDefined(); }
public static Iterator<int[]> combinationsIterator(int n, int k) { return new Combinations(n, k, Combinations.IterationOrder.LEXICOGRAPHIC).iterator(); }
public static Iterator<int[]> combinationsIterator(int n, int k) { return new Combinations(n, k).iterator(); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { nameValidator.validate(operation); final String attributeName = operation.require(NAME).asString(); final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { nameValidator.validate(operation); final String attributeName = operation.require(NAME).asString(); final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String parameterName = operation.require(NAME).asString(); final ModelNode submodel = context.readModel(PathAddress.EMPTY_ADDRESS); final ModelNode currentValue = submo...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String parameterName = operation.require(NAME).asString(); final ModelNode submodel = context.readModel(PathAddress.EMPTY_ADDRESS); final ModelNode currentValue = submo...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { executeRuntimeStep(context, operation); } }, OperationContext.Stage.RUNTIME); context.completeStep(); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { executeRuntimeStep(context, operation); } }, OperationContext.Stage.RUNTIME); context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { String op = operation.require(OP).asString(); if (READ_ATTRIBUTE_OPERATION.equals(op)) { readAttributeValidator.validate(operation); executeReadAttribute(context, operation); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { String op = operation.require(OP).asString(); if (READ_ATTRIBUTE_OPERATION.equals(op)) { readAttributeValidator.validate(operation); executeReadAttribute(context, operation); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.COMPILATION_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); tr...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.COMPILATION_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); tr...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String memPoolName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue(); MemoryPoolMXBean memoryPoolMXBean = MemoryPoolMXBeanAttributeHa...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String memPoolName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue(); MemoryPoolMXBean memoryPoolMXBean = MemoryPoolMXBeanAttributeHa...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.OPERATING_SYSTEM_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.OPERATING_SYSTEM_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.RUNTIME_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); try { ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.RUNTIME_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); try { ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.THREADING_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); try ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = context.getResult(); for (String attribute : PlatformMBeanConstants.THREADING_READ_ATTRIBUTES) { final ModelNode store = result.get(attribute); try ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); ServiceController<?> serviceController = getService(c...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { validator.validate(operation); final String attributeName = operation.require(ModelDescriptionConstants.NAME).asString(); ServiceController<?> serviceController = getService(c...
public void testEvents() throws MathUserException, IntegratorException { TestProblem4 pb = new TestProblem4(); double minStep = 0; double maxStep = pb.getFinalTime() - pb.getInitialTime(); double scalAbsoluteTolerance = 1.0e-9; double scalRelativeTolerance = 0.01 * scalAbsoluteTolerance; ...
public void testEvents() throws MathUserException, IntegratorException { TestProblem4 pb = new TestProblem4(); double minStep = 0; double maxStep = pb.getFinalTime() - pb.getInitialTime(); double scalAbsoluteTolerance = 1.0e-9; double scalRelativeTolerance = 0.01 * scalAbsoluteTolerance; ...
package org.jboss.as.testsuite.integration.ejb.timerservice.serialization; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Th...
package org.jboss.as.testsuite.integration.ejb.timerservice.serialization; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Th...
package org.jboss.as.testsuite.integration.ejb.timerservice.view; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is fre...
package org.jboss.as.testsuite.integration.ejb.timerservice.view; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is fre...
public void doFilter(HttpExchange exchange, Chain chain) throws IOException { if (domainCBH.isReady()) { chain.doFilter(exchange); } else { Headers responseHeaders = exchange.getResponseHeaders(); responseHeaders.add(LOCATION, redirectTo + "/"); exchan...
public void doFilter(HttpExchange exchange, Chain chain) throws IOException { if (domainCBH.isReady()) { chain.doFilter(exchange); } else { Headers responseHeaders = exchange.getResponseHeaders(); responseHeaders.add(LOCATION, redirectTo); exchange.sen...
protected void boot(final BootContext context) throws ConfigurationPersistenceException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { super.boot(hostControllerConfigurationPersister.load()); // This parses the host.xml and invokes all ops final Run...
protected void boot(final BootContext context) throws ConfigurationPersistenceException { final ServiceTarget serviceTarget = context.getServiceTarget(); try { super.boot(hostControllerConfigurationPersister.load()); // This parses the host.xml and invokes all ops final Run...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { HttpManagementAddHandler.populateHostControllerInfo(hostControllerInfo, context, model); HttpManagementAddHandler.installHttpManagementServices(context.getServiceTarget(),...
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { HttpManagementAddHandler.populateHostControllerInfo(hostControllerInfo, context, model); HttpManagementAddHandler.installHttpManagementServices(context.getRunningMode(), c...
protected void revertUpdateToRuntime(final OperationContext context, final ModelNode operation, final String attributeName, final ModelNode valueToRestore, final ModelNode valueToRevert, final Void handback) throws OperationFailedExce...
protected void revertUpdateToRuntime(final OperationContext context, final ModelNode operation, final String attributeName, final ModelNode valueToRestore, final ModelNode valueToRevert, final Void handback) throws OperationFailedExce...
Class<? extends MethodInterceptor> interceptor(); /* * Copyright 2002-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
Class<? extends MethodInterceptor> interceptor(); /* * Copyright 2002-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
public void putArchiveEntry(ArchiveEntry entry) throws IOException { if(finished) { throw new IOException("Stream has already been finished"); } CpioArchiveEntry e = (CpioArchiveEntry) entry; ensureOpen(); if (this.entry != null) { closeArchiv...
public void putArchiveEntry(ArchiveEntry entry) throws IOException { if(finished) { throw new IOException("Stream has already been finished"); } CpioArchiveEntry e = (CpioArchiveEntry) entry; ensureOpen(); if (this.entry != null) { closeArchiv...
public javax.naming.spi.InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException { final String factoryClassName = (String)environment.get(Context.INITIAL_CONTEXT_FACTORY); if(factoryClassName == null || InitialContextFactory.class.getName().equals(factor...
public javax.naming.spi.InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException { final String factoryClassName = (String)environment.get(Context.INITIAL_CONTEXT_FACTORY); if(factoryClassName == null || InitialContextFactory.class.getName().equals(factor...
public ProtocolDescription getDefaultProtocol() { return new ProtocolDescription("Servlet 3.0"); }
public ProtocolDescription getDefaultProtocol() { return new ProtocolDescription("jmx-as7"); }
public static boolean isExecute(ModelControllerClient client, String[] parent, OperationRequestAddress address, String operation) { final ModelNode accessControl = getAccessControl(client, parent, address, true); if(accessControl == null) { return false; } if(!accessCont...
public static boolean isExecute(ModelControllerClient client, String[] parent, OperationRequestAddress address, String operation) { final ModelNode accessControl = getAccessControl(client, parent, address, true); if(accessControl == null) { return false; } if(!accessCont...
import org.wildfly.security.manager.AddShutdownHookAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, 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 fre...
import org.wildfly.security.manager.AddShutdownHookAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, 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 fre...
public void handleRequest(final HttpServerExchange exchange) throws Exception { final SecurityContext securityContext = exchange.getSecurityContext(); final Subject useSubject; if (securityContext != null) { final Account account = securityContext.getAuthenticatedAccount(); ...
public void handleRequest(final HttpServerExchange exchange) throws Exception { final SecurityContext securityContext = exchange.getAttachment(SecurityContext.ATTACHMENT_KEY); final Subject useSubject; if (securityContext != null) { final Account account = securityContext.getAuth...
public static final OptionMap CONNECTION_OPTIONS = OptionMap.create(RemotingOptions.HEARTBEAT_INTERVAL, heartbeatInterval, Options.READ_TIMEOUT, 45000); static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, ...
public static final OptionMap CONNECTION_OPTIONS = OptionMap.create(RemotingOptions.HEARTBEAT_INTERVAL, heartbeatInterval, Options.READ_TIMEOUT, 45000); static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, ...
import org.wildfly.security.manager.CreateThreadAction; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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 s...
import org.wildfly.security.manager.CreateThreadAction; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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 s...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingManagementEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "localhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "localhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS.append("s...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingManagementEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "loaclhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "loaclhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS.append("s...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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...
public void activate(final ServiceActivatorContext serviceActivatorContext) throws ServiceRegistryException { final ServiceTarget serviceTarget = serviceActivatorContext.getServiceTarget(); final ServiceName endpointName = managementSubsystemEndpoint ? RemotingServices.SUBSYSTEM_ENDPOINT : Managemen...
public void activate(final ServiceActivatorContext serviceActivatorContext) throws ServiceRegistryException { final ServiceTarget serviceTarget = serviceActivatorContext.getServiceTarget(); final ServiceName endpointName = managementSubsystemEndpoint ? RemotingServices.SUBSYSTEM_ENDPOINT : Managemen...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
import org.wildfly.security.manager.GetClassLoaderAction; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 f...
private static final OptionMap OPTIONS = OptionMap.create(RemotingOptions.RECEIVE_WINDOW_SIZE, WINDOW_SIZE); static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, final String hostName, ...
private static final OptionMap OPTIONS = OptionMap.create(RemotingOptions.RECEIVE_WINDOW_SIZE, WINDOW_SIZE); static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, final String hostName, ...
public static boolean isPostConstructCalled() { return postConstructCalled; } }
public boolean isPostConstructCalled() { return postConstructCalled; } }
public void removeSystemProperties() { final ModelNode removeDestinationOp = new ModelNode(); removeDestinationOp.get(ClientConstants.OP).set("remove"); removeDestinationOp.get(ClientConstants.OP_ADDR).add("system-property", "destination"); final ModelNode removeResourceAdapterOp = n...
public void removeSystemProperties() { final ModelNode removeDestinationOp = new ModelNode(); removeDestinationOp.get(ClientConstants.OP).set("remove"); removeDestinationOp.get(ClientConstants.OP_ADDR).add("system-property", "destination"); final ModelNode removeResourceAdapterOp = n...
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException { // no attributes if (reader.getAttributeCount() > 0) { throw unexpectedAttribute(reader, 0); } final ModelNode address = new ModelNode(); address.add(ModelDe...
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException { // no attributes if (reader.getAttributeCount() > 0) { throw unexpectedAttribute(reader, 0); } final ModelNode address = new ModelNode(); address.add(ModelDe...
public void persistSessions(String deploymentName, Map<String, PersistentSession> sessionData) { try { final Marshaller marshaller = createMarshaller(); try { final Map<String, SessionEntry> serializedData = new HashMap<String, SessionEntry>(); for (Ma...
public void persistSessions(String deploymentName, Map<String, PersistentSession> sessionData) { try { final Marshaller marshaller = createMarshaller(); try { final Map<String, SessionEntry> serializedData = new HashMap<String, SessionEntry>(); for (Ma...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit); final ServiceTarget serviceTarget = phaseConte...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit); final ServiceTarget serviceTarget = phaseConte...
public void registerEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory) { Assert.notNull(endpoint, "Endpoint must be set"); Assert.notNull(endpoint.getId(), "Endpoint id must be set"); // Factory may be null, we defer the resolution right before actually creating the container this.e...
public void registerEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory) { Assert.notNull(endpoint, "Endpoint must be set"); Assert.hasText(endpoint.getId(), "Endpoint id must be set"); // Factory may be null, we defer the resolution right before actually creating the container this.e...
private URL getPersistenceUnitURL(VirtualFile persistence_xml, boolean convertVFS) { try { VirtualFile metaData = persistence_xml;// di.getMetaDataFile("persistence.xml"); return convertVFS ? metaData.getParent().getParent().getPhysicalFile().toURI().toURL() : ...
private URL getPersistenceUnitURL(VirtualFile persistence_xml, boolean convertVFS) { try { VirtualFile metaData = persistence_xml;// di.getMetaDataFile("persistence.xml"); return convertVFS ? metaData.getPhysicalFile().getParentFile().getParentFile().toURI().toURL...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentReflectionIndex index = deploymentUnit.getAttachment(Attachments.REFLECTION_INDEX); final EEApplica...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentReflectionIndex index = deploymentUnit.getAttachment(Attachments.REFLECTION_INDEX); final EEApplica...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); ...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); ...
protected void processInterceptors(SessionBeanMetaData enterpriseBean, EJBComponentDescription ejbComponentDescription, final EEApplicationClasses applicationClassesDescription) { //for interceptor methods that specify a null class we cannot deal with them here //instead we stick them on the compon...
protected void processInterceptors(SessionBeanMetaData enterpriseBean, EJBComponentDescription ejbComponentDescription, final EEApplicationClasses applicationClassesDescription) { //for interceptor methods that specify a null class we cannot deal with them here //instead we stick them on the compon...
Future<DeploymentPlanResult> execute(DeploymentPlan plan) throws InvalidDeploymentPlanException; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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 indi...
Future<DeploymentPlanResult> execute(DeploymentPlan plan) throws InvalidDeploymentPlanException; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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 indi...
public void testDeployedService() throws Exception { MBeanServerConnection mbeanServer = getMBeanServer(); ObjectName objectName = new ObjectName("jboss:name=test,type=config"); //FIXME should have some notification happening when the deployment has been installed for client waitFor...
public void testDeployedService() throws Exception { MBeanServerConnection mbeanServer = getMBeanServer(); ObjectName objectName = new ObjectName("jboss:name=test,type=config"); //FIXME should have some notification happening when the deployment has been installed for client waitFor...
private DomainController startRemoteSlaveDomainController(MasterDomainControllerClient masterClient) throws StartException { // By having a remote repo as a secondary content will be synced only if needed FallbackRepository fileRepository = new FallbackRepository(localFileRepository, masterClient.ge...
private DomainController startRemoteSlaveDomainController(MasterDomainControllerClient masterClient) throws StartException { // By having a remote repo as a secondary content will be synced only if needed FallbackRepository fileRepository = new FallbackRepository(localFileRepository, masterClient.ge...
public void run() { try { serverInventory.stopServers(-1, true); // TODO graceful shutdown // TODO async serverInventory = null; // client.getValue().setServerInventory(null); } finally { ...
public void run() { try { serverInventory.shutdown(-1, true); // TODO graceful shutdown // TODO async serverInventory = null; // client.getValue().setServerInventory(null); } finally { ...
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isPrimitive() ? primitiveTypeToWrapperMap.get(clazz) : clazz); }
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isPrimitive() && clazz != void.class? primitiveTypeToWrapperMap.get(clazz) : clazz); }
public void getResourceValue(final ResolutionContext resolutionContext, final ServiceBuilder<?> serviceBuilder, final DeploymentPhaseContext phaseContext, final Injector<ManagedReferenceFactory> injector) { final String applicationName = resolutionContext.getApplicationName(); final String moduleNam...
public void getResourceValue(final ResolutionContext resolutionContext, final ServiceBuilder<?> serviceBuilder, final DeploymentPhaseContext phaseContext, final Injector<ManagedReferenceFactory> injector) { final String applicationName = resolutionContext.getApplicationName(); final String moduleNam...
private Object clone(final Class<?> target, final ObjectCloner cloner, final Object object, final boolean allowPassByReference) { if (object == null) { return null; } if (allowPassByReference && target.isAssignableFrom(object.getClass())) { return object; } ...
private Object clone(final Class<?> target, final ObjectCloner cloner, final Object object, final boolean allowPassByReference) { if (object == null) { return null; } if (allowPassByReference && (target.isPrimitive() || target.isAssignableFrom(object.getClass()))) { ...
public Object getValue() { return new Boolean(this.value); }
public Object getValue() { return Boolean.valueOf(this.value); }
protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model) { context.removeService(LogServices.ROOT_LOGGER) if (model.get(CommonAttributes.ROOT_LOGGER).has(CommonAttributes.HANDLERS)) { LogServices.uninstallLoggerHandlers(context, "", model.get(Commo...
protected void performRuntime(NewOperationContext context, ModelNode operation, ModelNode model) { context.removeService(LogServices.ROOT_LOGGER); if (model.get(CommonAttributes.ROOT_LOGGER).has(CommonAttributes.HANDLERS)) { LogServices.uninstallLoggerHandlers(context, "", model.get(Comm...
public void execute(NewOperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); final String name = address.getLastElement().getValue(); fi...
public void execute(NewOperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); final String name = address.getLastElement().getValue(); fi...
private void parseEviction(XMLExtendedStreamReader reader, ModelNode cache, List<ModelNode> operations) throws XMLStreamException { // ModelNode for the eviction add operation ModelNode evictionAddress = cache.get(ModelDescriptionConstants.OP_ADDR).clone(); evictionAddress.add(ModelKeys.EVIC...
private void parseEviction(XMLExtendedStreamReader reader, ModelNode cache, List<ModelNode> operations) throws XMLStreamException { // ModelNode for the eviction add operation ModelNode evictionAddress = cache.get(ModelDescriptionConstants.OP_ADDR).clone(); evictionAddress.add(ModelKeys.EVIC...
private void launchCommunicationHandler() { this.serverCommunicationHandler = ServerCommunicationHandlerFactory.getInstance().getServerCommunicationHandler(environment, messageHandler); Thread t = new Thread(this.serverCommunicationHandler.getController(), "Server Process"); t.start(); }...
private void launchCommunicationHandler() { this.serverCommunicationHandler = ServerCommunicationHandlerFactory.getInstance().getProcessManagerSlave(environment, messageHandler); Thread t = new Thread(this.serverCommunicationHandler.getController(), "Server Process"); t.start(); }
public static void main(String[] args) throws Exception { LinearDRPCTopologyBuilder builder = new LinearDRPCTopologyBuilder("exclamation"); builder.addBolt(new ExclaimBolt(), 3); Config conf = new Config(); if (args == null || args.length == 0) { LocalDRPC drpc = new LocalDRPC(); LocalCl...
public static void main(String[] args) throws Exception { LinearDRPCTopologyBuilder builder = new LinearDRPCTopologyBuilder("exclamation"); builder.addBolt(new ExclaimBolt(), 3); Config conf = new Config(); if (args == null || args.length == 0) { LocalDRPC drpc = new LocalDRPC(); LocalCl...
public static void main(String[] args) throws Exception { TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("word", new TestWordSpout(), 10); builder.setBolt("exclaim1", new ExclamationBolt(), 3).shuffleGrouping("word"); builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGro...
public static void main(String[] args) throws Exception { TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("word", new TestWordSpout(), 10); builder.setBolt("exclaim1", new ExclamationBolt(), 3).shuffleGrouping("word"); builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGro...
public static void main(String[] args) throws Exception { LinearDRPCTopologyBuilder builder = construct(); Config conf = new Config(); if (args == null || args.length == 0) { conf.setMaxTaskParallelism(3); LocalDRPC drpc = new LocalDRPC(); LocalCluster cluster = new LocalCluster(); ...
public static void main(String[] args) throws Exception { LinearDRPCTopologyBuilder builder = construct(); Config conf = new Config(); if (args == null || args.length == 0) { conf.setMaxTaskParallelism(3); LocalDRPC drpc = new LocalDRPC(); LocalCluster cluster = new LocalCluster(); ...
public static void main(String[] args) throws Exception { TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("spout", new RandomSentenceSpout(), 5); builder.setBolt("split", new SplitSentence(), 8).shuffleGrouping("spout"); builder.setBolt("count", new WordCount(), 12).fieldsGrouping...
public static void main(String[] args) throws Exception { TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("spout", new RandomSentenceSpout(), 5); builder.setBolt("split", new SplitSentence(), 8).shuffleGrouping("spout"); builder.setBolt("count", new WordCount(), 12).fieldsGrouping...
public static void main(String[] args) throws Exception { Config conf = new Config(); conf.setMaxSpoutPending(20); if (args.length == 0) { LocalDRPC drpc = new LocalDRPC(); LocalCluster cluster = new LocalCluster(); cluster.submitTopology("wordCounter", conf, buildTopology(drpc)); ...
public static void main(String[] args) throws Exception { Config conf = new Config(); conf.setMaxSpoutPending(20); if (args.length == 0) { LocalDRPC drpc = new LocalDRPC(); LocalCluster cluster = new LocalCluster(); cluster.submitTopology("wordCounter", conf, buildTopology(drpc)); ...
protected void realCheckPermission(MethodType methodType, InvocationType invocationType) { checkTransactionSync(methodType); if (invocationType != null) { if (denied.contains(new DeniedMethodKey(invocationType, methodType))) { throwException(methodType, invocationType); ...
protected void realCheckPermission(MethodType methodType, InvocationType invocationType) { checkTransactionSync(methodType); if (invocationType != null) { if (denied.contains(new DeniedMethodKey(invocationType, methodType))) { throwException(methodType, invocationType); ...
private void validateBalancing(Stateless bean, int numCalls, int expectedServers, double minPercentage) { List<String> results = new ArrayList<String>(numCalls); for (int i = 0; i < numCalls; i++) { results.add(bean.getNodeName()); } Set<String> entries = new HashSet<Str...
private void validateBalancing(Stateless bean, int numCalls, int expectedServers, double minPercentage) { List<String> results = new ArrayList<String>(numCalls); for (int i = 0; i < numCalls; i++) { results.add(bean.getNodeName()); } Set<String> entries = new HashSet<Str...
public void testGracefulSimpleFailover( @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_1) URL baseURL1, @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_2) URL baseURL2) throws IOException, InterruptedException, URISyntaxException { DefaultHttpClient client =...
public void testGracefulSimpleFailover( @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_1) URL baseURL1, @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_2) URL baseURL2) throws IOException, InterruptedException, URISyntaxException { DefaultHttpClient client =...
private static Archive<?> createDeployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); // Take web.xml from the managed test. war.setWebXML(ClusteredWebSimpleTestCase.class.getPackage(), "web.xml"); war.add...
private static Archive<?> createDeployment() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); // Take web.xml from the managed test. war.setWebXML(ClusteredWebSimpleTestCase.class.getPackage(), "web.xml"); war.add...