JBoss EAP 7 Beta is now 출시, many congratulations to Red Hat and particularly to the WildFly team! There are plenty of improvements coming in this release as documented in 릴리스 정보. One of the major themes is Java EE 7 compliance.
JBoss EAP 7 and Java EE 7
IBM and Oracle already provide commercially supported Java EE 7-compliant Application Servers. And now Red Hat will be joining this party soon as well. Although WildFly has supported Java EE 7 for 2+ years but commercial support is a critical for open source to be adopted enterprise-wide. So this is good news! You can learn all about different Java EE 7 APIs in the DZone Refcardz that I authored along with @alrubinger.
There are plenty of “hello world” Java EE 7 Samples that should all run with JBoss EAP. Hopefully somebody will update the pom.xml
and add a new profile.
Why NoSQL?
If you are building a traditional enterprise application then you might be fine using an RDBMS. There are plenty of advantages of using RDBMS but using a NoSQL database instead has a few advantages:
- No need to have a pre-defined schema and that makes them a schema-less database. Addition of new properties to existing objects is easy and does not require ALTER TABLE. The unstructured data gives flexibility to change the format of data any time without downtime or reduced service levels. Also there are no joins happening on the server because there is no structure and thus no relation between them.
- Scalability, agility and performance is more important than the entire set of functionality typically provided by an RDBMS. This set of databases provide eventual consistency and/or transactions restricted to single items but more focus on CRUD.
- NoSQL are designed to scale-out (horizontal) instead of scale-up (vertical). This is important knowing that databases, and everything else as well, is moving into the cloud. RBDMS can scale-out using sharding but requires complex management and not for the faint of heart. Queries requiring JOINs across shards is extremely inefficient.
- RDBMS have impedance mismatch between the database structure and the domain classes. An Object Relational Mapping, such as one provided by Java Persistence API or Hibernate is needed in such case.
- NoSQL databases are designed for less management and simpler data models lead to lower administration cost 도 마찬가지입니다.
So you are all excited about NoSQL now and want to learn more:
In short, there are four different types of NoSQL databases:
- 문서: Couchbase, Mongo, and others
- Key/Value: Couchbase, Redis, and others
- 그래프: Neo4J, OrientDB, and others
- 칼럼: Cassandra and others
Java EE 7 provides Java Persistence API that does not provide any support for NoSQL. So how do you get started with NoSQL with JBoss EAP 7? This blog will show how to query a Couchbase database using simple Java EE application deployed on JBoss EAP 7 Beta.
카우치베이스란 무엇인가요?
카우치베이스 is an open-source, NoSQL, document database. It allows to access, index, and query JSON documents while taking advantage of integrated distributed caching for high performance data access. Developers can write applications to Couchbase using different languages (Java, Go, .NET, Node, PHP, Python, C) multiple SDKs. This blog will show how you can easily create a CRUD application using Java SDK for Couchbase.
Run JBoss EAP 7
There are two ways to start JBoss EAP 7.
Download and Run
- 다운로드 JBoss EAP 7 Beta and unzip.
- Start the application server as:
1234567891011121314151617181920./jboss-eap-7.0/bin/독립형.sh=========================================================================JBoss 부트스트랩 환경JBOSS_HOME: /사용자/arungupta/도구/jboss-eap-7.0JAVA: 자바JAVA_OPTS: -서버 -verbose:gc -Xloggc:"/Users/arungupta/tools/jboss-eap-7.0/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -Djava.net.preferIPv4Stack=true -Djboss.모듈.시스템.pkgs=org.jboss.바이트맨 -Djava.awt.헤드리스=true=========================================================================21:22:58,773 정보 [org.jboss.모듈] (메인) JBoss Modules 버전 1.4.4.Final-redhat-1. . .21:23:21,441 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0060: Http 관리 인터페이스 듣기 on http://127.0.0.1:9990/management21:23:21,442 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0051: 관리자 콘솔 듣기 on http://127.0.0.1:999021:23:21,442 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0025: EAP 7.0.0.Beta1 (WildFly 핵심 2.0.3.Final-redhat-1) 시작 in 22950ms - 시작됨 261 의 509 서비스 (332 서비스 는 게으른, 패시브 또는 on-수요)
Docker Run
In a containerized world, you just 도커 실행
to run your JBoss EAP. However, JBoss EAP image does not exist on 도커 허브 and so the image needs to be explicitly built. You still need to explicitly download JBoss EAP and then use the following 도커파일 to build the image:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use latest jboss/base-jdk:8 image as the base FROM jboss/base-jdk:8 # Set the JBOSS_VERSION env variable 환경 JBOSS_버전 7.0.0.Beta 환경 JBOSS_HOME /opt/jboss/jboss-eap-7.0/ COPY jboss-eap-$JBOSS_VERSION.zip $홈 # Add the JBoss distribution to /opt, and make jboss the owner of the extracted zip content # Make sure the distribution is available from a well-known place RUN cd $홈 && 압축 해제 jboss-eap-$JBOSS_VERSION.zip && rm jboss-eap-$JBOSS_VERSION.zip # Ensure signals are forwarded to the JVM process correctly for graceful shutdown 환경 LAUNCH_JBOSS_IN_BACKGROUND true # Expose the ports we're interested in EXPOSE 8080 9990 # Set the default command to run on boot # This will boot JBoss EAP in the standalone mode and bind to all interface CMD ["/opt/jboss/jboss-eap-7.0/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"] |
The image is built as:
1 |
도커 빌드 -t arungupta/jboss-eap:7-베타 . |
And then you can run the JBoss EAP 7 container as:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
도커 실행 -it -p 8080:8080 arungupta/jboss-eap:7-베타 ========================================================================= JBoss 부트스트랩 환경 JBOSS_HOME: /opt/jboss/jboss-eap-7.0/ JAVA: /usr/lib/jvm/자바/bin/자바 JAVA_OPTS: -서버 -verbose:gc -Xloggc:"/opt/jboss/jboss-eap-7.0//standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -Djava.net.preferIPv4Stack=true -Djboss.모듈.시스템.pkgs=org.jboss.바이트맨 -Djava.awt.헤드리스=true ========================================================================= 20:51:12,551 정보 [org.jboss.모듈] (메인) JBoss Modules 버전 1.4.4.Final-redhat-1 20:51:12,824 정보 [org.jboss.msc] (메인) JBoss MSC 버전 1.2.6.Final-redhat-1 . . . 20:51:16,750 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0060: Http 관리 인터페이스 듣기 on http://0.0.0.0:9990/management 20:51:16,758 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0051: 관리자 콘솔 듣기 on http://0.0.0.0:9990 20:51:16,759 정보 [org.jboss.as] (컨트롤러 부팅 스레드) WFLYSRV0025: EAP 7.0.0.Beta1 (WildFly 핵심 2.0.3.Final-redhat-1) 시작 in 4529ms - 시작됨 261 의 509 서비스 (332 서비스 는 게으른, 패시브 또는 on-수요) |
Notice, how application and management ports are bound to all network interfaces. This will simplify to deploy the application to this JBoss EAP instance later. Stop the server as we will show an easier way to start it later.
Start Application Server and Database
The Java EE application will provide a HTTP CRUD interface over JSON documents stored in Couchbase. The application itself will be deployed on JBoss EAP 7 Beta. So it would require to start Couchbase and JBoss EAP. Use the Docker Compose file from github.com/arun-gupta/docker-images/blob/master/jboss-eap7-nosql/docker-compose.yml to start Couchbase and JBoss EAP 7 container:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mycouchbase: 컨테이너_이름: "db" 이미지: 카우치베이스/서버 포트: - 8091:8091 - 8092:8092 - 8093:8093 - 11210:11210 jboss: 이미지: arungupta/jboss-eap:7-베타 환경: - COUCHBASE_URI=db 포트: - 8080:8080 - 9990:9990 |
The application is started as:
1 2 3 4 |
도커-작성 --x-네트워킹 up -d 만들기 네트워크 "jbosseap7nosql" 와 함께 드라이버 "없음" 시작 jbosseap7nosql_jboss_1 만들기 db |
The started containers can be seen as:
1 2 3 4 |
도커 ps 컨테이너 ID 이미지 COMMAND 생성됨 상태 포트 이름 154436dfbfb1 카우치베이스/서버 "/entrypoint.sh couch" 10 초 전 Up 8 초 0.0.0.0:8091-8093->8091-8093/tcp, 11207/tcp, 11211/tcp, 18091-18092/tcp, 0.0.0.0:11210->11210/tcp db cb76d4e38df3 arungupta/jboss-eap:7-베타 "/opt/jboss/jboss-eap" 10 초 전 Up 9 초 0.0.0.0:8080->8080/tcp, 0.0.0.0:9990->9990/tcp jbosseap7nosql_jboss_1 |
카우치베이스 서버 구성
Clone couchbase-javaee application. This Java EE application uses Couchbase Java SDK APIs to connect to the Couchbase server. The bootstrap code is:
1 |
카우치베이스클러스터.create(시스템.getenv("couchbase_uri")); |
and is invoked from Database abstraction. Couchbase Server can be configured using REST API. These REST APIs are defined in a Maven profile in pom.xml
of this application. And so configure Couchbase server as:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
mvn 설치 -Pcouchbase -Ddocker.호스트=$(도커-machine IP 카우치베이스) [정보] 스캔 에 대한 프로젝트... [정보] [정보] ------------------------------------------------------------------------ [정보] 빌딩 카우치베이스-javaee 1.0-스냅샷 [정보] ------------------------------------------------------------------------ [정보] [정보] --- maven-리소스-플러그인:2.6:리소스 (기본값-리소스) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] 복사 0 리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:컴파일 (기본값-컴파일) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-리소스-플러그인:2.6:testResources (기본값-testResources) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] skip 비 기존 resourceDirectory /사용자/arungupta/작업 공간/카우치베이스-javaee/src/테스트/리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:testCompile (기본값-testCompile) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-surefire-플러그인:2.12.4:테스트 (기본값-테스트) @ 카우치베이스-javaee --- [정보] [정보] --- maven-전쟁-플러그인:2.1.1:전쟁 (기본값-전쟁) @ 카우치베이스-javaee --- [정보] Packaging 웹앱 [정보] Assembling 웹앱 [카우치베이스-javaee] in [/사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee] [정보] 처리 전쟁 프로젝트 [정보] 복사 웹앱 리소스 [/사용자/arungupta/작업 공간/카우치베이스-javaee/src/메인/웹앱] [정보] Webapp assembled in [82 msecs] [정보] 빌딩 전쟁: /사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee.전쟁 [정보] [정보] --- maven-설치-플러그인:2.4:설치 (기본값-설치) @ 카우치베이스-javaee --- [정보] 설치 /사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee.전쟁 에 /사용자/arungupta/.m2/저장소/org/카우치베이스/샘플/카우치베이스-javaee/1.0-스냅샷/카우치베이스-javaee-1.0-스냅샷.전쟁 [정보] 설치 /사용자/arungupta/작업 공간/카우치베이스-javaee/pom.xml 에 /사용자/arungupta/.m2/저장소/org/카우치베이스/샘플/카우치베이스-javaee/1.0-스냅샷/카우치베이스-javaee-1.0-스냅샷.pom [정보] [정보] --- exec-maven-플러그인:1.4.0:exec (구성 메모리) @ 카우치베이스-javaee --- * 호스트 이름 는 NOT 발견 in DNS 캐시 * 시도 중 192.168.99.102... % 합계 % 수신됨 % Xferd 평균 속도 시간 시간 시간 현재 Dload 업로드 합계 소비 왼쪽 속도 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* 연결됨 에 192.168.99.102 (192.168.99.102) 포트 8091 (#0) > POST /풀/기본값 HTTP/1.1 > 사용자-에이전트: curl/7.37.1 > 호스트: 192.168.99.102:8091 > 수락: */* > 콘텐츠 길이: 36 > 콘텐츠 유형: application/x-www-form-urlencoded > } [data not shown] * 업로드가 완전히 전송되었습니다: 36바이트 중 36바이트 < http/1.1 200 ok * Server Couchbase Server is not blacklisted < 서버: 카우치베이스 서버 < 프래그마: 캐시 없음 < Date: Mon, 21 Dec 2015 21:35:10 GMT < 콘텐츠 길이: 0 < 캐시 제어: 캐시 없음 < 100 36 0 0 100 36 0 15510 --:--:-- --:--:-- --:--:-- 18000 * Connection #0 to host 192.168.99.102 left intact [INFO] [INFO] --- exec-maven-plugin:1.4.0:exec (Configure services) @ couchbase-javaee --- * Hostname was NOT found in DNS cache * Trying 192.168.99.102... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.99.102 (192.168.99.102) port 8091 (#0) > POST /node/controller/setupServices HTTP/1.1 > User-Agent: curl/7.37.1 > Host: 192.168.99.102:8091 > 수락을 클릭합니다: */* > 콘텐츠-길이: 26 > 콘텐츠-유형: 애플리케이션/x-www-양식-urlencoded > } [데이터 not 표시] * 업로드 완전히 보낸 꺼짐: 26 out 의 26 바이트 < HTTP/1.1 200 확인 * 서버 카우치베이스 서버 는 not 블랙리스트 < 서버: 카우치베이스 서버 < Pragma: 아니요-캐시 < 날짜: 월, 21 12월 2015 21:35:10 GMT < 콘텐츠-길이: 0 < 캐시-제어: 아니요-캐시 < 100 26 0 0 100 26 0 9976 --:--:-- --:--:-- --:--:-- 13000 * 연결 #0 to host 192.168.99.102 left intact [INFO] [INFO] --- exec-maven-plugin:1.4.0:exec (Setup credentials) @ couchbase-javaee --- * Hostname was NOT found in DNS cache * Trying 192.168.99.102... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.99.102 (192.168.99.102) port 8091 (#0) > POST /settings/web HTTP/1.1 > 사용자-에이전트: curl/7.37.1 > 호스트: 192.168.99.102:8091 > 수락: */* > 콘텐츠 길이: 50 > 콘텐츠 유형: application/x-www-form-urlencoded > } [data not shown] * 업로드가 완전히 전송되었습니다: 50바이트 중 50바이트 < http/1.1 200 ok * Server Couchbase Server is not blacklisted < 서버: 카우치베이스 서버 < 프래그마: 캐시 없음 < Date: Mon, 21 Dec 2015 21:35:10 GMT < 콘텐츠 유형: 애플리케이션/json < 콘텐츠 길이: 44 < 캐시 제어: 캐시 없음 < { [data not shown] 100 94 100 44 100 50 6880 7818 --:--:-- --:--:-- --:--:-- 8333 * Connection #0 to host 192.168.99.102 left intact {"newBaseUri":"http://192.168.99.102:8091/"}[INFO] [INFO] --- exec-maven-plugin:1.4.0:exec (Install travel-sample bucket) @ couchbase-javaee --- * Hostname was NOT found in DNS cache * Trying 192.168.99.102... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.99.102 (192.168.99.102) port 8091 (#0) * Server auth using Basic with user 'Administrator' > POST /sampleBuckets/install HTTP/1.1 > 인증: 기본 QWRtaW5pc3RyYXRvcjpwYXNzd29yZA== > User-Agent: curl/7.37.1 > Host: 192.168.99.102:8091 > 수락을 클릭합니다: */* > 콘텐츠-길이: 17 > 콘텐츠-유형: 애플리케이션/x-www-양식-urlencoded > } [데이터 not 표시] * 업로드 완전히 보낸 꺼짐: 17 out 의 17 바이트 < HTTP/1.1 202 수락됨 * 서버 카우치베이스 서버 는 not 블랙리스트 < 서버: 카우치베이스 서버 < Pragma: 아니요-캐시 < 날짜: 월, 21 12월 2015 21:35:11 GMT < 콘텐츠-유형: 애플리케이션/json < 콘텐츠-길이: 2 < 캐시-제어: 아니요-캐시 < { [데이터 not 표시] 100 19 100 2 100 17 41 355 --:--:-- --:--:-- --:--:-- 361 * 연결 #0 to host 192.168.99.102 left intact [][정보] ------------------------------------------------------------------------ [정보] 빌드 성공 [정보] ------------------------------------------------------------------------ [정보] 합계 시간: 2.094 s [정보] 완료 에서: 2015-12-21T13:35:11-08:00 [정보] 최종 메모리: 13M/309M [정보] ------------------------------------------------------------------------ |
Deploy Java EE Application to JBoss
Java EE Application can be easily deployed to JBoss EAP 7 Beta using the WildFly Maven Plugin. This is also defined as a Maven profile in pom.xml
as well. Deploy the application as:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
mvn 설치 -Pwildfly -Dwildfly.호스트 이름=$(도커-machine IP 카우치베이스) -Dwildfly.사용자 이름=관리자 -Dwildfly.비밀번호=관리자#007 [정보] 스캔 에 대한 프로젝트... [정보] [정보] ------------------------------------------------------------------------ [정보] 빌딩 카우치베이스-javaee 1.0-스냅샷 [정보] ------------------------------------------------------------------------ [정보] [정보] --- maven-리소스-플러그인:2.6:리소스 (기본값-리소스) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] 복사 0 리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:컴파일 (기본값-컴파일) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-리소스-플러그인:2.6:testResources (기본값-testResources) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] skip 비 기존 resourceDirectory /사용자/arungupta/작업 공간/카우치베이스-javaee/src/테스트/리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:testCompile (기본값-testCompile) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-surefire-플러그인:2.12.4:테스트 (기본값-테스트) @ 카우치베이스-javaee --- [정보] [정보] --- maven-전쟁-플러그인:2.1.1:전쟁 (기본값-전쟁) @ 카우치베이스-javaee --- [정보] Packaging 웹앱 [정보] Assembling 웹앱 [카우치베이스-javaee] in [/사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee] [정보] 처리 전쟁 프로젝트 [정보] 복사 웹앱 리소스 [/사용자/arungupta/작업 공간/카우치베이스-javaee/src/메인/웹앱] [정보] Webapp assembled in [62 msecs] [정보] 빌딩 전쟁: /사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee.전쟁 [정보] [정보] --- maven-설치-플러그인:2.4:설치 (기본값-설치) @ 카우치베이스-javaee --- [정보] 설치 /사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee.전쟁 에 /사용자/arungupta/.m2/저장소/org/카우치베이스/샘플/카우치베이스-javaee/1.0-스냅샷/카우치베이스-javaee-1.0-스냅샷.전쟁 [정보] 설치 /사용자/arungupta/작업 공간/카우치베이스-javaee/pom.xml 에 /사용자/arungupta/.m2/저장소/org/카우치베이스/샘플/카우치베이스-javaee/1.0-스냅샷/카우치베이스-javaee-1.0-스냅샷.pom [정보] [정보] >>> wildfly-maven-플러그인:1.1.0.Alpha4:배포 (기본값) > 패키지 @ 카우치베이스-javaee >>> [정보] [정보] --- maven-리소스-플러그인:2.6:리소스 (기본값-리소스) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] 복사 0 리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:컴파일 (기본값-컴파일) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-리소스-플러그인:2.6:testResources (기본값-testResources) @ 카우치베이스-javaee --- [정보] 사용 'UTF-8' 인코딩 에 복사 필터링됨 리소스. [정보] skip 비 기존 resourceDirectory /사용자/arungupta/작업 공간/카우치베이스-javaee/src/테스트/리소스 [정보] [정보] --- maven-컴파일러-플러그인:2.3.2:testCompile (기본값-testCompile) @ 카우치베이스-javaee --- [정보] Nothing 에 컴파일 - 모두 클래스 는 up 에 날짜 [정보] [정보] --- maven-surefire-플러그인:2.12.4:테스트 (기본값-테스트) @ 카우치베이스-javaee --- [정보] Skipping execution 의 surefire 왜냐하면 it has 이미 been 실행 에 대한 이 구성 [정보] [정보] --- maven-전쟁-플러그인:2.1.1:전쟁 (기본값-전쟁) @ 카우치베이스-javaee --- [정보] Packaging 웹앱 [정보] Assembling 웹앱 [카우치베이스-javaee] in [/사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee] [정보] 처리 전쟁 프로젝트 [정보] 복사 웹앱 리소스 [/사용자/arungupta/작업 공간/카우치베이스-javaee/src/메인/웹앱] [정보] Webapp assembled in [20 msecs] [정보] 빌딩 전쟁: /사용자/arungupta/작업 공간/카우치베이스-javaee/대상/카우치베이스-javaee.전쟁 [정보] [정보] <<< wildfly-maven-플러그인:1.1.0.Alpha4:배포 (기본값) < 패키지 @ 카우치베이스-javaee <<< [정보] [정보] --- wildfly-maven-플러그인:1.1.0.Alpha4:배포 (기본값) @ 카우치베이스-javaee --- 12월 21, 2015 1:43:34 PM org.xnio.Xnio 정보: XNIO 버전 3.3.1.Final 12월 21, 2015 1:43:34 PM org.xnio.nio.NioXnio 정보: XNIO NIO 구현 버전 3.3.1.Final 12월 21, 2015 1:43:34 PM org.jboss.remoting3.EndpointImpl 정보: JBoss Remoting 버전 4.0.9.Final [정보] Authenticating against 보안 영역: ManagementRealm [정보] ------------------------------------------------------------------------ [정보] 빌드 성공 [정보] ------------------------------------------------------------------------ [정보] 합계 시간: 17.010 s [정보] 완료 에서: 2015-12-21T13:43:48-08:00 [정보] 최종 메모리: 17M/217M [정보] ------------------------------------------------------------------------ |
Access the Application
As mentioned earlier, the application provides HTTP CRUD API over JSON documents stored in Couchbase. Access the application as:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
curl -v http://$(docker-machine ip couchbase):8080/couchbase-javaee/resources/airline * 호스트 이름 는 NOT 발견 in DNS 캐시 * 시도 중 192.168.99.102... * 연결됨 에 192.168.99.102 (192.168.99.102) 포트 8080 (#0) > GET /카우치베이스-javaee/리소스/항공사 HTTP/1.1 > 사용자-에이전트: curl/7.37.1 > 호스트: 192.168.99.102:8080 > 수락: */* > < HTTP/1.1 200 확인 < 연결: keep-살아있음 < X-전원-으로: 언더로우/1 * 서버 JBoss-EAP/7 는 not 블랙리스트 < 서버: JBoss-EAP/7 < 콘텐츠-유형: 애플리케이션/옥텟-스트림 < 콘텐츠-길이: 1402 < 날짜: 월, 21 12월 2015 21:45:40 GMT < * 연결 #0 to host 192.168.99.102 left intact [{"travel-sample":{"country":"미국","iata":"Q5","콜사인":"MILE-AIR","name":"40마일 에어","icao":"MLA","id":10,"type":"항공사"}}, {"travel-sample":{"country":"미국","iata":"TQ","콜사인":"TXW","name":"텍사스 윙","icao":"TXW","id":10123,"type":"항공사"}}, {"travel-sample":{"country":"미국","iata":"A1","콜사인":"atifly","name":"Atifly","icao":"A1F","id":10226,"type":"항공사"}}, {"travel-sample":{"country":"영국","iata":null,"콜사인":null,"name":"Jc royal.britannica","icao":"JRB","id":10642,"type":"항공사"}}, {"travel-sample":{"country":"미국","iata":"ZQ","콜사인":"LOCAIR","name":"Locair","icao":"LOC","id":10748,"type":"항공사"}}, {"travel-sample":{"country":"미국","iata":"K5","콜사인":"SASQUATCH","name":"씨포트 항공","icao":"SQH","id":10765,"type":"항공사"}}, {"travel-sample":{"country":"미국","iata":"KO","콜사인":"ACE AIR","name":"알래스카 센트럴 익스프레스","icao":"AER","id":109,"type":"항공사"}}, {"travel-sample":{"country":"영국","iata":"5W","콜사인":"FLYSTAR","name":"아스트라에우스","icao":"AEU","id":112,"type":"항공사"}}, {"travel-sample":{"country":"프랑스","iata":"UU","콜사인":"REUNION","name":"Air Austral","icao":"REU","id":1191,"type":"항공사"}}, {"travel-sample":{"country":"프랑스","iata":"A5","콜사인":"AIRLINAIR","name":"Airlinair","icao":"RLA","id":1203,"type":"항공사"}}] |
CRUD operations (GET, POST, PUT, DELETE) can be performed on Airline resource in the application. Complete CRUD API is documented at github.com/arun-gupta/couchbase-javaee. This blog explained how to access a NoSQL database from JBoss EAP 7. Read more about Couchbase 4:
- 카우치베이스 서버 4.1의 새로운 기능
- 카우치베이스 서버 문서
- Talk to us on 카우치베이스 포럼
- 팔로우 @couchbasedev 또는 @couchbase
Learn more about Couchbase in this recent developer-focused webinar: