-
Notifications
You must be signed in to change notification settings - Fork 2
Compiling from github
Since 0.2 version the couchbase-manager is [mavenized] (http://maven.apache.org/) so the compilation is more or less easy but you need maven installed in your laptop (I am using now maven package from debian, version 3.0.4). The manager was created for glassfish v3 but in June 2013 Oracle released the new version 4.0 (JavaEE 7 reference implementation) and last commits let compile the manager for v3 or v4 versions. Version 0.3 of the manager will be distributed for 3.1.2.2 and 4.0 glassfish versions.
The steps to compile the couchbase-manager for glassfish v3 (it uses 3.1.2.2 maven repository) are the following:
-
Clone the repository:
git clone https://github.com/rickyepoderi/couchbase-manager.git
cd couchbase-manager/
-
Compile and package the manager (this step is quite long cos a lot of dependencies are downloaded). The version for v3 is the default profile right now, so no profile is specified. Besides tests should be skipped (you need to install the manager in a glassfish server to test the manager, see below).
mvn -Dmaven.test.skip=true package
-
If you want to compile the manager for glassfish 4.0 the profile V4 should be specified in the command.
mvn -P V4 -Dmaven.test.skip=true package
-
The couchbase-manager-X.X.X.jar is generated in the target directory. Now you can install it following [the installation instructions] (Installation). Take in mind that now dependencies can be different, they will depend on current maven file.
-
For cleaning the environment just execute the clean command (the documentation is placed into target/site/apidocs/ directory). You can use the profile option to mark the glassfish version (-P V4 or -P V3, the default is the former).
mvn clean
-
If you want to produce the javadoc information just perform the following command.
mvn javadoc:javadoc
The maven file has some testing prepared but tests need some pre-configuration. The instructions are assuming that glassfish (3.1.2.2 or 4.0) and couchbase are installed in the same box (localhost).
-
The couchbase-manager should be installed inside the glassfish container, please follow [the instructions] (Installation).
-
Download and install the manager-test.war application from [here] (https://sourceforge.net/projects/couchbase-mngr/files/manager-test/). That application by default is configured to use non-sticky configuration against a default couchbase installation in localhost. The deployment example is done against the default target in glassfish.
cd <GLASSFISH_V3_V4_HOME>/bin
./asadmin deploy --availabilityenabled=true <DOWNLOAD_DIR>/manager-test.war
-
Now the test application can be tested manually. The manager-test is a normal web application that can be accessed using default glassfish ports:
-
Right now the web application has four different tests. The first one is just the infamous hajsp that let you add string session attributes. The second is a test for a JSF bean which uses a EJB using CDI (@Named and @Inject). The third is the same but not using CDI (@ManagedBean and @EJB). The last link is just a protected page using file realm (previous tests use the principal if logged).
-
In order to test the protected page login into glassfish console (http://localhost:4848) and add a user in the realm: Configurations → server-config → Security → Realms → file. Click manage users button and add a username and password. The user must belong to a group called allusers. Once this is done the protected web page should work.
-
Finally the application has some Web Services that are used by the maven tests. So once the application is deployed and it is working you can execute maven tests against the test application. There are four groups of tests: blocking (tests which uses several inner threads to do blocks), refresh-update (tests for session updates), create-delete (tests for session creation and invalidation) and performance (long tests for performance). Examples for different tests are shown below (only one group, three of them and all tests -quite long-):
mvn test -Dgroups=blocking -DbaseUrl="http://localhost:8080/manager-test/SessionTest?wsdl"
mvn test -Dgroups=blocking,refresh-update,create-delete -DbaseUrl="http://localhost:8080/manager-test/SessionTest?wsdl"
mvn test -DbaseUrl="http://localhost:8080/manager-test/SessionTest?wsdl"
How to install it?
Sticky vs Non-Sticky
[External atttibutes] (wiki/External-Attributes)
[JavaEE session listeners] (wiki/JavaEE-Session-Listeners)
[Compiling from github] (wiki/Compiling-from-github)
couchbase-manager-0.1
couchbase-manager-0.2
couchbase-manager-0.3
couchbase-manager-0.4
couchbase-manager-0.5