http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStream.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStream.java b/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStream.java index 81f8335..c3e59b1 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStream.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStream.java @@ -1,109 +1,109 @@ -/* - * 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, 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.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.openejb.util; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Log the output to Slf4j - */ - -public class Slf4jLogStream implements LogStream { - private final Logger log; - - public Slf4jLogStream(final LogCategory logCategory) { - log = LoggerFactory.getLogger(logCategory.getName()); - } - - @Override - public boolean isFatalEnabled() { - return log.isErrorEnabled(); - } - - @Override - public void fatal(final String message) { - log.error(message); - } - - @Override - public void fatal(final String message, final Throwable t) { - log.error(message, t); - } - - @Override - public boolean isErrorEnabled() { - return log.isErrorEnabled(); - } - - @Override - public void error(final String message) { - log.error(message); - } - - @Override - public void error(final String message, final Throwable t) { - log.error(message, t); - } - - @Override - public boolean isWarnEnabled() { - return log.isWarnEnabled(); - } - - @Override - public void warn(final String message) { - log.warn(message); - } - - @Override - public void warn(final String message, final Throwable t) { - log.warn(message, t); - } - - @Override - public boolean isInfoEnabled() { - return log.isInfoEnabled(); - } - - @Override - public void info(final String message) { - log.info(message); - } - - @Override - public void info(final String message, final Throwable t) { - log.info(message, t); - } - - @Override - public boolean isDebugEnabled() { - return log.isDebugEnabled(); - } - - @Override - public void debug(final String message) { - log.debug(message); - } - - @Override - public void debug(final String message, final Throwable t) { - log.debug(message, 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, 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.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.openejb.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Log the output to Slf4j + */ + +public class Slf4jLogStream implements LogStream { + private final Logger log; + + public Slf4jLogStream(final LogCategory logCategory) { + log = LoggerFactory.getLogger(logCategory.getName()); + } + + @Override + public boolean isFatalEnabled() { + return log.isErrorEnabled(); + } + + @Override + public void fatal(final String message) { + log.error(message); + } + + @Override + public void fatal(final String message, final Throwable t) { + log.error(message, t); + } + + @Override + public boolean isErrorEnabled() { + return log.isErrorEnabled(); + } + + @Override + public void error(final String message) { + log.error(message); + } + + @Override + public void error(final String message, final Throwable t) { + log.error(message, t); + } + + @Override + public boolean isWarnEnabled() { + return log.isWarnEnabled(); + } + + @Override + public void warn(final String message) { + log.warn(message); + } + + @Override + public void warn(final String message, final Throwable t) { + log.warn(message, t); + } + + @Override + public boolean isInfoEnabled() { + return log.isInfoEnabled(); + } + + @Override + public void info(final String message) { + log.info(message); + } + + @Override + public void info(final String message, final Throwable t) { + log.info(message, t); + } + + @Override + public boolean isDebugEnabled() { + return log.isDebugEnabled(); + } + + @Override + public void debug(final String message) { + log.debug(message); + } + + @Override + public void debug(final String message, final Throwable t) { + log.debug(message, t); + } + +}
http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStreamFactory.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStreamFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStreamFactory.java index a1b3f4d..a96407b 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStreamFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/Slf4jLogStreamFactory.java @@ -1,40 +1,40 @@ -/* - * 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, 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.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.openejb.util; - -/** - * Simple Slf4jLogStream, not much configuration needed, as slf4j is just a facade - */ - -public class Slf4jLogStreamFactory implements LogStreamFactory { - @Override - public LogStream createLogStream(final LogCategory logCategory) { - return new Slf4jLogStream(logCategory); - } - - public Slf4jLogStreamFactory() { - System.setProperty("openjpa.Log", "slf4j"); - System.setProperty("org.apache.cxf.Logger", "org.apache.cxf.common.logging.Slf4jLogger"); - System.setProperty("openwebbeans.logging.factory", "org.apache.openejb.cdi.logging.Slf4jLoggerFactory"); - - // no need to configure internals: - // by default we are using JUL - // if the user set log4j he wants to configure it himself - // so let him doing - } -} +/* + * 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, 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.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.openejb.util; + +/** + * Simple Slf4jLogStream, not much configuration needed, as slf4j is just a facade + */ + +public class Slf4jLogStreamFactory implements LogStreamFactory { + @Override + public LogStream createLogStream(final LogCategory logCategory) { + return new Slf4jLogStream(logCategory); + } + + public Slf4jLogStreamFactory() { + System.setProperty("openjpa.Log", "slf4j"); + System.setProperty("org.apache.cxf.Logger", "org.apache.cxf.common.logging.Slf4jLogger"); + System.setProperty("openwebbeans.logging.factory", "org.apache.openejb.cdi.logging.Slf4jLoggerFactory"); + + // no need to configure internals: + // by default we are using JUL + // if the user set log4j he wants to configure it himself + // so let him doing + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/container/openejb-core/src/main/resources/META-INF/ejb-jar.xml ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/resources/META-INF/ejb-jar.xml b/container/openejb-core/src/main/resources/META-INF/ejb-jar.xml index 7dd3541..7e42c45 100644 --- a/container/openejb-core/src/main/resources/META-INF/ejb-jar.xml +++ b/container/openejb-core/src/main/resources/META-INF/ejb-jar.xml @@ -1,21 +1,21 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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, 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.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<!-- $Rev$ $Date$ --> - +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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, 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.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- $Rev$ $Date$ --> + <ejb-jar/> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/container/openejb-core/src/main/resources/META-INF/openejb-jar.xml ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/resources/META-INF/openejb-jar.xml b/container/openejb-core/src/main/resources/META-INF/openejb-jar.xml index bd1c42e..4d1746a 100644 --- a/container/openejb-core/src/main/resources/META-INF/openejb-jar.xml +++ b/container/openejb-core/src/main/resources/META-INF/openejb-jar.xml @@ -1,26 +1,26 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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, 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.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<!-- $Rev$ $Date$ --> - -<openejb-jar> - <properties> - openejb.deploymentId.format = {ejbName} - openejb.jndiname.format = {deploymentId}{interfaceType.openejbLegacyName} - </properties> -</openejb-jar> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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, 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.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!-- $Rev$ $Date$ --> + +<openejb-jar> + <properties> + openejb.deploymentId.format = {ejbName} + openejb.jndiname.format = {deploymentId}{interfaceType.openejbLegacyName} + </properties> +</openejb-jar> http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cli/validate.examples ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cli/validate.examples b/container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cli/validate.examples index 6b65463..ed3e20c 100644 --- a/container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cli/validate.examples +++ b/container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cli/validate.examples @@ -1,51 +1,51 @@ -Usage: openejb validate [options] JARFILES... - -Example: Multiple jar files - - openejb validate myapp\fooEjbs.jar myapp\barEjbs.jar - - Validates the beans in the fooEjbs.jar first, then validates the - beans in the barEjbs.jar. Wildcards can be used as well. - - openejb validate myapp\*.jar - -Example: -v - - openejb validate -v myapp\myEjbs.jar - - Validates the beans in the jar, outputting just the minumum details - on each failure. - -Example: -vv - - openejb validate -vv myapp\myEjbs.jar - - Validates the beans in the jar, outputting one line summaries of - each failure. This is the default output level. - -Example: -vvv - - openejb validate -vv myapp\myEjbs.jar - - Validates the beans in the jar, outputting verbose details on each - failure, usually with details on how to correct the failures. - -Example: -nowarn - - openejb validate -nowarn myapp\myEjbs.jar - - Outputs only the failures and errors, no warnings. - -Example: -xml - - openejb validate -xml myapp\myEjbs.jar - - Outputs the validation information in XML format. - -Example: Combinations of options - - openejb validate -vv -nowarn C:\foo\bar.jar D:\my\beans\*.jar - openejb validate -vvv /foo/bar.jar - openejb validate -xml /home/dblevins/mybeans/*.jar - -Bug Reports to <u...@tomee.apache.org> +Usage: openejb validate [options] JARFILES... + +Example: Multiple jar files + + openejb validate myapp\fooEjbs.jar myapp\barEjbs.jar + + Validates the beans in the fooEjbs.jar first, then validates the + beans in the barEjbs.jar. Wildcards can be used as well. + + openejb validate myapp\*.jar + +Example: -v + + openejb validate -v myapp\myEjbs.jar + + Validates the beans in the jar, outputting just the minumum details + on each failure. + +Example: -vv + + openejb validate -vv myapp\myEjbs.jar + + Validates the beans in the jar, outputting one line summaries of + each failure. This is the default output level. + +Example: -vvv + + openejb validate -vv myapp\myEjbs.jar + + Validates the beans in the jar, outputting verbose details on each + failure, usually with details on how to correct the failures. + +Example: -nowarn + + openejb validate -nowarn myapp\myEjbs.jar + + Outputs only the failures and errors, no warnings. + +Example: -xml + + openejb validate -xml myapp\myEjbs.jar + + Outputs the validation information in XML format. + +Example: Combinations of options + + openejb validate -vv -nowarn C:\foo\bar.jar D:\my\beans\*.jar + openejb validate -vvv /foo/bar.jar + openejb validate -xml /home/dblevins/mybeans/*.jar + +Bug Reports to <u...@tomee.apache.org>