[svn r385] updates
This commit is contained in:
parent
2ed987361c
commit
c540c7e531
|
@ -4,5 +4,6 @@
|
|||
- (80% DONE) make J2EE compaitle
|
||||
- Add annotations for ports
|
||||
- Make asysc piping faster
|
||||
- Auto immiate useage on bench of time of functions against piping
|
||||
- Start implementing JMS interfaces
|
||||
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2004-2006 IDCA. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
* following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||
* the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
* and the following disclaimer in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the authors and
|
||||
* should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
*/
|
||||
|
||||
package com.idcanet.foei.core;
|
||||
|
||||
/**
|
||||
* Binding exception
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jan 24, 2006
|
||||
*/
|
||||
public class FoeiBindingException extends Exception {
|
||||
|
||||
/** v1.0 */
|
||||
static final long serialVersionUID = 10l;
|
||||
|
||||
/**
|
||||
* Constructs an FoeiContextBuildingException without a detail message.
|
||||
*/
|
||||
public FoeiBindingException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an FoeiContextBuildingException with a detail message.
|
||||
* @param message The message of this Exception
|
||||
*/
|
||||
public FoeiBindingException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an FoeiContextBuildingException from a parent exception and a message
|
||||
* @param e The parent exception.
|
||||
* @param message An detail message.
|
||||
*/
|
||||
public FoeiBindingException(String message,Exception e) {
|
||||
super(message,e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an FoeiContextBuildingException from a parent exception.
|
||||
* @param e The parant exception
|
||||
*/
|
||||
public FoeiBindingException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
}
|
|
@ -32,8 +32,8 @@ package com.idcanet.foei.core;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Jan 24, 2006
|
||||
*/
|
||||
public class FoeiContextBuildingException extends Exception
|
||||
{
|
||||
public class FoeiContextBuildingException extends Exception {
|
||||
|
||||
/** v1.0 */
|
||||
static final long serialVersionUID = 10l;
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@ public interface ObjectContextManager {
|
|||
* Adds an EventObject to the Context
|
||||
* @param eventObject
|
||||
*/
|
||||
public void addEventObject(Object eventObject,String id);
|
||||
public void addEventObject(Object eventObject,String id) throws FoeiBindingException;
|
||||
|
||||
/**
|
||||
* removes an EventObject from the Context
|
||||
* @param eventObject
|
||||
*/
|
||||
public void removeEventObject(String id);
|
||||
public void removeEventObject(String id) throws FoeiBindingException;
|
||||
|
||||
/**
|
||||
* Gets an EventObject by its id.
|
||||
|
|
|
@ -114,7 +114,6 @@ public class EventExecutorImpl implements EventExecutor {
|
|||
ready = true;
|
||||
FoeiProcessFactory.unbindFoeiProcess();
|
||||
foeiProcess.getExecutors().remove(this);
|
||||
logger.info(Thread.currentThread().getName()+"--"+this.toString()+" executed: "+processed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
package com.idcanet.foei.core.impl;
|
||||
|
||||
import com.idcanet.foei.core.EventExecutor;
|
||||
import com.idcanet.foei.core.FoeiBindingException;
|
||||
import com.idcanet.foei.core.FoeiContext;
|
||||
import com.idcanet.foei.core.FoeiPortMessage;
|
||||
import com.idcanet.foei.core.FoeiProcess;
|
||||
|
@ -138,13 +139,13 @@ public class FoeiProcessImpl implements FoeiProcess {
|
|||
/**
|
||||
* @see com.idcanet.foei.core.ObjectContextManager#addEventObject(com.idcanet.foei.event.EventObject)
|
||||
*/
|
||||
public void addEventObject(Object eventObject,String id) {
|
||||
public void addEventObject(Object eventObject,String id) throws FoeiBindingException {
|
||||
try {
|
||||
getEventObjectContext().bind(id,eventObject);
|
||||
} catch (NameAlreadyBoundException nabe) {
|
||||
logger.log(Level.WARNING,"NameAlreadyBoundException: "+nabe.getMessage(),nabe);
|
||||
throw new FoeiBindingException(nabe);
|
||||
} catch (NamingException ne) {
|
||||
logger.log(Level.WARNING,"NamingException: "+ne.getMessage(),ne);
|
||||
throw new FoeiBindingException(ne);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,21 +156,20 @@ public class FoeiProcessImpl implements FoeiProcess {
|
|||
try {
|
||||
return getEventObjectContext().lookup(id);
|
||||
} catch (NamingException ne) {
|
||||
logger.log(Level.WARNING,"NamingException: "+ne.getMessage(),ne);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idcanet.foei.core.ObjectContextManager#removeEventObject(com.idcanet.foei.event.EventObject)
|
||||
*/
|
||||
public void removeEventObject(String id) {
|
||||
public void removeEventObject(String id) throws FoeiBindingException {
|
||||
try {
|
||||
getEventObjectContext().unbind(id);
|
||||
} catch (NameNotFoundException nnfe) {
|
||||
logger.log(Level.WARNING,"NamingNotFoundException: "+nnfe.getMessage(),nnfe);
|
||||
throw new FoeiBindingException(nnfe);
|
||||
} catch (NamingException ne) {
|
||||
logger.log(Level.WARNING,"NamingException: "+ne.getMessage(),ne);
|
||||
throw new FoeiBindingException(ne);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,15 +29,7 @@ package com.idcanet.foei.core.impl;
|
|||
import com.idcanet.foei.core.FoeiProcess;
|
||||
import com.idcanet.foei.core.FoeiProcessFactory;
|
||||
import com.idcanet.foei.core.X2OExecutor;
|
||||
import com.idcanet.x4o.core.AbstractX4OPhaseHandler;
|
||||
import com.idcanet.x4o.core.X4OParser;
|
||||
import com.idcanet.x4o.core.X4OPhaseException;
|
||||
import com.idcanet.x4o.core.X4OPhaseHandler;
|
||||
import com.idcanet.x4o.core.X4OPhaseHandlerFactory;
|
||||
import com.idcanet.x4o.core.X4OPhase;
|
||||
import com.idcanet.x4o.eld.EldX4OElementConfigurator;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementContext;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.logging.Level;
|
||||
|
@ -55,7 +47,7 @@ public class X2OExecutorImpl implements X2OExecutor {
|
|||
private String parseFileName = null;
|
||||
private InputStream parseInputStream = null;
|
||||
private String parseXml = null;
|
||||
private boolean ready = false;
|
||||
volatile private boolean ready = false;
|
||||
private Logger logger = null;
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
package com.idcanet.foei.core.x4o;
|
||||
|
||||
import com.idcanet.foei.core.FoeiBindingException;
|
||||
import com.idcanet.foei.core.FoeiProcess;
|
||||
import com.idcanet.foei.core.FoeiProcessFactory;
|
||||
import com.idcanet.x4o.element.AbstractElementParameterHandler;
|
||||
|
@ -52,6 +53,10 @@ public class IdAttributeHandler extends AbstractElementParameterHandler {
|
|||
//logger.finest("Generated auto id: "+parameterValue);
|
||||
}
|
||||
FoeiProcess process = FoeiProcessFactory.getFoeiProcess();
|
||||
try {
|
||||
process.addEventObject(element.getElementObject(),parameterValue);
|
||||
} catch (FoeiBindingException e) {
|
||||
throw new ElementConfiguratorException(this,e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ObjectBindingElement extends AbstractElement {
|
|||
* Do the element
|
||||
*/
|
||||
@Override
|
||||
public void doElementStart() throws ElementException {
|
||||
public void doElementRun() throws ElementException {
|
||||
|
||||
Map<String,String> attributes = getAttributes();
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ package com.idcanet.foei.ee.jca.cci;
|
|||
|
||||
import javax.resource.spi.endpoint.MessageEndpointFactory;
|
||||
|
||||
import com.idcanet.foei.core.FoeiBindingException;
|
||||
import com.idcanet.foei.core.FoeiProcess;
|
||||
import com.idcanet.foei.core.FoeiProcessListener;
|
||||
import com.idcanet.foei.ee.jca.spi.FoeiActivationSpec;
|
||||
|
@ -71,7 +72,12 @@ public class EJBFoeiProcessListener implements FoeiProcessListener {
|
|||
FoeiEventWrapper wrapper = new FoeiEventWrapper(endpointFactory,process);
|
||||
|
||||
// inject bean
|
||||
try {
|
||||
process.addEventObject(wrapper, foeiActivationSpec.getFoeiBeanName());
|
||||
} catch (FoeiBindingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
|
||||
</eld>
|
||||
</eld:root>
|
|
@ -24,11 +24,11 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
|
||||
<eld:elementClass tag="filter" objectClassName="com.idcanet.foei.components.lang.Filter"/>
|
||||
<eld:elementClass tag="stringFilter" objectClassName="com.idcanet.foei.components.steps.filters.StringFilter"/>
|
||||
<eld:elementClass tag="classFilter" objectClassName="com.idcanet.foei.components.steps.filters.ClassFilter"/>
|
||||
<eld:elementClass tag="dateFilter" objectClassName="com.idcanet.foei.components.steps.filters.DateFilter"/>
|
||||
|
||||
</eld>
|
||||
</eld:root>
|
|
@ -24,10 +24,10 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
|
||||
<eld:elementClass tag="standardOutput" objectClassName="com.idcanet.foei.components.io.StandardOutput"/>
|
||||
<eld:elementClass tag="errorOutput" objectClassName="com.idcanet.foei.components.io.ErrorOutput"/>
|
||||
<eld:elementClass tag="fileOutput" objectClassName="com.idcanet.foei.components.io.FileOutput"/>
|
||||
|
||||
</eld>
|
||||
</eld:root>
|
|
@ -24,7 +24,11 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
|
||||
<eld:elementClass tag="root" objectClassName="java.lang.Object">
|
||||
<eld:elementDescription>Fake root tag</eld:elementDescription>
|
||||
</eld:elementClass>
|
||||
|
||||
<eld:elementParameterHandler parameterName="bind" bean.class="com.idcanet.foei.core.x4o.BindAttributeHandler" />
|
||||
<eld:elementParameterHandler parameterName="foei.id" bean.class="com.idcanet.foei.core.x4o.IdAttributeHandler"/>
|
||||
|
@ -41,4 +45,4 @@
|
|||
<eld:elementClass tag="mapValue" objectClassName="com.idcanet.foei.components.steps.lang.MapValue"/>
|
||||
<eld:elementClass tag="listValue" objectClassName="com.idcanet.foei.components.steps.lang.ListValue"/>
|
||||
|
||||
</eld>
|
||||
</eld:root>
|
|
@ -24,6 +24,6 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:elementClass tag="loggerInput" objectClassName="com.idcanet.foei.components.logging.LoggerInput"/>
|
||||
</eld>
|
||||
</eld:root>
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
The views and conclusions contained in the software and documentation are those of the authors and
|
||||
should not be interpreted as representing official policies, either expressed or implied, of IDCA.
|
||||
-->
|
||||
<eld xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
<eld:root xmlns:eld="http://x4o.idcanet.com/eld/eld-lang.eld">
|
||||
|
||||
<eld:elementClass tag="defaultPrinter" objectClassName="com.idcanet.foei.components.steps.printers.DefaultPrinter"/>
|
||||
<eld:elementClass tag="datePrinter" objectClassName="com.idcanet.foei.components.steps.printers.DatePrinter"/>
|
||||
|
||||
</eld>
|
||||
</eld:root>
|
Loading…
Reference in a new issue