2014. 12. 10. 13:18

1. Example of Scriptlet

<html>

<head>

</head>

<%

int count=0;

%>

<body>

Page Count is <% out.println(++count); %>

</body>

</html> 

 

2. Example of JSP Scriptlet Tag

index.html

<form method = "post' action = "welcome.jsp"

Name <input type="text" name = "user">

<input type="submit value="submit">

</form>

 

welcome.jsp

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome Page</title>
    </head>


  <body>
        Hello, <% out.println(user); %>
  </body>
</html

Posted by 아도니우스
2014. 12. 9. 10:13

Hotspot JVM GC 방식 

 

 Young Gen

 Old Gen

 GC 방식

 장/단점

 Serial GC

 Generation Algorithm

 Mark-Compact Algorithm

 1) Old 살아있는 객체 식별(Mark)

 2) 힙 앞부분부터 확인해 살아 있는 것만 남김(Sweep)

 3) 각 개체들이 연속되게 쌓이도록 가장 앞 부분부터 적재(Compact)

- 운영서버에 권고하지 않음

 Parallel GC

 Generation Algorithm

 (Thread 여러개)

 Mark-Compact Algorithm

 Serial GC와 동일하나 Young Gen을 병렬처리 하여 처리량을 늘림으로써 빠르게 객체를 처리할 수 있음

 

 Parallel Old GC

 Generation Algorithm

 (Thread 여러개)

 Parallel Compaction Algorithm (Mark-Summary-Compaction)

Summary 단계는 앞서 GC를 수행한 영역에 대해서 별도로 살아있는 객체를 식별한다는 점(Mark-Sweep-Compaction 차이)

- 기존 Parallel GC에서 Old Gen 처리량도 늘리자는 취지

 CMS

 Parallel Copy Algorithm

 Concurrent Mark-and-Sweep Algorithm

1) Initial Mark

2) Concurrent Mark

3) Remark

4) Concurrent Sweep

- 응답시간 개선에 집중

- 시간 절약 효과

 G1 GC

 Evacution Pause

 Concurrent Marking

1) Concurrent Marker가 각 힙 region 내의 살아있는 object 양 계산(Garbage가 많은 region 선택)

2) Young GC

   살아있는 object는 Survivor region과 Old region으로 이동(Stop-the-copy)

3) Compaction

   Large Chunk 로 Free space 병합 Fragmentaion 방지

  Fast Allocation Free List를 사용하지 않음, Linear 방식, TLAB 방식

- Gen 물리적 구분 사라짐

- 힙을 region으로 나눠 쪼개짐

- Garbage Object로 가득찬 Region 부터 Collection 수행

- copy 작업은 pause Time의 가장 큰 요인

 

※ 참고사이트 : http://dragon1.tistory.com/33

'Java' 카테고리의 다른 글

JVM 현재 설정된 설정값 확인  (0) 2015.06.24
“top threads” plugin for JConsole  (0) 2014.12.16
[모델1] 간단한 로그인 시스템  (0) 2014.11.01
Path 클래스 사용하기  (0) 2014.10.01
singleton 패턴  (0) 2014.10.01
Posted by 아도니우스
2014. 12. 8. 17:04

'Network' 카테고리의 다른 글

Kruskal's algorithm  (0) 2014.12.08
Posted by 아도니우스
2014. 12. 8. 15:45

'Network' 카테고리의 다른 글

HTML  (0) 2014.12.08
Posted by 아도니우스
2014. 11. 24. 13:59

Creating a Simple BPEL Process : HelloWorld BPEL

Business Process Execution Language(BPEL) is an execution language for defining business processes. In short, it is the language for orchestrating multiple WebServices based on the business logic.

This post is about creating your first BPEL process using Oracle SOA Suite 11g

This is a simple BPEL process that gives back fullName as response, inputs being firstName & lastName


