TASKLIST
--------------------------------------------------------------- 
C:\Users\Administrator>tasklist /FI "SERVICES eq TEST_APP"
정보: 실행 중인 작업 중 지정된 조건에 일치하는 작업이 없습니다.

C:\Users\Administrator>tasklist /FI "SERVICES eq TEST_APP"

이미지 이름                    PID 세션 이름              세션#  메모리 사용
========================= ======== ================ =========== ============
JavaService.exe               6032 Services                   0     29,980 K
---------------------------------------------------------------
 
TASKKILL
---------------------------------------------------------------
C:\Users\Administrator>taskkill /F /PID 6032
성공: 프로세스(PID 8492)가 종료되었습니다. 

C:\Users\Administrator>taskkill /F /PID 8492
오류: 프로세스 "8492"을(를) 찾을 수 없습니다.

---------------------------------------------------------------

FINDSTR (grep)
---------------------------------------------------------------

C:\Users\Administrator>netstat -an | findstr LISTEN

C:\Users\Administrator>netstat -an | findstr EST

---------------------------------------------------------------

 


Posted by 天下太平
,

jmeter and grinder

기타 2011. 5. 19. 00:55
Posted by 天下太平
,

Java classpath

Java 2011. 4. 18. 14:13
* Java classpath 설정방법
1. -classpath src1;src2;A.jar;B.jar
2. -cp src1;src2;A.jar;B.jar
3. -Djava.class.path=src1;src2;A.jar;B.jar
4. set CLASSPATH=src1;src2;A.jar;B.jar

* classpath 옵션이 두 개 이상이면
java -cp src1 -cp src2 -cp src3 Test
-> 마지막 옵션 (src3)만 적용된다.

* -cp, -classpath -Djava.class.path 옵션을 섞어서 쓰면
java -Djava.class.path=src1 -cp src2 Test
-> 마지막 옵션 (src2)만 적용된다.

