http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-container.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-container.mdtext b/src/main/jbake/content/dev/design-container.mdtext new file mode 100644 index 0000000..1164cd0 --- /dev/null +++ b/src/main/jbake/content/dev/design-container.mdtext @@ -0,0 +1,36 @@ +Title: Design - Container +<a name="Design-Container-Container"></a> +## Container + +Sub-component of [OpenEJB](-design.html) + +<a name="Design-Container-Definition"></a> +## Definition + +An Enterprise JavaBeans container enforce the container-bean contract for +an EJB 1.1, 2.0, 2.1 or 3.0 bean type. Containers for custom container-bean +contracts can also be created. + +<a name="Design-Container-AlsoKnownAs"></a> +## Also Known As + * Container Provider + +<a name="Design-Container-Responsibilities"></a> +## Responsibilities + * Adopt the OpenEJB architecture + * Use the Transaction Manager assigned to the container system to assist +in handling transactions + * Use the Security Manager assigned to the container system to assist in +enforcing security and privileges + * Implement the org.apache.openejb.Container interface + +<a name="Design-Container-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.Container + +<a name="Design-Container-Implementations"></a> +## Implementations + * [Stateful SessionBean Container](design-stateful-sessionbean-container.html) + * [Stateless SessionBean Container](design-stateless-sessionbean-container.html) + * [BMP EntityBean Container](design-bmp-entitybean-container.html) + * [CMP EntityBean Container](design-cmp-entitybean-container.html)
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-local-server.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-local-server.mdtext b/src/main/jbake/content/dev/design-local-server.mdtext new file mode 100644 index 0000000..fb1c833 --- /dev/null +++ b/src/main/jbake/content/dev/design-local-server.mdtext @@ -0,0 +1,21 @@ +Title: Design - Local Server +<a name="Design-LocalServer-LocalServer"></a> +## Local Server + +Implementation of [Application Server](design-application-server.html) + +<a name="Design-LocalServer-Description"></a> +## Description + +Allows for optimized interaction among beans and clients in the same +virtual machine. + + +<a name="Design-LocalServer-AlsoKnownAs"></a> +## Also Known As + * IntraVM + * IntraVM Server + +<a name="Design-LocalServer-RelatedPackages"></a> +## Related Packages + * org.apache.openejb.core.ivm http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-local-serverlinks.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-local-serverlinks.mdtext b/src/main/jbake/content/dev/design-local-serverlinks.mdtext new file mode 100644 index 0000000..7d5ce94 --- /dev/null +++ b/src/main/jbake/content/dev/design-local-serverlinks.mdtext @@ -0,0 +1,2 @@ +Title: Design - Local ServerLinks +{include:Design - Application ServerLinks} http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-nova-configuration-factory.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-nova-configuration-factory.mdtext b/src/main/jbake/content/dev/design-nova-configuration-factory.mdtext new file mode 100644 index 0000000..af18a44 --- /dev/null +++ b/src/main/jbake/content/dev/design-nova-configuration-factory.mdtext @@ -0,0 +1,28 @@ +Title: Design - Nova Configuration Factory + +<a name="Design-NovaConfigurationFactory-NovaConfigurationFactory"></a> +## Nova Configuration Factory + +Implementation of [Configuration Factory](design-configuration-factory.html) + +<a name="Design-NovaConfigurationFactory-Description"></a> +## Description + +Populates an OpenEjbConfiguration object by combining the data from an +openejb.xml file, the ejb-jar.xml and openejb-jar.xml from deployed bean +jars, and service-jar.xml containing OpenEJB service implementations. + + +<a name="Design-NovaConfigurationFactory-AlsoKnownAs"></a> +## Also Known As + * New Configuration Factory + * Modular Configuration Factory + +<a name="Design-NovaConfigurationFactory-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.config.ConfigurationFactory + +<a name="Design-NovaConfigurationFactory-RelatedPackages"></a> +## Related Packages + * org.apache.openejb.alt.config + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-passivation-strategy.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-passivation-strategy.mdtext b/src/main/jbake/content/dev/design-passivation-strategy.mdtext new file mode 100644 index 0000000..5ceb9bd --- /dev/null +++ b/src/main/jbake/content/dev/design-passivation-strategy.mdtext @@ -0,0 +1,26 @@ +Title: Design - Passivation Strategy +<a name="Design-PassivationStrategy-PassivationStrategy"></a> +## Passivation Strategy + +Sub-component of [Stateful SessionBean Container](design-stateful-sessionbean-container.html) + + +<a name="Design-PassivationStrategy-Definition"></a> +## Definition + +Used by the Stateful Container to passivate and activate stateful session +beans to a temporary storage. + + +<a name="Design-PassivationStrategy-Responsibilities"></a> +## Responsibilities + * Store and retrieve instances + +<a name="Design-PassivationStrategy-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.core.stateful.PassivationStrategy + +<a name="Design-PassivationStrategy-Implementations"></a> +## Implementations + * [Random Access File Passivater](design-random-access-file-passivater.html) + * [Simple Passivater](design-simple-passivater.html) http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-random-access-file-passivater.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-random-access-file-passivater.mdtext b/src/main/jbake/content/dev/design-random-access-file-passivater.mdtext new file mode 100644 index 0000000..2a2eb37 --- /dev/null +++ b/src/main/jbake/content/dev/design-random-access-file-passivater.mdtext @@ -0,0 +1,20 @@ +Title: Design - Random Access File Passivater + +<a name="Design-RandomAccessFilePassivater-RandomAccessFilePassivater"></a> +## Random Access File Passivater + +Implementation of [Passivation Strategy](design-passivation-strategy.html) + +<a name="Design-RandomAccessFilePassivater-Description"></a> +## Description + +A PassivationStrategy that bulk passivates bean instances to a random +access file. + +<a name="Design-RandomAccessFilePassivater-AlsoKnownAs"></a> +## Also Known As + * RAF Passivater + +<a name="Design-RandomAccessFilePassivater-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.core.stateful.RAFPassivater http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-remote-server.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-remote-server.mdtext b/src/main/jbake/content/dev/design-remote-server.mdtext new file mode 100644 index 0000000..47eb1f1 --- /dev/null +++ b/src/main/jbake/content/dev/design-remote-server.mdtext @@ -0,0 +1,31 @@ +Title: Design - Remote Server +<a name="Design-RemoteServer-RemoteServer"></a> +## Remote Server + +Implementation of [Application Server](design-application-server.html) + +<a name="Design-RemoteServer-Description"></a> +## Description + +Distributes EJB interface implementations to remote clients using a +conversational serialization-based protocol. + +<a name="Design-RemoteServer-AlsoKnownAs"></a> +## Also Known As + * EJBd Protocol + +<a name="Design-RemoteServer-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.server.EjbDaemon + +<a name="Design-RemoteServer-RelatedPackages"></a> +## Related Packages + * org.apache.openejb.client + * org.apache.openejb.server + +<a name="Design-RemoteServer-RequiredLibraries"></a> +## Required Libraries + * openejb-server-3.0.x.jar + * openejb-ejbd-3.0.x.jar + * openejb-client-3.0.x.jar + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-remote-serverlinks.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-remote-serverlinks.mdtext b/src/main/jbake/content/dev/design-remote-serverlinks.mdtext new file mode 100644 index 0000000..6c85052 --- /dev/null +++ b/src/main/jbake/content/dev/design-remote-serverlinks.mdtext @@ -0,0 +1,2 @@ +Title: Design - Remote ServerLinks +{include:Design - Application ServerLinks} http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-resource-manager.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-resource-manager.mdtext b/src/main/jbake/content/dev/design-resource-manager.mdtext new file mode 100644 index 0000000..9d601aa --- /dev/null +++ b/src/main/jbake/content/dev/design-resource-manager.mdtext @@ -0,0 +1,29 @@ +Title: Design - Resource Manager + +<a name="Design-ResourceManager-ResourceManager"></a> +## Resource Manager + +Sub-component of [OpenEJB](-design.html) + + +<a name="Design-ResourceManager-Definition"></a> +## Definition + +Provides the container with managed connections to transactional data +sources required by beans + + +<a name="Design-ResourceManager-AlsoKnownAs"></a> +## Also Known As + * Connector + * Connection Manager + +<a name="Design-ResourceManager-Responsibilities"></a> +## Responsibilities + * Provides beans with connection handles + * Manages pysical connections + +<a name="Design-ResourceManager-RelatedPackages"></a> +## Related Packages + * javax.resource.spi + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-security-service.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-security-service.mdtext b/src/main/jbake/content/dev/design-security-service.mdtext new file mode 100644 index 0000000..aade92a --- /dev/null +++ b/src/main/jbake/content/dev/design-security-service.mdtext @@ -0,0 +1,27 @@ +Title: Design - Security Service +<a name="Design-SecurityService-SecurityService"></a> +## Security Service + +Sub-component of [OpenEJB](-design.html) + + +<a name="Design-SecurityService-Definition"></a> +## Definition + +Provides the container with an authenticated client identity. + +<a name="Design-SecurityService-AlsoKnownAs"></a> +## Also Known As + * Security Provider + +<a name="Design-SecurityService-Responsibilities"></a> +## Responsibilities + * Authenticate the user in an implementation specific way + * Provides OpenEJB a reference to the current security identity of the +client + * Assists OpenEJB with role-based authorization control + +<a name="Design-SecurityService-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.spi.SecurityService + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-simple-passivater.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-simple-passivater.mdtext b/src/main/jbake/content/dev/design-simple-passivater.mdtext new file mode 100644 index 0000000..1d47a83 --- /dev/null +++ b/src/main/jbake/content/dev/design-simple-passivater.mdtext @@ -0,0 +1,18 @@ +Title: Design - Simple Passivater + +<a name="Design-SimplePassivater-SimplePassivater"></a> +## Simple Passivater + +Implementation of [Passivation Strategy](design-passivation-strategy.html) + + +<a name="Design-SimplePassivater-Description"></a> +## Description + +A PassivationStrategy that idividually passivates bean instances to a +binary file. + + +<a name="Design-SimplePassivater-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.core.stateful.SimplePassivater http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-stateful-sessionbean-container.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-stateful-sessionbean-container.mdtext b/src/main/jbake/content/dev/design-stateful-sessionbean-container.mdtext new file mode 100644 index 0000000..409495b --- /dev/null +++ b/src/main/jbake/content/dev/design-stateful-sessionbean-container.mdtext @@ -0,0 +1,24 @@ +Title: Design - Stateful SessionBean Container +<a name="Design-StatefulSessionBeanContainer-StatefulSessionBeanContainer"></a> +## Stateful SessionBean Container + +Implementation of [Container](design-container.html) + +<a name="Design-StatefulSessionBeanContainer-Description"></a> +## Description + +Container that implements the EJB defined bean-container contract for +Stateful SessionBeans. + +<a name="Design-StatefulSessionBeanContainer-AlsoKnownAs"></a> +## Also Known As + * Stateful Session Container + * Stateful Container + +<a name="Design-StatefulSessionBeanContainer-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.core.stateful.StatefulContainer + +<a name="Design-StatefulSessionBeanContainer-Sub-components"></a> +## Sub-components + * [Passivation Strategy](design-passivation-strategy.html) http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-stateless-sessionbean-container.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-stateless-sessionbean-container.mdtext b/src/main/jbake/content/dev/design-stateless-sessionbean-container.mdtext new file mode 100644 index 0000000..52a9111 --- /dev/null +++ b/src/main/jbake/content/dev/design-stateless-sessionbean-container.mdtext @@ -0,0 +1,22 @@ +Title: Design - Stateless SessionBean Container + +<a name="Design-StatelessSessionBeanContainer-StatelessSessionBeanContainer"></a> +## Stateless SessionBean Container + +Implementation of [Container](design-container.html) + +<a name="Design-StatelessSessionBeanContainer-Description"></a> +## Description + +Container that implements the EJB defined bean-container contract for +stateless SessionBeans. + +<a name="Design-StatelessSessionBeanContainer-AlsoKnownAs"></a> +## Also Known As + * Stateless Session Container + * Stateless Container + +<a name="Design-StatelessSessionBeanContainer-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.core.stateless.StatelessContainer + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design-transaction-service.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design-transaction-service.mdtext b/src/main/jbake/content/dev/design-transaction-service.mdtext new file mode 100644 index 0000000..d314680 --- /dev/null +++ b/src/main/jbake/content/dev/design-transaction-service.mdtext @@ -0,0 +1,28 @@ +Title: Design - Transaction Service + +<a name="Design-TransactionService-TransactionService"></a> +## Transaction Service + +Sub-component of [OpenEJB](design.html) + + +<a name="Design-TransactionService-Definition"></a> +## Definition + +Provides the container with transactional integrity. + + +<a name="Design-TransactionService-AlsoKnownAs"></a> +## Also Known As + * Transaction Manager + +<a name="Design-TransactionService-Responsibilities"></a> +## Responsibilities + * To give OpenEJB a reference to a valid implementation of +javax.transaction.TransactionManager + +<a name="Design-TransactionService-RelatedClasses"></a> +## Related Classes + * org.apache.openejb.spi.TransactionService + * javax.transaction.TransactionManager + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/design.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/design.mdtext b/src/main/jbake/content/dev/design.mdtext new file mode 100644 index 0000000..72c830c --- /dev/null +++ b/src/main/jbake/content/dev/design.mdtext @@ -0,0 +1,37 @@ +Title: Design +<a name="Design-OpenEJB"></a> +## OpenEJB +System Design + +<a name="Design-Definition"></a> +## Definition +A modular, configurable, customizable, embeddable open source EJB container +system + +<a name="Design-AlsoKnownAs"></a> +## Also Known As +* container system + +<a name="Design-Responsibilities"></a> +## Responsibilities +* Implement EJB 3.0 Specification + +<a name="Design-RelatedClasses"></a> +## Related Classes +* org.apache.openejb.OpenEJB + +<a name="Design-RequiredLibraries"></a> +## Required Libraries +* openejb-javaagent-3.0.x.jar +* openejb-jee-3.0.x.jar +* openejb-core-3.0.x.jar + +<a name="Design-Sub-components"></a> +## Sub-components +* [Application Server](design-application-server.html) +* [Transaction Service](design-transaction-service.html) +* [Security Service](design-security-service.html) +* [Resource Manager](design-resource-manager.html) +* [Container](design-container.html) +* [Assembler](design-assembler.html) + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/favicon.ico ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/favicon.ico b/src/main/jbake/content/dev/favicon.ico new file mode 100644 index 0000000..f0c22ad Binary files /dev/null and b/src/main/jbake/content/dev/favicon.ico differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/git.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/git.mdtext b/src/main/jbake/content/dev/git.mdtext new file mode 100644 index 0000000..c12ccd4 --- /dev/null +++ b/src/main/jbake/content/dev/git.mdtext @@ -0,0 +1,85 @@ +Title: GIT for TomEE Developers + +###The GitFlow Workflow + +Notes before you begin (mostly for SVN users): + +* The '*develop*' repository is the equivalent of the SVN *trunk* directory. +* The '*master*' repository is the equivalent of the SVN *tags* directory. +* The '*origin*' is the actual GIT repository that contains the projects *master*, *develop* and other branches (Like trunk, branches and tags). +* Unlike SVN a 'commit' is only a local action. The local commits are only published to the remote repository using 'push'. +* Commit and push code to your own feature branch as often as you like, but only merge stable branches back into to the *develop* branch. +* Only the release manager should manage the *master* repository +* Read the official Apache Committer documentation [here](https://git-wip-us.apache.org/#committers-getting-started) + +<span style="color: rgb(128,0,0);">Run commands in the directory of the project you are working on, for example 'tomee':</span> + +Always create a feature branch from *develop* using an '*extremely*' descriptive name, this should usually be the [JIRA](https://issues.apache.org/jira/browse/TOMEE) id or task name you want to work on: + +><span style="color: rgb(51,51,153);">git checkout -b TOMEE-007 develop</span> +> +>Switched to a new branch 'TOMEE-007' + + +><span style="color: rgb(51,51,153);">git status</span> +> +>nothing to commit, working directory clean + + Immediately push the new branch to the repository so everyone can see it remotely (and possibly collaborate): + +><span style="color: rgb(51,51,153);">git push -u origin TOMEE-007</span> +> +>Branch TOMEE-007 set up to track remote branch TOMEE-007 from origin. + +Once that is done then you just need the simple push for subsequent calls on this branch: + +><span style="color: rgb(51,51,153);">git push</span> + +<span style="color: rgb(0,128,0);">Work like mad on the JIRA issue calling commit and add as often as you like...</span> + +If others are working on your branch also remember to pull their changes (Or just as good practice): + +><span style="color: rgb(51,51,153);">git pull</span> +> +><span style="color: rgb(51,51,153);">git commit</span> +> +><span style="color: rgb(51,51,153);">git push</span> + +Finally, to push the completed (or significant non-breaking progress on the) feature to *develop* at any time (ensuring *develop* is up to date first): + +><span style="color: rgb(51,51,153);">git pull origin develop</span> + +><span style="color: rgb(51,51,153);">git checkout develop</span> + +><span style="color: rgb(51,51,153);">git merge --no-ff TOMEE-007</span> + +Once the completed feature is merged and the JIRA resolved then the branch can and 'should' be deleted before pushing: + +><span style="color: rgb(51,51,153);">git branch -d TOMEE-007</span> + +><span style="color: rgb(51,51,153);">git push origin develop</span> + +<a name="git-gui"></a> +###The GUI Way + +Now we have learned to do it the hard way, time to look at the simplified version. The GitHub native tools! + +For the latest mac version go here: [Mac Latest](https://mac.github.com/), + +And windows here: [Win Latest](https://windows.github.com/) + +These tools will probably not save you much time over the command line, but provide a much better visualization of ongoing processes. + +The steps are and remain as described above: + +1. From *develop* create a new branch called, for example TOMEE-007 +1. 'Publish' (push -u) the new branch +1. Work on the branch and commit regularly +1. Synchronize (pull and push) changes in the the branch when stable +1. Switch to *develop* and synchronize (pull) +1. Merge the branch into *develop*, i.e. 'TOMEE-007' + 'develop' = 'develop' <span style="color: rgb(255,102,0);">*See note below</span> +1. Commit *develop* +1. Synchronize *develop* (pull and push) +1. Delete the branch TOMEE-007 + +<span style="color: rgb(255,102,0);">*Note</span>: You can actually merge the current *develop* (or any other 'synchronized' branch) into your branch first to make sure it is stable,i.e. 'develop' + 'TOMEE-007' = 'TOMEE-007' - This is really cool! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/index.html ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/index.html b/src/main/jbake/content/dev/index.html new file mode 100644 index 0000000..876a068 --- /dev/null +++ b/src/main/jbake/content/dev/index.html @@ -0,0 +1,3 @@ +{% extends "basic.html" %} +{% block title %}SiteMap{% endblock %} +{% block content %}{{ content|markdown }}{% endblock %} http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/itests-overview.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/itests-overview.mdtext b/src/main/jbake/content/dev/itests-overview.mdtext new file mode 100644 index 0000000..e72044c --- /dev/null +++ b/src/main/jbake/content/dev/itests-overview.mdtext @@ -0,0 +1,151 @@ +Title: iTests Overview +<a name="iTestsOverview-Motivation"></a> +# Motivation + +The basic idea behind itests that makes them slightly different than plain +junit tests ran by maven is that it's assumed that there are other systems +(servers, databases, brokers, etc) that need to be started or connected to +before the tests can run. The tests themselves don't setup the other +systems themselves so that the tests don't become coupled with them and you +can actually swap out various aspects of those systems behind the back of +the tests; server version, protocol implementation, java version, VM +implementation, database provider, operating systems, even using embedded +servers and embedded databases. + +The idea came from the tests in OpenEJB that do this. It took a lot of +work to get them to run as part of the maven build and the itest plugin was +the result. + +Definitely give those a look at: +http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/ + +<a name="iTestsOverview-Pluggingin"></a> +# Plugging in + +You can have systems started and stopped before and after the tests in a +number of ways. + +<a name="iTestsOverview-Inmaven1"></a> +## In maven 1 + +This series of articles established a basic technique for Container Driven +Testing with Maven and OpenEJB using preGoals and postGoals to do server +and databse setup and teardown before and after Maven runs the unit tests. [http://www.theserverside.com/articles/article.tss?l=ContainerDrivenTestingSeries](http://www.theserverside.com/articles/article.tss?l=ContainerDrivenTestingSeries) + +This concept evolved from OpenEJB into a reusable maven plugin created by +Dain Sundstrom that gave these integration tests (itests) their own source +directory and added itest:setup and itest:teardown goals to your maven +build rather than just using a preGoal on "test:test" for setup and a +postGoal on "test:test" for teardown. The advantage to the new goals is +that maven does not call any postGoals on "test:test" if the tests failed; +something the above series of articles hacked around with an odd bit of +jelly code. + +The new itest plugin was checked into Geronimo with the expectation that +Geronimo would also use it. After some time of OpenEJB still being the +only consumer of it, it was moved into the Maven repository where they keep +it in the Maven sandbox. + + [http://maven.apache.org/plugins-sandbox/itest/](http://maven.apache.org/plugins-sandbox/itest/) + +ActiveMQ later started using the itest plugin and now has a large suite of +their own JMS specific integration tests. + +<a name="iTestsOverview-Inmaven2"></a> +## In maven 2 + +The concept of integration tests (itests) has been built into the lifecycle +of maven 2, so it is no longer required to have the itest plugin around to +get the extra "itest:setup" and "itest:teardown" goals. See this document +for more info: [http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html](http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) + +<a name="iTestsOverview-Injunitsetupandteardown"></a> +## In junit setup and teardown + +The ejb tests in particular require you to plug in facades for the server +and the database so the client (the tests) can say "give me an initial +context" or "create these tables i need" in a generic way. It's assumed +that those systems were setup and guaranteed in working state in the itest +setup phase. It's also guaranteed that the server and database facades +know how to contact the server or database to carry out the "give me an +initial context" and "create these tables" calls. + +Here are some implementations of the database provider for reference: + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/AxionTestDatabase.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/DerbyTestDatabase.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/InstantDbTestDatabase.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/PostgreSqlTestDatabase.java + +Here are some implementations for the server facades: + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/CorbaTestServer.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/RemoteTestServer.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/IvmTestServer.java + - +http://cvs.openejb.org/viewrep/openejb/openejb/modules/itests/src/itest/org/openejb/test/RiTestServer.java + +Using the itest concept you could setup any system you need before hand, +then just provide an abstraction of that system to the actual tests. So +it's not limited to just a server or a database. You could do queue, +topic, clustering heartbeat agent, directory server, etc. + +<a name="iTestsOverview-Testingmatrix"></a> +# Testing matrix + +Even with just what we have we can get quite far. In a perfect world, we +would actually test against the full matrix: + + Server: Local, Database: Axion + Server: Local, Database: Derby + Server: Local, Database: PostgreSQL + Server: Remote, Database: Axion + Server: Remote, Database: Derby + Server: Remote, Database: PostgreSQL + Server: Corba, Database: Axion + Server: Corba, Database: Derby + Server: Corba, Database: PostgreSQL + +We had that going for a short while years ago but it was just too much +infrastructure for me to keep running. It would be nice to get Oracle and +MySQL in that list as well. + +In an even more perfect world we'd test against not just different Server +and Database combinations, but JVM versions as well. + + Server: Local, Database: Axion, JVM: 1.3 + Server: Local, Database: Axion, JVM: 1.4 + Server: Local, Database: Axion, JVM: 1.5 + Server: Local, Database: Derby, JVM: 1.3 + Server: Local, Database: Derby, JVM: 1.4 + Server: Local, Database: Derby, JVM: 1.5 + Server: Local, Database: PostgreSQL, JVM: 1.3 + Server: Local, Database: PostgreSQL, JVM: 1.4 + Server: Local, Database: PostgreSQL, JVM: 1.5 + Server: Remote, Database: Axion, JVM: 1.3 + Server: Remote, Database: Axion, JVM: 1.4 + Server: Remote, Database: Axion, JVM: 1.5 + Server: Remote, Database: Derby, JVM: 1.3 + Server: Remote, Database: Derby, JVM: 1.4 + Server: Remote, Database: Derby, JVM: 1.5 + Server: Remote, Database: PostgreSQL, JVM: 1.3 + Server: Remote, Database: PostgreSQL, JVM: 1.4 + Server: Remote, Database: PostgreSQL, JVM: 1.5 + Server: Corba, Database: Axion, JVM: 1.3 + Server: Corba, Database: Axion, JVM: 1.4 + Server: Corba, Database: Axion, JVM: 1.5 + Server: Corba, Database: Derby, JVM: 1.3 + Server: Corba, Database: Derby, JVM: 1.4 + Server: Corba, Database: Derby, JVM: 1.5 + Server: Corba, Database: PostgreSQL, JVM: 1.3 + Server: Corba, Database: PostgreSQL, JVM: 1.4 + Server: Corba, Database: PostgreSQL, JVM: 1.5 + +If you add JVM vendors (Sun, IBM, Apple, BEA) to the list, the combinations +goes up to like 109. Throw on OS implementations and you get an insane +number of test runs to complete. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/january2008.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/january2008.mdtext b/src/main/jbake/content/dev/january2008.mdtext new file mode 100644 index 0000000..5709910 --- /dev/null +++ b/src/main/jbake/content/dev/january2008.mdtext @@ -0,0 +1,55 @@ +Title: January2008 +The release of OpenEJB 3.0 beta 1 at the end of September showed an mild +but noticeable increase in user traffic which has continued since. Several +usability improvements and related new features have been added, +particularly around a returning user from years ago Alex St. Croix. Alex +has already written some blog entries, created a couple video tutorials, +and has a downloadable PDF of using OpenEJB embedded in Tomcat which is a +dozen pages and growing. This is all very good for OpenEJB and we are very +excited to see user activity of this nature again. + +Web Services support has been added to OpenEJB in both standalone and +Tomcat embedded modes, and significant work has been contributed to the CXF +project as a result to add new features required by OpenEJB but not already +present, such as rpc/encoded web services. + +The ability to embed OpenEJB into Tomcat has been re-expanded from +temporarily just supporting Tomcat 6.0 to now version 5.5 as well including +annotation processing support which is usually a v6.0.x and higher feature. + Support for older versions was lost when the integration was reworked and +improved over the OpenEJB 1.0 approach, however post OpenEJB 3.0 beta 1 +release, requests from users of older Tomcat versions began coming in +showing that the ability to support pre Tomcat 6 users is still very +important. + +The documentation has been reorganized significantly. A new confluence +space as been created dedicated entirely to the OpenEJB 3.0.x codebase and +reintegrated back into the main website. Several new examples have been +created as well. A major issue with the documentation was that most of the +new documents weren't linked into the main site, were just loose pages, and +had no "center" to bind them all together. The creation of dedicated 3.0.x +space with it's own index and new left navigation section has dramatically +improved this. + +Jonathan Gallimore, a newer contributor, recently contributed another large +patch to the Eclipse plugin he's been working on that takes an EJB 2.x +application and adds the annotations to the source code required to turn it +into an EJB 3.0 application, removing the equivalent xml as it goes. +Jonathan has done great work, but we could be doing better as he is largely +working alone and isn't getting the benefit of working closely with +existing committers. It's always difficult to pull people in when there +isn't a strong intersection with existing code/people. + +Release work on OpenEJB 3.0 beta 2 has begun. There was a perpetual state +of "going to release" through late November and all December, however all +the open issues have been cleared and the general mood is "it's +over-ready." We've branched and have begun helping other projects to +release some of the things we have dependencies on such as the Geronimo +Transaction Manager/Connector and the XBean libraries. All is going well +and we should see OpenEJB 3.0 beta 2 put up for vote this month. + +On a general note, OpenEJB celebrated it's eighth year of existence in December. As a personal comment from someone who's been on the project the entire time, I \[David Blevins\](david-blevins\.html) + have never seen the project in such good shape. A major challenge going +forward will be releasing the 3.0 final and getting OpenEJB back on +people's radar. + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/january2010.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/january2010.mdtext b/src/main/jbake/content/dev/january2010.mdtext new file mode 100644 index 0000000..b8f1212 --- /dev/null +++ b/src/main/jbake/content/dev/january2010.mdtext @@ -0,0 +1,20 @@ +Title: January2010 +Main areas of development activity include OSGi support, upgrading JAX-WS +and potential support for JAX-RS, and Java EE 6 @ManagedBean support. More +detailed planning has also begun for the remaining EJB 3.1 work. + +Overall user list activity continues to increase with October and November +both being record months in terms of volume. Diversity in developers +responding to user requests has also been greatly improved, quite stellar +in fact, with more committers pitching in and resolving user issues. A +wonderful trend. Holidays had their usual impact on December activity. + +OpenEJB Eclipse Plugin 1.0.0.alpha was released in late October and a +screencast created which shows how to get started with it was put up in the +project blog and website. + +An informal get together is planned in Milan, Italy for the last weekend of +January. Information has been sent to the user list and anyone is welcome +to come. Primary goal is just to meet each other and have a few beers, but +there's certainly room for tech talk and some will likely occur. Anything +substantial will reach the dev list as with any offline communication. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/jira/index.html ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/jira/index.html b/src/main/jbake/content/dev/jira/index.html new file mode 100644 index 0000000..658cd20 --- /dev/null +++ b/src/main/jbake/content/dev/jira/index.html @@ -0,0 +1,3 @@ +{% extends "basic.html" %} +{% block title %}JIRA Reports{% endblock %} +{% block content %}{{ content|markdown }}{% endblock %} http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/jira/patches.swjira ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/jira/patches.swjira b/src/main/jbake/content/dev/jira/patches.swjira new file mode 100644 index 0000000..7ee5a09 --- /dev/null +++ b/src/main/jbake/content/dev/jira/patches.swjira @@ -0,0 +1,32 @@ +Title: Pending Patches +#set( $url = "https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+in+%28OPENEJB%2C+TOMEE%29+AND+status+%3D+Open&tempMax=1000" ) +#set( $jirarss = $rss.fetch( $url ) ) +#set( $issues = $jirarss.fillAttachments() ) +#set( $void = $date.format("yyyy-MM-dd") ) +## +#foreach( $issue in $issues ) +#set( $issue.attributes.totalAttachments = $issue.attachments.size() ) +#end +#set( $issues = $issues.greater("@totalAttachments", 0) ) +#foreach( $issue in $issues ) +#set( $issue.attributes.firstPatch = $issue.attachments.min("created").created ) +#end +## + +**${issues.size()} patches in the queue** + +Generated $date.as("EEEE, MMMM d, yyyy") + +(sorted oldest to newest) + +#foreach( $issue in $issues.sort("@firstPatch") ) +[$issue.key]($issue.link) $issue.summary + +- $date.format($issue.created) **$issue.reporter** - _${issue.type}_ +#foreach ( $attachment in $issue.attachments.sort("created") ) +- $date.format($attachment.created) $attachment.author [$attachment.fileName]($attachment.url) +#end + + + +#end http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/jira/todo.swjira ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/jira/todo.swjira b/src/main/jbake/content/dev/jira/todo.swjira new file mode 100644 index 0000000..8841599 --- /dev/null +++ b/src/main/jbake/content/dev/jira/todo.swjira @@ -0,0 +1,30 @@ +Title: Unassigned Items +#set ( $tomee = $rss.fetch("https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?assignee=Unassigned&&pid=TOMEE&status=Open&tempMax=1000&reset=true&decorator=none") ) +#set ( $openejb = $rss.fetch("https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?assignee=Unassigned&pid=OPENEJB&status=Open&tempMax=1000&reset=true&decorator=none") ) +#set( $issues = $tomee.issues.union( $openejb.issues ) ) +#set( $priorities = $issues.collect("priority").unique("id").sort("id")) + +Looking for something to do? + +This page contains a list of JIRA issues that are open and not assigned to anyone. Anything in this list is a great candidate for contribution. + +**Note "Major" and "Minor" refer to priority and not effort required to complete a task.** + +When looking for a task for first-time contributors, we highly encourage people to start small and find something simple and quick. See also [Contribution Tips](../contribution-tips.html) + +#foreach( $p in $priorities ) +#$p + +#set( $list = $issues.equals("priority", $p.name).sort("id", true) ) +#set( $types = $list.collect("type").unique("id").sort("id") ) + +#foreach( $type in $types ) +**$type**: + +#foreach( $issue in $list.equals("type", $type.name) ) + - [$issue.key](https://issues.apache.org/jira/browse/$issue.key): $issue.summary +#end + +#end + +#end http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/july2007.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/july2007.mdtext b/src/main/jbake/content/dev/july2007.mdtext new file mode 100644 index 0000000..298c5de --- /dev/null +++ b/src/main/jbake/content/dev/july2007.mdtext @@ -0,0 +1,22 @@ +Title: July2007 +CURRENT FOCUS + +Primary activities in the project are around polishing up features, +user-facing code, reducing dependencies, documentation, and taking care of +legal in preparation for the coming 3.0 release. No real issues stand in +the way at this point, builds and voting should start soon. + +CONTRIBUTIONS + +More wonderful documentation contributions have been made by contributor +Karan Malhi who is actively scraping our list archives and creating +documentation from old emails. + +EXTERNAL INVOLVEMENT + +Contributed managed connection support to commons-dbcp. This will eliminate +our custom database pooling code, and adds an important new feature to +DBCP. This feature should be useful to anyone using DBCP in a managed +environment such at Tomcat. Also, OpenEJB has a large set of data base test +case, and we have already found a few bugs to fix in DBCP for which we are +working on fixes. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/july2008.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/july2008.mdtext b/src/main/jbake/content/dev/july2008.mdtext new file mode 100644 index 0000000..ceb3aee --- /dev/null +++ b/src/main/jbake/content/dev/july2008.mdtext @@ -0,0 +1,19 @@ +Title: July2008 +The OpenEJB 3.0 Final release in mid April brought some good attention to +the project and more new users. User list traffic showed a small increase +in April and May and a sharp spike in June. July looks to be a slow month +so far. Many users are content and anxiously awaiting the next release. + +Planning for the next release has begun. The list of fixes and +improvements is growing very large. If all goes well 3.1 it won't be too +much longer before we start spinning binaries for 3.1. Major new features +will include more EJB 3.1 support, jaxb performance increases through the +SXC project, network performance increases in client/server communication, +cmp and jpa conversion improvements, tomcat console improvements, and fixes +in the jdbc connection pooling. + +Jonathan Gallimore was voted in as a committer with great support. +Jonathan is not just a new committer to OpenEJB but to the ASF. A very +warm welcome to Jonathan! + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/july2009.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/july2009.mdtext b/src/main/jbake/content/dev/july2009.mdtext new file mode 100644 index 0000000..87074c3 --- /dev/null +++ b/src/main/jbake/content/dev/july2009.mdtext @@ -0,0 +1,28 @@ +Title: July2009 +OpenEJB 3.1.1 was released in June. The release contained a mix of +improvements and fixes. Overall it was very well received and very +anticipated as the last trunk release was in October 2008. More frequent +dot releases are planned and a 3.1.2 will hopefully be not too far behind. + +Project participation in blogs.apache.org started up in April and has been +fairly successful with about seven posts so far. Some effort has gone into +creating a convenient way that blog posts can be staged for community +review before being posted. The result has proven to be very easy and not +cumbersome which directly contributes to the number of posts in the last +two months or so. Two screencasts, the first of many hopefully, were also +added and published through the blog. + +Jean-Louis Monteiro was voted in as a committer in June. The project is +extremely happy to have him as a committer and very much enjoys his work +and overall contributions in the community. Congratulations, Jean-Louis! + +Preparation has been underway to do a first release of the OpenEJB Eclipse +Plugin. As part of the work in preparing the release files, discussion +started at the beginning of the month on adding the release manager and +majority contributor to the plugin, Jonathan Gallimore, to the project PMC +for better oversight. The discussion was started on the dev list carefully +and deliberately with so far very healthy and positive results. A vote for +his addition to the PMC is now underway on the dev list, the first of +hopefully many open PMC votes. A big compliment to the community to whose +amazing openness, mutual respect, and overall friendliness makes this kind +of thing possible. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/july2010.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/july2010.mdtext b/src/main/jbake/content/dev/july2010.mdtext new file mode 100644 index 0000000..0273575 --- /dev/null +++ b/src/main/jbake/content/dev/july2010.mdtext @@ -0,0 +1,18 @@ +Title: July2010 +Work on the 3.1.next development has slowed and a release of that codebase +(3.1.3) is likely to come out soon. + +Activity on the 3.2 codebase is going strong with significant progress on +EJB 3.1 features, specifically; @AccessTimeout, @AfterBegin, +@BeforeCompletion, @AfterCompletion and some support for the @Asynchronous +method invocations. Most of this work is being done by contributors. New +committers are sure to be right around the corner. Work has started on +JCDI integration aided by the OpenWebBeans community. That work is +somewhat revolutionary and a separate branch has been created temporarily +to workout the overall architecture and design of the integration. +Significant work is also being done to overhaul and test the application +validation code and related i18n message keys. + +Dev list participation has increased due to greater contributor activity. +User list traffic has slowed somewhat which is welcome as it provides a +little breathing room for development. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/june2007.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/june2007.mdtext b/src/main/jbake/content/dev/june2007.mdtext new file mode 100644 index 0000000..517c5a8 --- /dev/null +++ b/src/main/jbake/content/dev/june2007.mdtext @@ -0,0 +1,16 @@ +Title: June2007 +All Incubator Infrastructure has been migrated over to tomee.apache.org +as well as removal of any miscellaneous Incubator related disclaimers in +code and website. + +The project is excited to have implementation of EJB 3.0 complete and to +see our sister project, Geronimo, announced JavaEE 5 Certification. +Community short term goals are a release of OpenEJB 3.0 along with regular +published snapshots. Early development discussions are underway on +clustering, application validation as well as general items for code clean +up. List activity post JavaEE 5 Certification is back up to normal. + +We still gain more contribution interests from new people like *Karan +Malhi* who is interested in fixing some issues with OpenEJB 3.0 assembly +build process. + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/logging.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/logging.mdtext b/src/main/jbake/content/dev/logging.mdtext new file mode 100644 index 0000000..e8edabe --- /dev/null +++ b/src/main/jbake/content/dev/logging.mdtext @@ -0,0 +1,222 @@ +Title: Logging +<a name="Logging-LoggingforUsers"></a> +## Logging for Users +All logging in OpenEJB is done using the +openejb.base/conf/logging.properties file. When you download and extract +OpenEJB, you will not find this file under the openejb.base/conf directory. +However, when you start the server, this file magically appears. So what +does this give you as a user of OpenEJB? Here are some of the benefits: +1. You do not have to author a logging.properties from scratch. You get one +with sensible defaults. +1. If you did modify the default file, and you wanted to revert back to the +default file generated by OpenEJB, all you have to do is +1. # Delete or rename the file e.g. rename it to logging.properties.BAK . +1. # Restart the server + + +OpenEJB will find that the logging.properties file is missing from the +openejb.base/conf directory and it will automatically create a new one with +the default configuration. The good thing is that if you modify the +logging.properties file, OpenEJB will \*NOT\* over-write it. + +The default logging configuration created by OpenEJB uses +RollingFileAppender's. The log files are located under the +openejb.base/logs directory. By default it writes to just two files , +openejb.log and transaction.log +{info:title=Embedded Testing} +When running tests using embedded OpenEJB, the logging.properties will be +ignored. You need to use a file named embedded.logging.properties instead. +Place this file under src/test/resources +{info} +<a name="Logging-Loggingforcontributors/committers"></a> +## Logging for contributors/committers + +The org.apache.openejb.util.Logger class is the one which is used for +logging. This class is a wrapper around log4. + +<a name="Logging-LogCategory"></a> +### LogCategory + +Each Logger instance belongs to a category represented by a +org.apache.openejb.util.LogCategory instance. Here is what the LogCategory +class looks like + + public final class LogCategory { + private final String name; + public static final LogCategory OPENEJB = new LogCategory( "OpenEJB"); + public static final LogCategory OPENEJB_ADMIN = OPENEJB.createChild("admin"); + public static final LogCategory OPENEJB_STARTUP = OPENEJB.createChild("startup"); + public static final LogCategory OPENEJB_STARTUP_CONFIG = OPENEJB_STARTUP.createChild("config"); + public static final LogCategory OPENEJB_STARTUP_VALIDATION = OPENEJB_STARTUP.createChild("validation"); + // other categories removed for code brevity + private LogCategory(String name){ + this.name = name; + } + public String getName() { + return name; + } + /** + * Creates a child category of this category. <B>Use this method sparingly</B>. This method is to be used in only those circumstances where the name of the + * category is not known upfront and is a derived name. If you know the name of the category, it is highly recommended to add a static final field + * of type LogCategory in this class + * @param child + * @return - LogCategory + */ + public LogCategory createChild(String child){ + return new LogCategory(this.name+"."+child); + } + + } + +Notice carefully how each LogCategory instance is created. The +objective here is that each LogCategory should be a child of the OPENEJB +category. If you need to add a new category and you know the name of the +category upfront, simply open the LogCategory class and add another +category. For example, if you needed to add a category named SHUTDOWN, here +is the recommended way to add it + + public static final LogCategory OPENEJB_SHUTDOWN = LogCategory.OPENEJB.createChild("shutdown"); + +Sometimes you may want to create a category whose name is "generated" at +runtime. In that case you can use the "createChild" method of the +LogCategory class to create this new category. For example, if you +wanted to create a category of Logger for every deployed module, then +assuming you have the moduleId information you could do something as +follows to create a category: + + String moduleId = "mymodule"; + LogCategory generatedCategory = LogCategory.OPENEJB.createChild(moduleId); + + +<a name="Logging- Logger"></a> +### Logger + +The preference is to externalize all logging messages in properties file. +Typically each package should have a file called Messages.properties. +This file should have all the keys and the corresponding messages. +Here are the steps you would follow to log a message: +* For each message you need to log, you would open the Messages.properties +file in the corresponding package and add a key-value pair for the +message. For example, if you were authoring a class called +org.apache.openejb.util.Connect, then you would add a key-value pair to the +Messages.properties file located in the org.apache.openejb.util package. + +* Obtain a Logger instance in one of the following ways: + + +*Using the package name* + + Logger logger = Logger.getInstance (LogCategory.OPENEJB, +"org.apache.openejb.util"); + + * +Using the Class* + + Logger logger = Logger.getInsance(LogCategory.OPENEJB, Connect.class); + + +*Get a child Logger for an existing Logger instance* + + Logger logger = Logger.getInsance(LogCategory.OPENEJB, Connect.class); + Logger child = logger.getChildLogger("shutdown"); + + +*Get a child Logger of an existing Logger using a LogCategory* + + LogCategory childCategory = LogCategory.OPENEJB.createChild("shutdown"); + Logger logger = Logger.getInstance(childCategory,Connect.class); + +* Call one of the following methods passing in the key as an argument +** debug +** error +** fatal +** info +** warning + + + Logger logger = Logger.getInstance(LogCategory.OPENEJB,Connect.class); + logger.info("error.file"); + + The +Messages.properties file under org.apache.openejb.util must have the +"error.file" key in it with the corresponding message. + +<a name="Logging-LoggerInheritance "></a> +### Logger Inheritance + + Another interesting feature of the Logging framework is inheritance. +Here is how it works: + +Say you have the following Messages.properties files in the classpath. +1. org/apache/openejb/Messages.properties +1. org/apache/openejb/core/Messages.properties +1. org/apache/openejb/core/stateless/Messages.properties + + + +Then you have a class such as +org.apache.openejb.core.stateless.StatelessContainer (+note the package+) +If that class referenced a message key "classNotFound" for example, the +Logger would look for the message first in Messages.properties 3, then 2, +then 1 and so on until it found the required message. +This would allow better reuse of messages, more flexibility in where we put +the Message.properties files, as well as the added bonus in that we +no longer need to pass in the location of where our +Message.properties file is + +<a name="Logging-Loggingforintegrators"></a> +### Logging for integrators + +If you want to embed OpenEJB in your application and need to control the +logging configuration of OpenEJB, simple set the openejb.logger.external +system property to true. Now, its your applications' responsibility to +configure logging, OpenEJB will simply use your configuration. + +<a name="Logging- OriginationoftheLoggingIdea"></a> +### Origination of the Logging Idea + +There has been a long discussion for this logging idea. Its going to be +worth it to read the discussion at [i18n and logging](http://www.nabble.com/i18n-and-logging-tf3962134s2756.html) + ++Here is a extract from an email from David Blevins which talks about the +existing logging framework. The current framework is more or less the same +as this one, just some added features and a rewrite of the API+ + +Each module has a file called default.logging.conf. This file contains the +definition of all Loggers, their appenders and warning levels. However, we +do not use default.logging.conf first. The basic idea is that first we look +for say conf/logging.conf in the openejb.base directory. If we don't +find it there, we look for default.logging.conf in the classpath. If +we did find default.logging.conf (which we should) and there is an +openejb.base/conf/ directory then expand the default.logging.conf to +openejb.base/conf/logging.conf where we expected to find the file in the +first place. If there was no openejb.base/conf/ directory, then it's +safe to assume we're running embedded (in a test case perhaps) and just use +the default.logging.conf and do no extra work. + +We have default.logging.conf which we use this way as well as +default.openejb.conf and now more recently users.properties and +groups.properties. We search on disk for the resource in +openejb.base/conf/ if we don't find them we unpack the default one we +stuffed in openejb-core jar and extract it to disk in the openejb.base/conf +directory if there is one \-\- if there isn't one we just use the default +file. + +The basic ideas behind the pattern are that: + 1. If you've messed up your configuration, just delete or rename the +respective files in your conf/ directory and new (working) ones will +magically appear. + 2. When upgrading its nice that our zip file won't overwrite any +existing files in conf/ + 3. If you're running embedded you don't have to setup any +directories or have any config files, we can run on defaults. + +The *ConfUtils.getConfResource* utility to do that pattern generically , +but so far we're only using it for the users.properties and +groups.properties files. We should be using it everywhere. + Having the code in multiple places has lead to some inconsistencies +such as we expand the default.openejb.conf file to conf/openejb.xml (not +even the same file extension). We really don't need the "default" +part in our file names and the lingering usage of the "conf" file extension +is something that needs to go bye-bye \-\- we should use properties for +properties files and xml for xml files, etc. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/mastering-the-command-line.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/mastering-the-command-line.mdtext b/src/main/jbake/content/dev/mastering-the-command-line.mdtext new file mode 100644 index 0000000..bed5666 --- /dev/null +++ b/src/main/jbake/content/dev/mastering-the-command-line.mdtext @@ -0,0 +1,97 @@ +# Linux/OSX awesomeness + +Not specific to this projec, but can be incredibly useful ways to maximizes your time. Mastering the command line is the best way to get things done, quick and cheaply. + +Reapeat after me: + + - I will write a script for any tasks I do regularly + +# Core commands + +Some very big time-saving commands + +## In shell scripts + + - **basename** - what is the file name again? not the path, just the file name + - **dirname** - what directory is this in? + - **readllink -f** - what is the absolute path of this file? + - **cat** - spit out the contents of one or more files + - **cp** - copy file or dir + - **scp** - copy file or dir to another machine + - **rsync** - both the above, but so much more awesome + - rsync -av here there + - rsync -e ssh -av here user@host:there + - **cut** - wish I could i could chop out this column in the middle here + - **date** - would be nice if I had some way to make this log file name a little more unique + - **echo** - System.out.println() + - **xargs** - can be useful but doesn't respect paths with spaces. I only use it sometimes + - **find** - find some files and potentially execute a command against them + - **egrep** - search for text in a file or from STDIN. better than grep + - **mkdir** - makes a dir, with -p will make parent dirs too + - **mv** - move a file + - **head** - spit out the first N lines of a file + - **tail** - spit out the last N lines of a file + - **tee** - I want to see the output of this command, but I also want to write it to a file. Oh! tee is awesome! + - **perl** - edit a stream: cat file.txt + - edit a file: perl -i -pe 's/this/that/' + - **pwd** - where am I? + - **rm** - delete + - **read (bash)** - I dig this out for strings with spaces. paths have spaces in them sometimes + - ls *.txt + - find . -name "*.txt" + - **export (bash)** - why can't my script find this command? i use this to debug scripts 'export > /tmp/script-env.txt' + - **for (bash)** - my favorite bash construct + - for n in one two three; do echo "$n"; done + - (side note, always quote your variables like "$n" vs $n, trust me it's a good habit) + - **while (bash)** - my second favorite bash construct + - loop forever and do something: while true; do my_command; sleep 10; done + - **sleep** - Thread.sleep(). Only accepts seconds. I typically do the math with bash sytax + - sleep for an hour: sleep $(( 60 * 60 )) + - sleep for a day: sleep $(( 60 * 60 * 24 )) + - **sort** - sort lines of text + - **uniq** - trim out the duplicates + - show me only things that had duplicates: uniq -d + - ( I always 'sort + - **ssh** - awesomeness. can execute commands remotely too + - ssh people.apache.org pwd + - ssh people.apache.org 'pwd + - **sudo** - I wish I were a fish. I wish I were a fish. + - **tar** - package up some stuff + - **wget** - download this url + - wget http://apache.org + - wget -q -O - http://apache.org + - **tr** - echo $PATH + - **uname** - what system am I on? + +## OSX commands + + - **pbpaste** - paste the contents of the clipboard to stdout + - **pbcopy** - copy stdin to the clipbboard + +## running shell scripts + + - **bash** - quick way to run a script if it isn't already executable + - **chmod** - this file should be executable + - **clear** - my terminal is messy + - **diff/patch** - comparing or merging file contents + - **ps/kill** - my script is running too long, i want to force it to stop + - **less** - paging through command line output + - **nohup** - I don't want this script to die if my connection is interrupted + - **which** - where does this command live? + - **crontab** - schedule something to run regularly (i use 'bash -l foo.sh' to run stuff in my crontab file) + - **shutdown** - shutdown or restart a machine + - **top** - what the heck is chewing up my cpu? + - **uname** - what system am I on? + +# I never use + +Some people like it. +sed -- i always use "perl -pe 's/find/replace/'") + +Getting used to using perl is better. This page was originally written thinking markdown had table support +like confluence does. Soo all lines where using "| command | description |" formatting. Markdown doesn't +have that, so I changed it to a list syntax with the following command on my mac: + +`pbpaste | perl -ne '@f = split(" *\\| *", $_); print " - **$f[1]** - $f[2]\n"' | pbcopy` + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/october2007.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/october2007.mdtext b/src/main/jbake/content/dev/october2007.mdtext new file mode 100644 index 0000000..e650b18 --- /dev/null +++ b/src/main/jbake/content/dev/october2007.mdtext @@ -0,0 +1,8 @@ +Title: October2007 +OpenEJB 3.0 beta 1 released. +First contribution from Jonathan Gallimore. (was anything checked in, if +not yank this line) +Completed Export Control (Cryptography) process. +Completed integration with Tomcat 6. +Expanded documentation and examples. +Activity on the user list has increased slightly since the release. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/october2008.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/october2008.mdtext b/src/main/jbake/content/dev/october2008.mdtext new file mode 100644 index 0000000..7d383f0 --- /dev/null +++ b/src/main/jbake/content/dev/october2008.mdtext @@ -0,0 +1,36 @@ +Title: October2008 +The user base has grown significantly. The primary areas seem to be people +replacing the JBoss Embedded platform with OpenEJB as an embedded container +for either testing or Swing/GUI work and people using OpenEJB in Tomcat for +web work. There have also been some reports of very large applications +getting ported to OpenEJB. External signs of adoption have increased as +well with some OpenEJB users popping up in other communities such as Maven +asking for OpenEJB focused improvements in their tools, a half dozen or so +very favorable blog entries from people outside the project and a recent +thread on TheServerSide where many users expressed they were considering +leaving Spring for OpenEJB/Tomcat or Glassfish. + +Development on the OpenEJB Eclipse Plugin continues strong. The +still-in-development Eclipse plugin is attracting some interest and has +already received some contributions from at least two different +individuals. Thanks goes out to Jonathan Gallimore for not succumbing to +post-commit-status burnout as so many people do when first getting commit. +The dedication is noted. Other larger areas of development have been a +total overhaul of the client/server aspect of OpenEJB, first in the request +speed and throughput and secondly in request failover and retry. This had +been a weak area for the project and these improvements will likely +increase the number of people using the standalone version of OpenEJB +(current major areas of use are embedded and Tomcat). Some experimental +work on integrating OpenEJB with Spring has been done which when completed +should prove to be a compelling feature. + +Support for EJB 3.1 is underway. Full support for the proposed Singleton +bean type has been added, which to our knowledge is the only implementation +in the market currently. This should drive some EJB 3.1 early adopters to +the project and serve as a good tool for getting feedback for the EJB 3.1 +spec. + +The OpenEJB 3.1 release is up for a vote and if all goes well will be final +in a few days. It's been a bit too long since our last release in April. +Hopefully after 3.1 is released we can get back into the frequent release +rhythm we had throughout the betas and up until 3.0 final. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/october2009.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/october2009.mdtext b/src/main/jbake/content/dev/october2009.mdtext new file mode 100644 index 0000000..0169b0d --- /dev/null +++ b/src/main/jbake/content/dev/october2009.mdtext @@ -0,0 +1,4 @@ +Title: October2009 +Release 3.1.2 +Eclipse Plugin 1.0.0 alpha release +More EJB 3.1 activity http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/openejb-release-process.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/openejb-release-process.mdtext b/src/main/jbake/content/dev/openejb-release-process.mdtext new file mode 100644 index 0000000..2934d99 --- /dev/null +++ b/src/main/jbake/content/dev/openejb-release-process.mdtext @@ -0,0 +1,278 @@ +Title: OpenEJB Release Process + + Note: This information is largely obsolete and remains here for reference only. + +{code:none} +mvn release:prepare -Dusername=dblevins -Dassemble + + + {code:none} + mvn release:perform -Dassemble -Dusername=dblevins +-DaltDeploymentRepository=dblevins::default::scp://people.apache.org/x1/home/dblevins/public_html/stage +-Dgpg.passphrase=xxxxx + + + + mvn clean deploy -Prelease -Dassemble -Dusername=dblevins +-DaltDeploymentRepository=dblevins::default::scp://people.apache.org/x1/home/dblevins/public_html/stage/repo +-Dgpg.passphrase=xxxxx + + +1. Create a copy of the trunk the branch will be based on. + +{code:none} +svn copy -m "TomEE 1.5.1 branch" \ + https://svn.apache.org/repos/asf/tomee/tomee/trunk \ + https://svn.apache.org/repos/asf/tomee/tomee/branches/tomee-1.5.1 + + +# Merging things from trunk to the branch + + While fixing issues in the branch and trunk in parallel it may happen that +some changes in trunk have not been applied to the branch. Provided you're +in the branch's directory the following command applies a change from the +trunk to the branch (`{-c 575845`} is the commit number with the fix and +the url points to a repo the change is in). + + {code:none} + svn merge -c 575845 https://svn.apache.org/repos/asf/tomee/tomee/trunk + + +Here's a little script that can make merging easier + + + #!/bin/bash + + for n in $@; do + m=$(($n -1)) + LOG=/tmp/svn-commit-r$n.log + + cat /dev/null > $LOG + + echo "Merging r$n - http://svn.apache.org/viewvc?rev=$n&view=rev" >> $LOG + echo "" >> $LOG + echo "svn merge -r $m:$n +https://svn.apache.org/repos/asf/tomee/tomee/trunk ." >> $LOG + echo "" >> $LOG + svn log -r$n https://svn.apache.org/repos/asf/tomee/tomee/trunk >> +$LOG + + svn merge -r $m:$n +https://svn.apache.org/repos/asf/tomee/tomee/trunk . && + svn ci -F $LOG + echo "$n merged" + done + + +<a name="OpenEJBReleaseProcess-Aggregationintoastage/3.xdirectory"></a> +# Aggregation into a stage/3.x directory + + + #!/bin/bash + + VER=3.0 + + function package () { + SOURCE=$1; DEST=${2:-$SOURCE} + tar czf $DEST.tar.gz $SOURCE + zip -9rq $DEST.zip $SOURCE + } + function shash { + openssl $1 < $2 > $2.$1 ; + } + function sign { + archive=$1 + gpg --armor --output $archive.asc --detach-sig $archive + gpg --verify $archive.asc $archive + } + + function fail () { echo $1 >&2; exit 1;} + + + mkdir $VER + (cd $VER + + svn export +http://svn.apache.org/repos/asf/openejb/tags/openejb-$VER/examples +openejb-examples-$VER + package openejb-examples-$VER && rm -r openejb-examples-$VER + + svn export http://svn.apache.org/repos/asf/openejb/tags/openejb-$VER +openejb-$VER-src + package openejb-$VER-src && rm -r openejb-$VER-src + + for archive in *.{zip,tar.gz}; do + echo $archive + shash md5 $archive + sign $archive + done || fail "Unable to sign or hash release archives" + ) + + scp -r $VER people.apache.org:public_html/stage/ + + # Copy standalone assembly in + + ssh people.apache.org "cp +~/public_html/stage/repo/org/apache/openejb/openejb-standalone/$VER/openejb-standalone-$VER.{zip,tar.gz}{,.asc,.md5} +~/public_html/stage/$VER/" + + + echo $VER | ssh people.apache.org 'read VER && for n in +~/public_html/stage/repo/org/apache/openejb/openejb-standalone/$VER/openejb-standalone-$VER.{zip,tar.gz}{,.asc,.md5}; +do cp $n ~/public_html/stage/$VER/$(basename +${n/openejb-standalone-$VER/openejb-$VER}); done' + + # Copy tomcat webapp assembly in + + echo $VER | ssh people.apache.org 'read VER && for n in +~/public_html/stage/repo/org/apache/openejb/openejb-tomcat-webapp/$VER/openejb-tomcat-webapp-$VER.war{,.asc,.md5}; +do cp $n ~/public_html/stage/$VER/$(basename ${n/-tomcat-webapp-$VER/}); +done' + + +<a name="OpenEJBReleaseProcess-Releasenotes"></a> +# Release notes + + + #set( $rpc = +$xmlrpc.connect("dblevins:xxxxx","http://issues.apache.org/jira/rpc/xmlrpc") +) + #set( $version = $rpc.getVersion("OPENEJB", "3.0") ) + #set ( $versionId = $version.id ) + #set ( $jira = +$rss.fetch("http://issues.apache.org/jira/secure/IssueNavigator.jspa?view=rss&&pid=12310530&status=5&status=6&fixfor=${versionId}&tempMax=1000&reset=true&decorator=none") +) + #set( $issues = $jira.issues ) + + Apache OpenEJB $version + + $date + + New Features: + + #foreach ( $issue in $issues.equals("type", "New Feature").descending("id") +) + * [$issue.key] + $issue.summary + #end + + Improvements: + + #foreach ( $issue in $issues.equals("type", "Improvement") ) + * [$issue.key] + $issue.summary + #end + + Bugs: + + #foreach ( $issue in $issues.equals("type", "Bug").sort("priority") ) + * [$issue.key] + $issue.summary + #end + + Tasks & Sub-Tasks: + + #foreach ( $issue in $issues.equals("type", "Task").sort("summary") ) + * [$issue.key] + $issue.summary + #end + #foreach ( $issue in $issues.equals("type", "Sub-task").sort("summary") ) + * [$issue.key] + $issue.summary + #end + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Unimplemented Features, bugs, limitations + + #set ( $jira = +$rss.fetch("http://issues.apache.org/jira/secure/IssueNavigator.jspa?view=rss&&pid=12310530&status=1&status=3&status=4&version=${versionId}&tempMax=1000&reset=true&decorator=none") +) + #set( $issues = $jira.issues ) + + #foreach ( $issue in $issues.sort("priority") ) + * [$issue.key] + $issue.summary + #end + + + +<a name="OpenEJBReleaseProcess-README.htmlfile"></a> +# README.html file + +some way to dynamically update this would be great. + +{code:html} +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML><HEAD><TITLE>Apache OpenEJB 3.0</TITLE> +<META http-equiv=Content-Type content="text/html"> +</HEAD> +<BODY> +<P> +<H3>Apache OpenEJB 3.0</H3> +<P></P> + +<p>Packaging Details (or "What Should I Download?") + <ul> + <li> + OpenEJB Standlone Server: + <ul> + <li><a href="openejb-3.0.zip">openejb-3.0.zip</a></li> + <li><a href="openejb-3.0.tar.gz">openejb-3.0.tar.gz</a></li> + </ul> + </li> + <li> + OpenEJB for Tomcat 6 or Tomcat 5.5: + <ul> + <li><a href="openejb.war">openejb.war</a></li> + </ul> + </li> + <li> + EJB 3.0 and other examples: + <ul> + <li><a +href="openejb-examples-3.0.zip">openejb-examples-3.0.zip</a></li> + <li><a +href="openejb-examples-3.0.tar.gz">openejb-examples-3.0.tar.gz</a></li> + </ul> + </li> + <li> + Source: + <ul> + <li><a +href="openejb-3.0-src.zip">openejb-3.0-src.zip</a></li> + <li><a +href="openejb-3.0-src.tar.gz">openejb-3.0-src.tar.gz</a></li> + </ul> + </li> + </ul> +</p> + +<P>Thank you for using <A href="http://tomee.apache.org/">OpenEJB</A>!. +</P> +<P><B>The Apache OpenEJB Project</B> <BR><A +href="http://tomee.apache.org/">http://tomee.apache.org/</A> </P> +<P> +<P></P></BODY></HTML> + + +# Publishing + + When all voting is done + + {code:none} + mvn stage:copy -Dsource="http://people.apache.org/~dblevins/stage/repo/" \ + +-Dtarget="scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository" +\ + -DsourceRepositoryId=apache.staging \ + -DtargetRepositoryId=apache.releases \ + -Dversion=3.0 + + +{code:none} + +$ mv 3.0 /www/www.apache.org/dist/openejb/ + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/b34e23c0/src/main/jbake/content/dev/proxies.mdtext ---------------------------------------------------------------------- diff --git a/src/main/jbake/content/dev/proxies.mdtext b/src/main/jbake/content/dev/proxies.mdtext new file mode 100644 index 0000000..f08659d --- /dev/null +++ b/src/main/jbake/content/dev/proxies.mdtext @@ -0,0 +1,34 @@ +Title: Proxies +<a name="Proxies-Where'stheJavasourcefortheproxies?"></a> +# Where's the Java source for the proxies? + +The short answer is we do not generate java code containing any ejb logic +at all as other platforms like WebSphere and WebLogic do. We use dynamic +proxy generation via java.lang.reflect.Proxy. + +Most of the commercial platforms predate dynamic proxy generation and not +only statically generate java files which are then compiled and included in +the app but decided as long as they were generating java files that they +would jam-pack them with as many optimizations as they could. The result +was that significant portions of your application data such as transaction +attributes and database queries were stuck in generated vendor code. We +don't have any equivalent to that. + +Dynamic proxies such as java.lang.reflect.Proxy or cglib byte code in +memory, not java source, which is immediately turned into a class +definition and used. The basic paradigm is that you give the library the +interfaces you want implemented and some sort of Handler object. The +library will give you back a proxy instance that does nothing more than +call your handler every time a method is called. Now it's possible with +some trickery to pull the byte code for any java.lang.Class instance out of +the classloader and then use some sort of java decompiler library to turn +that into some sort of java source file, however there's no real motivation +to do so as the VM generated proxies are quite dumb and the code that does +all the work is not generated and available for download or svn checkout. + +If you are coming from a commercial vendor and simply looking for a good +place to begin your debugging, look for implementations +java.lang.reflect.InvocationHandler and slap a breakpoint in the "invoke" +method and you'll be all set. + +