Defining your first BPEL Process
Create a new Project, name it HelloWorldBPELPrj and select Empty Composite in the next screen'
Define a Schema as follows
In the composite file, drag and drop BPEL Processcomponent from the Component Palette into the Components swimlane of the composite.xml
This will open up a wizard where you need to give the following details
Name : HelloWorldBPEL
Template : Syncrhonous BPEL Process
Select Input and Outputfrom the schema just created
Select the checkbox "Expose as a SOAP WebService" so that it creates a WebService with the same message types in the External References section of the composite.xml, though which external clients talk to this BPEL process



This will create the following in the composite.xml

Now that you've created the skeleton, lets implement the BPEL process.
Either open the .bpel file from the Navigator or double click the BPEL process icon in the coposite.xml - this will take you to the BPEL Component Editor where you'll implement the business logic in the BPEL process

When you look at the empty BPEL process, you'll find an incoming line from the external WS to Receive Activity, and an outgoing line from Reply Activity to the same external WS. These lines represent the flow of message to and from the WS to the BPEL Process

Note : Every operation in a BPEL process is called an Activity

Click on the "X" symbol in the boundary enclosing both the activities. The boundary is called a Scope in BPEL, which is similar to Scope in any programming language
This will open up variables section, where you'll see 2 variables (inputVariable and outputVariable). The inputVariable contains the the value coming into the BPEL process from the external WS.
In this example, inputVariable contains just a simple string, name
We need to concatenate this with 'Hello ' and assign it to the output variable. This can be done using Assign activity


Drag and drop Assign activity in between the two activities, name it AssignOutput



Here, we need to concatenate both the elements from the input and assign it to the output.  

 

For this, click on the
Expression icon at the top right as shown



Use the concat() function from the String functions and append Helloto the name from the inputVariable, as shown



This will create a function icon in the middle of the Assing editor, where you need to drag this to assign it to the returnMsg of the outputVariable and click OK


With this, the outputVariable is stuffed which is sent back to the calling WS(indicated the outgoing line)
Thats it, you are done with your first BPEL process
Deploy the project as per this linkand test it in Enterprise Manager

Hope this tutorial gave you a basic understanding on working with a BPEL process.
Thanks for going through my post, feel free to provide a feedback!


 

※ 참고사이트 : http://middlewareschools.com/bpel-in-helloworld

                      https://chendamok.wordpress.com/2013/10/19/soa-bpel-project-helloworld/ (SOA BPEL Project : HelloWorld)

Posted by 아도니우스
2014. 11. 13. 16:11

If I start a Java VM with the -XX:+CMSPermGenSweepingEnabled flag set,

 the following message is printed:

 

Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future

 

'Weblogic' 카테고리의 다른 글

weblogic console 페이지 branding 변경  (0) 2014.10.21
jdk server, client option  (0) 2014.10.08
DMS disabling (Not confirmed)  (0) 2014.10.07
apache http server benchmarking tool  (0) 2014.10.02
jms queue Import && Export  (0) 2014.09.29
Posted by 아도니우스
2014. 11. 4. 22:18

 OpenLdap install in Windows

1. 설치 및 구동

http://sourceforge.net/projects/openldapwindows/ 에서 바이너리를 받아서 위자드를 이용하여 설치

${OPENLDAP 설치 디렉토리}/etc/openldap/sldpd.conf 파일에서 root 비밀번호를 다음과 같이 수정

 

#######################################################################

# BDB database definitions

#######################################################################

 

database            bdb

suffix                  "dc=my-domain,dc=com"

rootdn                 "cn=Manager,dc=my-domain,dc=com"

# Cleartext passwords, especially for the rootdn, should

# be avoid.  See slappasswd(8) and slapd.conf(5) for details.

# Use of strong authentication encouraged.

rootpw                asdf1234

# The database directory MUST exist prior to running slapd AND

# should only be accessible by the slapd and slap tools.

# Mode 700 recommended.

directory       ../var/openldap-data

# Indices to maintain

 

C:\dev\solutions\openldap\libexec\StartLDAP.cmd 를 실행

 

2. Sample 데이타 로딩하기

테스트를 위해서 샘플 그룹과, 사용자들을 생성해보자. 샘플 데이타는

${OPENLDAP 설치 디렉토리}\etc\ldif에 있다.

${OPENLDAP 설치 디렉토리}\bin 디렉토리에서 다음과 같은 명령들을 실행한다.

ldapadd.exe -v -x -D "cn=Manager,dc=my-domain,dc=com" -f ..\etc\ldif\base.ldif -W

ldapadd.exe -v -x -D "cn=Manager,dc=my-domain,dc=com" -f ..\etc\ldif\users.ldif -W

 

※ 패스워드를 물어보는데, 패스워드는 앞에 slpd.conf에서 입력한 패스워드를 사용한다.

 

3. 클라이언트를 이용해서 연결하기

http://www.ldapadministrator.com/ 에서 ldap administrator라는 툴을 다운 받는다. (30일 무료 사용 가능)

File > New > New Profile을 선택하여, 새로운 서버를 등록한다.

Step 1. Profile명을 등록한다.

Step 2. Host 주소를 등록한다. Local 에 깔았다면, Host localhost, Port Default 389를 지정한다. 


 

Step 3. 다음으로 log in id/password를 넣는데, 앞에 slapd.conf에서 지정한 id,passwd "Principal Password" 필드에 다음과 같이 넣는다.


 

모든 작업이 다 끝났으면 아래와 같이 LDAP에 접속해서 내용을 볼 수 있다.




 

2013.5.18 추가 - LDAP에 대한 설명과 Open LDAP에 대한 설명이 잘 나온 글 

http://w.nya.kr/lib/exe/fetch.php?media=%EB%8B%A8%EC%96%B4:ldap:ldap.doc

Posted by 아도니우스
2014. 11. 1. 00:03
1. DB연결: JDBC 방식
2. 빈 객체 사용하지 않음
3. jstl 사용하지 않음
4. DB: oracle
5. 쿼리문 
create table member2(
idx number not null primary key,
id varchar2(20),
pw varchar2(16),
name varchar2(20),
age varchar2(3),
gender varchar2(2));

create sequence seq;

6. 폴더 구조
src
com.utill
  -DBConn.java

WebContent
  -loginForm.jsp
  -loginProcess.jsp
  -registForm.jsp
  -regist.jsp
  -main.jsp

DBConn.java
데이터 베이스 연결

package com.utill;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBConn {
public static Connection conn = null;//커넥션 객체 생성

//데이터베이스 연결 메서드
public static Connection getConnection(){
  String url="jdbc:oracle:thin:@127.0.0.1:1521:orcl";
  String id="scott";
  String pw="tiger";
  String driver="oracle.jdbc.driver.OracleDriver";
  
  try {
  Class.forName(driver);
  conn=DriverManager.getConnection(url,id,pw);
} catch (Exception e) {
System.out.println("접속 실패: "+e.toString());
}
return conn;
}//연결 메서드 종료
//데이터베이스 연결 종료 메서드
public static void dbClose(){
if(conn==null){
return;
}
try {
if(conn!=null){
conn.close();
}
} catch (Exception e) {
System.out.println("데이터 비정상 종료"+e.toString());
}
conn=null;
}
}//ClassEND

loginForm.jsp
로그인 페이지

<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form action="loginProcess.jsp" method="post">
<center>
<table border="1">
<tr>
<td>아이디</td>
<td><input name="id" type="text"/></td>
</tr>
<tr>
<td>비밀번호</td>
<td><input name="pw" type="password"/></td>
</tr>
<tr>
<td><input type="submit" value="login"/></td>
<td><a href="registForm.jsp"><input name="regist" type="button" value="회원가입"/></a></td>
</tr>
</table>
</center>
</form>
</body>
</html>

loginProcess.jsp
로그인 과정을 담당

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="com.utill.DBConn"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
    
<%
request.setCharacterEncoding("EUC-KR"); //한글깨짐