* ClassLoader 종류
- Bootstrap ClassLoader : $JAVA_HOME/jre/lib/rt.jar
- Extension ClassLoader : $JAVA_HOME/jre/lib/ext/*.jar
- Application ClassLoader : $CLASSPATH

* 상위 ClassLoader에 있는 Class가 우선순위가 높다

* ClassLoader C1에서 로드된 클래스 A가 참조하는 클래스 B는 반드시 ClassLoader C1 혹은 C1보다 상위의 ClassLoader에서 찾을 수 있어야 한다.


 
Posted by 天下太平
,

OnJava.com

Java 2011. 4. 10. 22:13
Posted by 天下太平
,

REST

기타 2011. 4. 8. 12:46
Wikipedia - REST
http://ko.wikipedia.org/wiki/REST

RESTful 웹서비스란
http://www.jaso.co.kr/333 

Architectural Styles and the Design of Network-based Software Architectures
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm 

 rfc2616 - HTTP 1.0
http://www.w3.org/Protocols/rfc2616/rfc2616.html 

스프링노트 - REST 정리
 http://cache.springnote.com/pages/7611193.xhtml
Posted by 天下太平
,


# APNS

APNS - Local and Push Notification Programming Guide

APNS
The Notification Payload
json format 256 byte maximum
'aps' namespace
  An alert message to display to the user
  A number to badge the application icon with
  A sound to play
custom payload

# Apple 관련 ID
Apple ID: Apple App Store 계정
Bundle ID: ex) com.kt.m2m.smartcar
UDID (Unique Device Identifier) : 디바이스 식별 ID (디바이스 SN과 관련, SIM과는 무관) [a-f0-9] * 40 character
DeviceToken (APNS) : App이 디바이스에 인스톨 될 때 APNS로부터 받음. Push Notification에 사용. 32 bytes

# C2DM

Android Cloud to Device Messaging Framework

Android C2DM - sg90841님 블로그
http://blog.naver.com/PostView.nhn?blogId=sg90841&logNo=120119879166

# Google 관련 ID
Sender ID : Android Application을 구분하기 위한 개발자의 이메일
Application ID : ex) com.kt.m2m.smartcar
Registration ID : C2DM서버가 Android application에게 발급해주는 ID. Thrid-party 서버가 C2DM을 통해 메세지를 보낼때 디바이스(device+application)를 식별하는데 사용.
Sender Auth Token : Thrid-party 서버가 Google 서비스에 접근할 때 사용하는 인증키.
 
Posted by 天下太平
,

Big-endian vs Little-endian

OS 2011. 3. 24. 00:39
Posted by 天下太平
,

Maven

Maven 2010. 12. 8. 16:52
Posted by 天下太平
,

Memcached and Terracotta

Cache 2010. 12. 3. 18:30
Caching: Memcached and Terracotta
http://venkks.blogspot.com/2007/08/caching-memcached-and-terracotta.html

 

Caching: Memcached and Terracotta

Applications are generally built with an expected user base but soon might be overwhelmed due to business demand. This is especially particularly true in the context of consumer facing applications. Caching is one of the most important aspect to improve application performance by storing object in Cache (memory) reducing database load.

Caching in a clustered environment requires a Distributed Caching solution which can support failover scenarios and data reliability. In this post I would like to explore the capabilities of Memcached and Terracotta as distributed caching solutions.

Memcached is a high-performance distributed object caching system with client APIs for Perl, PHP, Python, Ruby and Java. Here are some of its capabilities and limitations (using Java client API):

  • Requires objects to be Serializable
  • Object Identity is NOT preserved
  • Supports cache expiration
  • Does NOT handle failover scenarios
  • For a given object selects a server from a pool of cache server based on hash of the key
  • Easy to configure (through SockIOPool class)

Terracotta is an open-source Java based clustering solution for JVM. Distributed Caching can be achieved using Terracotta by using a java.util.HashMap or open-source caching solutions like EHCache, OSCache and JBoss TreeCache.

  • Preserves Object identity
  • Manages memory efficiently through Virtual Heap
  • Declarative requirement for lock support
  • Simple configuration file with Eclipse Tool support
  • Good documentation, support and active development
  • Due to the nature of its implementation certain classes are not Portable and hence cannot be used
  • Hard to determine which third-party classes are portable
  • Does NOT require classes to be serializable
  • Easy to configure and get started!

Memcached and Terracotta : Alternatives or Complementary?
http://debasishg.blogspot.com/2008/09/memcached-and-terracotta-alternatives.html
Posted by 天下太平
,

jstat

Java 2010. 12. 2. 10:42
# jstat -help
Usage: jstat -help|-options
       jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]

Definitions:
  <option>      An option reported by the -options option
  <vmid>        Virtual Machine Identifier. A vmid takes the following form:
                     <lvmid>[@<hostname>[:<port>]]
                Where <lvmid> is the local vm identifier for the target
                Java virtual machine, typically a process id; <hostname> is
                the name of the host running the target Java virtual machine;
                and <port> is the port number for the rmiregistry on the
                target host. See the jvmstat documentation for a more complete
                description of the Virtual Machine Identifier.
  <lines>       Number of samples between header lines.
  <interval>    Sampling interval. The following forms are allowed:
                    <n>["ms"|"s"]
                Where <n> is an integer and the suffix specifies the units as
                milliseconds("ms") or seconds("s"). The default units are "ms".
  <count>       Number of samples to take before terminating.
  -J<flag>      Pass <flag> directly to the runtime system.
#
# jstat -options
-class
-compiler
-gc
-gccapacity
-gccause
-gcnew
-gcnewcapacity
-gcold
-gcoldcapacity
-gcpermcapacity
-gcutil
-printcompilation

# jstat -gcutil <PID> 1000
 

 
Posted by 天下太平
,

java.util.concurrent package

Java 2010. 11. 22. 13:49
Doug Lea
http://g.oswego.edu/

5 things you didn't know about... java.util.concurrent
http://www.ibm.com/developerworks/java/library/j-5things4.html
http://www.ibm.com/developerworks/java/library/j-5things5.html

5 things you didn't know about... java.util.concurrent (한글)
https://www.ibm.com/developerworks/kr/library/j-5things4.html
http://www.ibm.com/developerworks/kr/library/j-5things5.html

 Part 1.
* TimeUnit : 시간 단위, TimeUnit.SECOND, TimeUnit.MILLISECOND
* CopyOnWriteArrayList : read often, write rarely
* BlockingQueue : queue.take() method 호출했을 때, Queue가 비어있으면 계속 기다린다
* ConcurrentMap : ConcurrentHashMap
* SynchronousQueues : BlockingQueue와 같고, 기다리는 consumner가 있어야만, producer가 insert할 수 있다

Part 2.
* Semaphore : new Semaphore(3), sem.acquire(), sem.release()
* CountDownLatch : new CountDownLatch(5), start.await(), start.countDown()
* Executor, ExecutorService, ScheduledExecutorService : run Runnable or Callable, No fussing with Thread.




자바캔 Java Concurrency : Executor & Callable/Future
http://javacan.tistory.com/entry/134

Java Tutorial - Lesson: Concurrency
http://download.oracle.com/javase/tutorial/essential/concurrency/

Concurrent Programming with J2SE 5.0
http://java.sun.com/developer/technicalArticles/J2SE/concurrency/


 Overview of Concurrency Utilities
Task scheduling framework : Executor
Concurrent collections
Atomic variables
Synchronizers : semaphore, mutex, barrier, latch, exchanger
Locks : limitation of built-in monitor, synchronized
Nanosecond-granurity
java.util.concurrent package
Semaphore : A classic concurrency tool
CyclicBarrier : A resettable multiway synchronization point
CountDownLatch : A utility for blocking until a given number of signals, events, or conditions hold.
Exchanger : Allows two thread to exchange objects at a rendezvous point, and can be useful in pipeline designs.
java.util.concurrent.locks
AtomicInteger number = new AtomicInteger(); number.getAndIncrement();






Posted by 天下太平
,

Java Hotspot VM Option

Java 2010. 11. 17. 18:16
Posted by 天下太平
,

SVN

기타 2010. 11. 9. 10:46
SVN server config - Write through Proxy
http://svnbook.red-bean.com/en/1.5/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy


---------------------------
svn checkout (co)
svn info
svn status (st)
svn update (up)
svn cleanup
svn commit
svn proplist (pl)
svn propget (pg)
svn propset (ps)
svn propdel (pd) 
svn mkdir
svn copy
svn switch (sw) 
---------------------------
*.iws
*.ipr
*.iml
.settings
.project
.classpath
bin
target
---------------------------

 
서브버전 스위치 명령어 사용하기
http://lethean.pe.kr/2009/02/06/using-subversion-switch-command/ 

 
Posted by 天下太平
,

JMX

Java 2010. 11. 4. 17:24
Java Management Extensions (JMX) Technology
http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/

Java Management Extensions (JMX)
http://download.oracle.com/javase/1.5.0/docs/guide/jmx/index.html


Getting started with JMX
http://java.sun.com/developer/technicalArticles/J2SE/jmx.html 


Monitoring and Management using JMX
http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html

-Dcom.sun.management.jmxremte
-Dcom.sun.management.jmxremote.port=portNumber


An object name consists of two parts, the domain and the key properties.
The domain is a string of characters not including the character colon (:).

An ObjectName can be written as a String with the following elements in order:
  • The domain.
  • A colon (:).
  • A key property list as defined below.

A key property list written as a String is a comma-separated list of elements. Each element is either an asterisk or a key property. A key property consists of a key, an equals (=), and the associated value.



Posted by 天下太平
,

JBoss environment

Middleware 2010. 10. 28. 11:08
jboss.co.kr
http://www.jboss.co.kr/

JBoss Wiki
http://community.jboss.org/wiki/

JBoss4xSlimming
http://community.jboss.org/wiki/JBoss4xSlimming

다우기술 - 솔루션
http://support.daou.co.kr/sol_dir/sol_data_view.jsp?s_seq=2&b_seq=2025&from_form=sol_faq&b_cd=B&page=2



* URLEncoding

jboss-4.2.3.GA
$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml

     <Connector port="8080" address="${jboss.bind.address}"   
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"/>


jboss-4.0.5.GA
$JBOSS_HOME/server/fmx/deploy/jbossweb-tomcat55.sar/server.xml

    <Connector port="8080" address="${jboss.bind.address}"
         maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
         emptySessionPath="true"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>



Posted by 天下太平
,