//로그인 페이지로 부터 입력값을 받아 온다.
String id = request.getParameter("id");
String pw = request.getParameter("pw");

Connection conn = DBConn.getConnection();//데이터베이스 연결
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";

try{
sql="select * from member2 where id=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, id);
rs=pstmt.executeQuery();

if(rs.next()){
if(pw.equals(rs.getString("pw")) && id.equals(rs.getString("id"))){
session.setAttribute("id",id);//세션에 아이디 값을 저장
out.println("<script>");
out.println("location.href='main.jsp'");
out.println("</script>");
}
}
out.println("<script>");
out.println("location.href='loginForm.jsp'");
out.println("</script>");

 DBConn.dbClose();//데이터 베이스 닫기
}catch(Exception e){
e.printStackTrace();
}

%>

registForm.jsp
회원가입 폼

<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form action="regist.jsp" method="post">
<center>
<table border="1">
<tr>
<td>아이디:</td>
<td><input name="id" type="text"/></td>
</tr>
<tr>
<td>비밀번호:</td>
<td><input name="pw" type="text"/></td>
</tr>
<tr>
<td>이름:</td>
<td><input name="name" type="text"/></td>
</tr>
<tr>
<td>나이:</td>
<td><input name="age" type="text"/></td>
</tr>
<tr>
<td>성별:</td>
<td>
<input name="gender" type="radio" value="남" checked/>남자
<input name="gender" type="radio" value="여"/>여자
</td>
</tr>
<tr>
<td><input name="regist" type="submit" value="등록"/></td>
<td><input type="reset" value="다시입력"/></td>
</tr>
</table>
</center>
</form>
</body>
</html>

regist.jsp
회원 가입 과정을 담당

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="com.utill.DBConn"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>

<%
request.setCharacterEncoding("EUC-KR"); //한글깨짐
String id = request.getParameter("id");
String pw = request.getParameter("pw");
String name = request.getParameter("name");
String age = request.getParameter("age");
String gender = request.getParameter("gender");
Connection conn = DBConn.getConnection();//데이터베이스 연결
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
try{
sql="insert into member2(idx,id,pw,name,age,gender) values(seq.nextval,?,?,?,?,?)";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, id);
pstmt.setString(2, pw);
pstmt.setString(3, name);
pstmt.setString(4, age);
pstmt.setString(5, gender);
int result = pstmt.executeUpdate();
DBConn.dbClose();
if(result!=0){
response.sendRedirect("loginForm.jsp");
}else{
response.sendRedirect("registForm.jsp");
}
}catch(Exception e){
e.printStackTrace();
}
%>

main.jsp
로그인 후 보여줄 페이지

<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>

<%
//세션에 아이디 값이 있으면(로그인 성공) 해당값을(형 변환 후) 전달 해 준다.
String id = null;
if(session.getAttribute("id")!=null){//if문으로써 로그인 상태와 비로그인 상태를 구분 할 수 있다.
id=(String)session.getAttribute("id");
}else{
out.println("<script>");
out.println("location.href='loginForm.jsp'");
out.println("</script>");
}
%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<h3>로그인이 된 메인 페이지</h3>
안녕하세요<%=id %>님, 여기는 일반 회원 메뉴 입니다.<br/>
<%
if(id.equals("admin")){
%>
<a href="http://blog.naver.com/seilius" target="_blank"><b>관리자 메뉴</b></a>
<%} %>
</body>


'Java' 카테고리의 다른 글

“top threads” plugin for JConsole  (0) 2014.12.16
Hotspot JVM GC 방식  (0) 2014.12.09
Path 클래스 사용하기  (0) 2014.10.01
singleton 패턴  (0) 2014.10.01
Heap 영역과 Stack 영역  (0) 2014.09.04
Posted by 아도니우스
2014. 10. 31. 21:51

I. 기업 내/외부 환경 분석을 위한 전략 수립도구의 개요


전략 수립 도구의 정의

기업 내/외부 환경 분석 및 조직의 현 위치 파악으로 개선과제 도출전략적 방향 설정을 지원하는 방법 체계

기업 내/외부를 확실히 파악하여 대응 전략을 세우는 것이 핵심

 

전략 수립 도구 체계


* 5-Force 분석을 통해 외부 환경 요인 분석

* 7S 모델을 통해 조직 내부 환경 요인 분석

* SWOT 분석 또는 4C 분석을 통해 자사/외부 환경을 통한 분석과 전략 수립

 

전략 수립도구의 분류

구분

도구 및 기법

내용

외부환경분석

거시환경분석

경제적정치적사회적인구학적기술적요인 분석

산업환경분석

해당 산업의 시장 규모성장성매력도유통 채널향후 트랜드

5 Forces

분석

5가지 요소의 강약 분석을 통해 산업 내 이윤및 경쟁 포인트를 파악

시나리오기법

미래의 불확실성을 감안하여 다양한 미래의 모습을 반영함으로써 단순 예측기법의 한계를 보완

내부역량

분석

재무제표분석

재무비율(안정성활동성), 자금 흐름 분석

Value Chain

기업활동을 주 활동부문과 부 활동부문으로 나눠각각의 영역에서 비용이 얼마나 들고 소비자들에게 얼마나 부가가치를 창출하는 지를 보다 정교하게 분석, VBM 연계

7S Model

조직 능력에 영향을 미치는 전략(Strategy), 기술(Skill), 공유가치(Shared Value), 구조(Structure), 시스템(System), 종업원(Staff), 스타일(Style)  7가지 요인을 분석하여 조직 구성 및 내부전략을 수립한다.

경쟁전략

수립

4C

비즈니스 문제해결분석 방법론으로 자사(Company), 상황(Circumstance), 경쟁사(Competition), 고객(Customer)을 분석 하여 전략을 수립

SWOT분석

외부환경의 기회/위협(Opportunities, Threats), 내부역량의 강/약점(Strengths, Weakness)을 분석하여 전략적 과제 및 방향성 설정

 

 

II. 주요 전략 수립 도구


. 5 Forces를 이용한 외부 환경 분석

영향 요인

분석 내용

요인

신규 진입의 위협

Threat of new entrants

진입 장벽과 경쟁 기업의 보복

규모의 경제/제품의 차별화/소요자본/유통경로에의 접근/절대적 원가우위/정부의 정책 등

기존 기업간 경쟁

Intensity of competitive rivalry

기존 경쟁자들의 경쟁의 치열함 정도

규모가 비슷한 과점기업/산업성장률/제품차별성/전략적 이해관계/철수 장벽 등

대체품의 위협

Threat of substitute products

자신의 산업과 비슷한 제품이나 서비스를 제공함으로 해서 자신의 수익성을 감소시키는 요인

대체품의 가격 및 효능/대체품에 대한 구매자의 성향 등

공급자의 교섭력

Bargaining power of suppliers

구매자의 매출액 비중공급 부품 차별화공급선 교체 비용 정도

공급량의 비중/제품 원료 차별화/교체비용/대체품 존재여부/공급제품의 중요성 등

구매자의 교섭력

Bargaining power of customers

구매 비중구매 제품이 차별화공급업체 습득 정보력 정도

구매비중/구매 량/제품 차별화 정도/구매자 정보력/구매자 가격 민감도 등

요인 대신에 예를 추가 할 수 도 있겠다.

* 5 Forces를 이용한 커피믹스업계 분석의 예

신규 진입의 위협커피 원두 경로가공 공장 건립 비용커피 수입 관련 정부 규제

기존 기업간 경쟁동서롯데레슬러 가 경쟁 중이며 커피 믹스는 현재 성숙기로 판단

대체품의 위협원두커피와 캡슐커피가 맛을 앞세워 시장에 진입 중

공급자의 교섭력커피프림 분말 공급선의 교섭능력

구매자의 교섭력커피 구매자 들의 특성이나 성향구매 비중 

 

. 7s model을 이용한 내부역량 분석

항목

내용

분석 질의

공유가치

Shared Value

조직 구성원들이 공유하고 있는 가치관이나 이념기업 존재 목적 등

조직의 존재이유와 비전에 대한 이해를 공유 여부

전략

Strategy

변화하는 기업 환경에 적응하기 위한 장기적 목적과 계획달성하기 위한 자원 분배 방식

경쟁우위를 위한 조직 전략

전략들간의 우선순위

기술

Skill

전략을 어떻게 실행할 것인가?

기업조직 구성원이 가지고 있는 핵심 역량

조직의 핵심 비즈니스모델

핵심 기술과 강화기술

구조

Structure

전략을 실행해 나가기 위한 틀

조직 구조직무 분류역할과 책임 분배 등

조직의 기본 구조 형태

집중화와 분권화 된 업무

시스템

System

반복되는 의사결정 사항들의 일관성을 유지하기 위해 제시된 틀(업무 프로세스)

프로세스의 합리성 여부

프로세스의 개선 필요 사항

구성원

Staff

기업의 조직원 수와 유형그들이 보유한 능력이나 지식

인사관리 제도의 공정성

인재 육성 정책 여부

스타일

Style

- CEO의 관리 방식과 업무 수행에 따른 조직 문화

- CEO의사 결정 스타일

업무처리에 대한 조직 문화

 

. SWOT 분석을 통한 전략 노출

           내부능력

외부환경

강점

(Strengths)

약점

(Weaknesses)

기회

(Opportunities)

강점을 가지고 기회를 살린다.

- S-O 전략(공격 전략)

약점을 보완해 기회를 살린다

- W-O 전략

위협

(Threats)

강점으로 위협을 회피/최소화

- S-T 전략

약점을 보완하여 위협을 회피

- W-T전략(방어전략)

* SO전략 예건축기술로 성공적인 사업을 한 나라에 리조트 업종 진출

* ST전략 예법적 제재를 교묘히 비켜나가 홍보/판매

* WO전략 예취약한 기술에 대해서 전략적 제휴로 보완한다.

* WT전략 예저가 전략이나사업 축소철수 등

 

. 4C를 통한 문제 해결 분석

항목

분석내용

고객분석(Customer Analysis)

누가 시장을 구성무엇을 사나왜 사나구매관여자언제 어디서 사나 등에 대한 분석

환경분석(Circumstance)

채널 구성원구성원의 요구매출목표 달성도평균 재고 수준

경쟁분석(Competition Analysis)

경쟁상대그 전략그들의 목적그들의 강점과 약점반응 패턴

기업분석(Company Analysis)

자사의 매출마켓 쉐어기술적 강점인재의 수준

* 4C 분석의 예시: K 사의 대형 세단 판매를 위한 예시

고객분석대형 세단 구매 고객의 성향과구매 스타일은 어떤가?

환경 분석현재 대형 세단 시장의 분위기는 어떤가?

경쟁 분석경쟁사들의 판매 전략은 무엇인가지금 어떻게 하고 있나?

기업분석자사의 강점과 약점은 무엇인가어떤 강점을 어필 해야 하나?

 

 

III. 전략수립 도구의 도입효과 및 활성화를 위한 CSF

 

도입 효과

기업의 내부/외부 환경 파악경영 혁신 마인드 고취

기업 전략과 연계된 비즈니스 수행 방안 제시

신규 사업 또는 진행 사업에 대한 의사결정에 대한 지원

 

전략 수립 도구 활성화를 위한CSF(Critical Success Factor)

비전전략과 연계된 평가지표

가치중심의 성과관리평가의 신뢰성

구성원 동기부여 효과

주요성공요소 (Critical Success Factor): 중점과제핵심과제

* CSF(중점과제)의 수행결과로서 KPI로 표현되는 성과가 나타나는 것으로 이해 할 것


Posted by 아도니우스
2014. 10. 21. 14:41
Posted by 아도니우스