Requestor.java -- EAI를 사용할 때 필요합니다.

package com.jboss.jms.client;

import java.util.Hashtable;
import java.util.UUID;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class Requestor {

 private String requestQueueName = "/queue/A";
 private String replyQueueName = "/queue/B";
 private MessageConsumer replyConsumer;
 Context ic = null;

 public void send() throws Exception {

 
  ConnectionFactory cf = null;
  Connection connection = null;

  try {
   // ic = new InitialContext();
   ic = getInitialContext();

   cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");

   // Request Queue Setting
   Queue queue = (Queue) ic.lookup(requestQueueName);
   System.out.println("Queue " + requestQueueName + " exists");

   // ReplyQueue Lookup
   Destination replyQueue = (Destination) ic.lookup(replyQueueName);

   // Connect Create
   connection = cf.createConnection();
   connection.start();

   // Session Create
   Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
   MessageProducer sender = session.createProducer(queue);

   TextMessage message = session.createTextMessage("Choi Ji-Woong");

   // Message property setting for reply
   message.setJMSReplyTo(replyQueue);
   String uuid = (UUID.randomUUID()).toString();/*
                * generate a unique
                * id
                */
   message.setJMSCorrelationID(uuid);

   // Send message
   sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
  // sender.setTimeToLive(10000);
   sender.send(message);
   System.out.println("The message was successfully sent to the "
     + queue.getQueueName() + " queue");

   System.out.println("Sent request");
   System.out.println("\tTime:       " + System.currentTimeMillis()
     + " ms");
   System.out.println("\tMessage ID: " + message.getJMSMessageID());
   System.out
     .println("\tCorrel. ID: " + message.getJMSCorrelationID());
   System.out.println("\tReply to:   " + message.getJMSReplyTo());
   System.out.println("\tContents:   " + message.getText());

   // Wait Reply Message from Reply Queue
   replyConsumer = session.createConsumer(replyQueue, "JMSCorrelationID = '" + uuid + "'");
   System.out.println("\tMessage Selector : " + replyConsumer.getMessageSelector());
   Message msg = replyConsumer.receive(10000); // wait reply message for 5 seconds

   if (msg instanceof TextMessage) {
    TextMessage replyMessage = (TextMessage) msg;
    System.out.println("Received reply ");
    System.out.println("\tTime:       "
      + System.currentTimeMillis() + " ms");
    System.out.println("\tMessage ID: "
      + replyMessage.getJMSMessageID());
    System.out.println("\tCorrel. ID: "
      + replyMessage.getJMSCorrelationID());
    System.out.println("\tReply to:   "
      + replyMessage.getJMSReplyTo());
    System.out.println("\tContents:   " + replyMessage.getText());
   }
  } finally {
   if (ic != null) {
    try {
     ic.close();
    } catch (Exception e) {
     throw e;
    }
   }

   // ALWAYS close your connection in a finally block to avoid leaks.
   // Closing connection also takes care of closing its related objects
   // e.g. sessions.
   closeConnection(connection);
  }
 }

 private Context getInitialContext() {
  try {
   Hashtable<Object, String> env = new Hashtable<Object, String>();

   env.put(Context.INITIAL_CONTEXT_FACTORY,
     "org.jnp.interfaces.NamingContextFactory");
   env.put(Context.PROVIDER_URL, "localhost:1199");

   Context ctx = new InitialContext(env);
   return ctx;
  } catch (Exception e) {
   e.printStackTrace();
  }
  return null;
 }

 private void closeConnection(Connection con) {
  try {
   if (con != null) {
    con.close();
   }
  } catch (JMSException jmse) {
   System.out.println("Could not close connection " + con
     + " exception was " + jmse);
  }
 }

 /**
  * @param args
  */
 public static void main(String[] args) throws Exception {
  // TODO Auto-generated method stub
  new Requestor().send();
 }
}




Replier.java

package com.jboss.jms.client;

import java.util.Hashtable;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class Replier implements MessageListener {
 private String requestQueueName = "/queue/A";
 private Session session;
 private boolean quit = false;
 Context ic = null;

 public void waitMessage() throws Exception {

 
  ConnectionFactory cf = null;
  Connection connection = null;
 
  try {
   // ic = new InitialContext();
   ic = getInitialContext();

   cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
   // Connect Create
   connection = cf.createConnection();

   // Session Create
   session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

   // Request Queue Setting
   Queue queue = (Queue) ic.lookup(requestQueueName);
   System.out.println("Queue " + requestQueueName + " exists");

   MessageConsumer consumer = session.createConsumer(queue);
   consumer.setMessageListener(this);
   connection.start();

  } catch (Exception ex) {
   if (ic != null) {
    try {
     ic.close();
    } catch (Exception e) {
     throw e;
    }
   }

   // ALWAYS close your connection in a finally block to avoid leaks.
   // Closing connection also takes care of closing its related objects
   // e.g. sessions.
   closeConnection(connection);
  }
 }

 public void onMessage(Message message) {
  try {
   if ((message instanceof TextMessage)
     && (message.getJMSReplyTo() != null)) {
    TextMessage requestMessage = (TextMessage) message;

    System.out.println("Received request");
    System.out.println("\tTime:       "
      + System.currentTimeMillis() + " ms");
    System.out.println("\tMessage ID: "
      + requestMessage.getJMSMessageID());
    System.out.println("\tCorrel. ID: "
      + requestMessage.getJMSCorrelationID());
    System.out.println("\tReply to:   "
      + requestMessage.getJMSReplyTo());
    System.out.println("\tRecv Contents:   "
      + requestMessage.getText());

    String contents = requestMessage.getText() + ", Nice to meet you! ";
   
    Destination replyDestination = message.getJMSReplyTo();
    System.out.println("\tDestination : " + ((Queue)replyDestination).getQueueName());
   
    Queue replyQueue = (Queue) ic.lookup("/queue/B");
    MessageProducer replyProducer = session.createProducer(replyQueue);

    TextMessage replyMessage = session.createTextMessage();
    replyMessage.setText(contents);
    replyMessage.setJMSCorrelationID(requestMessage
      .getJMSCorrelationID());
    replyProducer.send(replyMessage);

    System.out.println("Sent reply");
    System.out.println("\tTime:       "
      + System.currentTimeMillis() + " ms");
    System.out.println("\tMessage ID: "
      + replyMessage.getJMSMessageID());
    System.out.println("\tCorrel. ID: "
      + replyMessage.getJMSCorrelationID());
    System.out.println("\tReply to:   "
      + replyMessage.getJMSReplyTo());
    System.out.println("\tContents:   " + replyMessage.getText());
   
    if (contents.equalsIgnoreCase("quit")) {
     synchronized (this) {
      quit = true;
      this.notifyAll(); // Notify main thread to quit
     }
    }
   }
   
  } catch (Exception e) {
   e.printStackTrace();
  }

 }

 private Context getInitialContext() {
  try {
   Hashtable<Object, String> env = new Hashtable<Object, String>();

   env.put(Context.INITIAL_CONTEXT_FACTORY,
     "org.jnp.interfaces.NamingContextFactory");
   env.put(Context.PROVIDER_URL, "localhost:1199");

   Context ctx = new InitialContext(env);
   return ctx;
  } catch (Exception e) {
   e.printStackTrace();
  }
  return null;
 }

 private void closeConnection(Connection con) {
  try {
   if (con != null) {
    con.close();
   }
  } catch (JMSException jmse) {
   System.out.println("Could not close connection " + con
     + " exception was " + jmse);
  }
 }

 /**
  * @param args
  */
 public static void main(String[] args) throws Exception {
  // TODO Auto-generated method stub
  Replier replier = new Replier();
  replier.waitMessage();
  System.out
    .println("JMS Ready To Receive Messages (To quit, send a \"quit\" message).");

  // Wait until a "quit" message has been received.
  synchronized (replier) {
   while (!replier.quit) {
    try {
     replier.wait();
    } catch (InterruptedException ie) {
    }
   }
  }

 }
}



크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/29 22:40 2008/09/29 22:40

추후에 어딘가에 올라가겠지요.

Simple Sender Sample : SimpleSender.java - based on JMS 1.1

package com.jboss.jms.client;

import java.util.Hashtable;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class SimpleSender {
    
    private String destinationName = "/queue/A";

    public void send() throws Exception {
        
        Context ic = null;
        ConnectionFactory cf = null;
        Connection connection = null;

        try {
            //ic = new InitialContext();
            ic = getInitialContext();

            cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
            Queue queue = (Queue) ic.lookup(destinationName);
            System.out.println("Queue " + destinationName + " exists");

            connection = cf.createConnection();
            Session session = connection.createSession(false,
                    Session.AUTO_ACKNOWLEDGE);
            MessageProducer sender = session.createProducer(queue);

            TextMessage message = session.createTextMessage("Hello!");
            sender.send(message);
            System.out.println("The message was successfully sent to the "    + queue.getQueueName() + " queue");

            connection.start();

        } finally {
            if (ic != null) {
                try {
                    ic.close();
                } catch (Exception e) {
                    throw e;
                }
            }

            // ALWAYS close your connection in a finally block to avoid leaks.
            // Closing connection also takes care of closing its related objects
            // e.g. sessions.
            closeConnection(connection);
        }
    }
    
    private Context getInitialContext() {
        try {
            Hashtable<Object, String> env = new Hashtable<Object, String>();
    
            env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
            env.put(Context.PROVIDER_URL, "localhost:1199");
    
            Context ctx = new InitialContext(env);
            return ctx;
        }catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    private void closeConnection(Connection con) {
        try {
            if (con != null) {
                con.close();
            }
        } catch (JMSException jmse) {
            System.out.println("Could not close connection " + con + " exception was " + jmse);
        }
    }

    /**
     * @param args
     */
    public static void main(String[] args) throws Exception {
        // TODO Auto-generated method stub
        new SimpleSender().send();
    }

}


Simple Receiver Sample : SimpleReceiver.java - based on JMS 1.1
package com.jboss.jms.client;

import java.util.Hashtable;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class SimpleReceiver {
   
    private String destinationName = "/queue/A";

    public void send() throws Exception {
       
        Context ic = null;
        ConnectionFactory cf = null;
        Connection connection = null;

        try {
            //ic = new InitialContext();
            ic = getInitialContext();

            cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
            Queue queue = (Queue) ic.lookup(destinationName);
            System.out.println("Queue " + destinationName + " exists");

            connection = cf.createConnection();
            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
           
            MessageConsumer consumer = session.createConsumer(queue);

            connection.start();

            while( true ){
                TextMessage message = (TextMessage) consumer.receive(2000);
                if( message == null ) break;
                System.out.println("Message From [" + destinationName + "] is [" + message.getText() + "]");
            }
            System.out.println("There is no more message in Queue");
        } finally {
            if (ic != null) {
                try {
                    ic.close();
                } catch (Exception e) {
                    throw e;
                }
            }

            // ALWAYS close your connection in a finally block to avoid leaks.
            // Closing connection also takes care of closing its related objects
            // e.g. sessions.
            closeConnection(connection);
        }
    }
   
    private Context getInitialContext() {
        try {
            Hashtable<Object, String> env = new Hashtable<Object, String>();
   
            env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
            env.put(Context.PROVIDER_URL, "localhost:1199");
   
            Context ctx = new InitialContext(env);
            return ctx;
        }catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    private void closeConnection(Connection con) {
        try {
            if (con != null) {
                con.close();
            }
        } catch (JMSException jmse) {
            System.out.println("Could not close connection " + con + " exception was " + jmse);
        }
    }

    /**
     * @param args
     */
    public static void main(String[] args) throws Exception {
        // TODO Auto-generated method stub
        new SimpleReceiver().send();
    }

}



크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/29 22:37 2008/09/29 22:37

먼저 각각 구동시킨 JBoss 인스턴스 의 JvmRoute 와 UseJK를 true로 설정해야 합니다.

각 인스턴스의 해당 파일들을 수정합니다.
(*) ...../jboss-web.deploy/server.xml 에서
    <Engine name="jboss.web" defaultHost="localhost" jvmRoute="host1" >
     jvmRoute 는 각 인스턴스 마다 고유의 이름으로 설정합니다.
(*)...../jboss-web.deploy/META-INF/jboss-service.xml
  <attribute name="UseJK">true</attribute>  를 true로설정

BindingManager 를 사용하시었다면  AJP port를 확인하도록 합니다.

Apache에서 다음의 httpd.conf 및 workers.properties 파일을 아래와 비교하여 점검합니다.


httpd.conf 추가사항

# Load mod_jk module
# Update this path to match your modules location
#LoadModule jk_module          modules/mod_jk-1.2.26-httpd-2.2.6.so
LoadModule jk_module          modules/mod_jk.so

# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile conf/workers.properties

# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile     logs/mod_jk.log

# Set the jk log level [debug/error/info]
#JkLogLevel    debug
JkLogLevel    info

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkOptions indicate to send SSL KEY SIZE,
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories +ForwardURICompatUnparsed

# JkRequestLogFormat set the request format
JkRequestLogFormat     "%w %V %T"

# Send everything for context /examples to worker named worker1 (ajp13)

JkMount  /hello/* loadbalancer
JkMount  /jkstatus* jkstatus

workers.properties 신규 목록

# Define load balancer worker using ajp13
worker.list=loadbalancer, sso, node1, node2, jkstatus

# Set properties for node1 (ajp13)
worker.node1.type=ajp13
worker.node1.maintain=60
worker.node1.host=10.64.160.179
worker.node1.port=8109
worker.node1.lbfactor=1
worker.node1.cachesize=50
worker.node1.cache_timeout=60000
worker.node1.socket_timeout=60
worker.node1.socket_keepalive=true
worker.node1.connect_timeout=10000  // AJPConnector의 connectionTimeout과 동일한 시간으로 설정하세요
worker.node1.recycle_timeout=3000
worker.node1.recovery_options=7
worker.node1.redirect=node2

# Set properties for node2 (ajp13)
worker.node2.type=ajp13
worker.node2.maintain=60
worker.node2.host=10.64.160.179
worker.node2.port=8209
worker.node2.lbfactor=1
worker.node2.cachesize=50
worker.node2.cache_timeout=60000
worker.node2.socket_timeout=60
worker.node2.socket_keepalive=true
worker.node2.connect_timeout=10000  // AJPConnector의 connectionTimeout과 동일한 시간으로 설정하세요
worker.node2.recycle_timeout=3000
worker.node2.recovery_options=7
worker.node2.redirect=node1

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1, node2
worker.loadbalancer.method=Session
worker.loadbalancer.sticky_session=True
#worker.loadbalancer.sticky_session_force=True

worker.jkstatus.type=status

(*) ...../jboss-web.deploy/server.xml 에서
<!-- A AJP 1.3 Connector on port 8009 -->
      <Connector port="8009" address="${jboss.bind.address}"
         maxThreads="250" connectionTimeout="20000" emptySessionPath="true"
EnableLookups="false" redirectPort="8443"
         protocol="AJP/1.3"/> 을 설정

주의 사항은 다음과 같습니다.
maxThreads값은 Apache의 MaxClients값보다 커야 함.
maxThreads는 성능 테스트 후 최대 성능 지점으로 잡고, Apache의 MaxClients는 이 값보다 작게 설정하는 방식으로 진행
특히 몇 대의 JBoss로 두고 Apache에서 로드 밸런싱할 경우에는 20% 정도 더 maxThreads를 크게 해서 여유를 둬야 함.

더더욱 주의 사항
HTTP Session replication을 위해서는 한 가지 더 web application의 web.xml파일에 아래의 같이 distributable 태그가 포함되어야 세션 설정이 됩니다.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "
http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <display-name>JBoss Sample Web Application</display-name>
  <distributable/>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>



 

크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/29 15:44 2008/09/29 15:44

먼저 JBOSS 를 설치 한 후 ALL 을 카피하여 만들고 싶은 노드를 만들고 만일 같은 머신상에 위치하고 IP 가 하나일 경우BingdingManager 를 이용하여 포트를 바꾸어 줍니다.

Ex) conf/jboss-service.xml에서 ServiceBindingManager를 활성화(주석을 풀어주고 사용 ServerName 은 ports-03 까지 사용할 수 있음)

<mbean code="org.jboss.services.binding.ServiceBindingManager"     name="jboss.system:service=ServiceBindingManager">
     <attribute name="ServerName">ports-01</attribute>
     <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
     <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
     </attribute>
   </mbean>



클러스터 구성 파일
?     deploy/cluster-service.xml
?     deploy/jboss-web-cluster.sar/META-INF/jboss-service.xml
?     ejb3-clustered-sfsbcache-service.xml
-      ejb3-entity-cache-service.xml
 
ex) 해당 configuration 에서 ./deploy/cluster-service.xml 에서 클러스터 정의를 합니다.

<server>
   <mbean code="org.jboss.ha.framework.server.ClusterPartition"
      name="jboss:service=${jboss.partition.name:DefaultPartition}">     //  clustering 네임을 설정합니다.
      <attribute name="PartitionName">${jboss.partition.name:DefaultPartition}</attribute>
      <attribute name="NodeAddress">${jboss.bind.address}</attribute>
      <attribute name="DeadlockDetection">False</attribute>
      <attribute name="StateTransferTimeout">30000</attribute>
      <attribute name="PartitionConfig">
        <Config>
            <UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}" mcast_port="45566"
               ip_ttl="${jgroups.mcast.ip_ttl:8}" ip_mcast="true"
               mcast_recv_buf_size="2000000" mcast_send_buf_size="640000"
               ucast_recv_buf_size="2000000" ucast_send_buf_size="640000"
              loopback="false"/>
            …
  </mbean>

  <mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService"
      name="jboss:service=HASessionState">
  …
  </mbean>


해당 클러스터에 참여 하는 partition 네임은 같아야 합니다. 위의 정의 에서는 DefaultPartition 이
라설정한 것이 고  다른 이름으로 바꾸시는 것이 좋습니다.

 해당 cluster 설정파일에서  설정하지 않으면  서버구동스크립트의 Java Option에서 -Djboss.partition.name=XXX 설정하시면 됩니다. 또는 start script에서 run.sh ?c all ?b
203.231.14.15 ?g  XXX 으로 바꾸 시면 됩니다.

클러스터링에  참여하는 서버들은 멀티캐스트 IP 와 port 로 서로의 상태를 복제합니다.  먼저 해당 멀티캐스트 IP 가 통신이 되는지부터 확인 하셔야 됩니다.
=================================================================
멀티캐스트 테스트 하시는 방법은
  ★ 멀티캐스트 IP 설정
?      멀티캐스트 대역에서 선택 - 224.0.0.1 ~ 239.255.255.254
?      -u X.X.X.X
?      -Djboss.partition.udpGroup=X.X.X.X

★  JBoss 4.2에서는 multicast port도 설정 가능 (*)
?      -Djboss.hapartition.mcast_port=45566
?      -Djboss.webpartition.mcast_port=45577
?      -Djboss.ejb3sfsbpartition.mcast_port=45551
?      -Djboss.ejb3entitypartition.mcast_port=43333

★  멀티캐스트 테스트
Receiver Test

java -classpath jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 228.1.2.3 -port 45566



Sender Test

java -classpath jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr 228.1.2.3 -port 45566



 jgroups.jar는 $JBOSS_HOME/server/all/lib 아래에 위치

====================================
?     멀티캐스트 테스트에 실패했을 때
?      해당 NIC의 멀티캐스트를 활성화
?      ifconfig eth0 MULTICAST
?      해당 NIC로 멀티캐스트 메시지가 가도록 라우팅
?      NIC가 여러 개일 경우
?      route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
?      OS에 방화벽이 설치되어 있는지 확인
?      OS 방화벽이 있다면 멀티캐스트에 사용할 포트를 열어야 함
      "iptables -F"
?      Network Switch가 멀티캐스트를 지원하는지 확인
?     멀티캐스트 테스트는 통과했는데 클러스터 동작이 안될 때
?      /etc/hosts 파일의 127.0.0.1에 호스트가 설정된 경우 이를 제거
                   127.0.0.1 yourhostname yourhostname.yourdomain localhost.localdomain localhost

크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/29 14:19 2008/09/29 14:19

JBoss Cluster domain을 구성하던 중 불필요한 기능을 없애야 해서 뺀 도메인을 첨부합니다.

사용자 삽입 이미지


뺀 기능이 너무 많아 현재 있는 기능만 보면 다음과 같습니다.

- Clustering
- Web Application(Web Container)
- JMX

위의 것을 남기고 모두 없앴습니다.
- CORBA IIOP
- JMS
- SNMP
- Client Deployer 등등

Attache : Domain Configuration - Server/conf directory




JBoss Slimming EAP4.3

Client Deployer Service

  • Client에서 J2EE를 Deploy할 경우 서비스이며 원격 deploy같은 기능
  • 1. $SERVER_HOME/deploy/client-deployer-service.xml 삭제

JBoss MQ

  • JBoss MQ를 사용하지 않을 경우 제거 가능
  • 1. $SERVER_HOME/deploy/jms 디렉토리 삭제
  • 2. $SERVER_HOME/lib/jbossmq.jar 파일 삭제

JMS Queue/Topic 삭제

  • 1. $SERVER_HOME/conf/jboss-service.xml 파일을 여세요
  • 2. 다음을 주석으로 막아버리세요 jboss.mq:service=DestinationManager

Client User Transaction

  • 클라이언트측에서 서버의 UserTransaction을 얻어가서 안쓸경우
  • 1. $SERVER_HOME/conf/jboss-service.xml파일을 연다
  • 2. jboss:service=ClientUserTransaction 에 주석처리
  • 3. 370라인쯤의 아래를 찾아 주석처리 mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService"
  • 4. $SERVER_HOME/conf/xmdesc/ClientUserTransaction-xmbean.xml을 삭제하거나 편집기로 열어 주석처리

CORBA/IIOP

  • CORBA/IIOP 프로토콜을 사용하지 않을 경우 삭제 가능
  • 1. $SERVER_HOME/conf/jboss-service.xml파일을 연다
  • 2. org.jboss.management.j2ee.LocalJBossServerDomain를 찾아 CorbaORB 애트리뷰트를 주석처리
  • 3. $SERVER_HOME/deploy/iiop-service.xml파일을 삭제하거나 주석처리

Web Service

  • 웹서비스를 사용하지 않을 경우
  • 1. $SERVER_HOME/deploy/jbossws.jar 디렉토리 삭제
  • 2. $SERVER_HOME/conf/standardjboss.xml파일을 연후 org.jboss.ws.server.ServiceEndpointInterceptor 를 주석처리
  • 3. $SERVER_HOME/lib/jboss-saaj.jar & jboss-jaxrpc.jar 삭제

EJB3

  • EJB3를 사용하지 않을 경우 - 삭제할 경우 JMX-console을 사용할 경우 에러남
  • 1. #SERVER_HOME/deploy/ejb3*에 관련된 것을 삭제
  • 2. $SERVER_HOME/lib/ejb3-persistence.jar jboss-ejb3x.jar 삭제

UDDI Service

  • Web Service UDDI를 사용하고 싶지 않을 경우
  • 1. $SERVER_HOME/deploy/juddi-service.sar 디렉토리 삭제

Bean Shell Deployer

  • Shell에서 deploy할 수 있는 모듈을 사용하지 않을 경우
  • 1. $SERVER_HOME/deploy/bsh-deployer.xml을 삭제
  • 2. $SERVER_HOME/lib/bsh* 삭제

UUID Key Generator

  • CMP EJB에서 primary key를 생성하기 위한 것인데 불필요하면 제거
  • 1. $SERVER_HOME/deploy/uuid-key-generator.war 디렉토리를 삭제
  • 2. $SERVER_HOME/lib/autonumber-plugin.jar 파일을 삭제

RMI over HTTP 삭제

  • RMI를 HTTP로 터널링할 필요가 없을 경우에 삭제 가능합니다.
  • 1. default설정일 경우 $SERVER_HOME/deploy/http-invoker.sar디렉토리를 삭제하세요
  • 2. 클러스터 설정일 경우 $SERVER_HOME/deploy/httpha-invoker.sar디렉토리를 삭제하세요

JBoss Messaging

  • JBoss MQ를 사용하지 않을 경우 제거 가능
  • 1. $SERVER_HOME/deploy/jboss-messaging.sar 디렉토리 삭제
  • 2. $SERVER_HOME/lib/jboss-messaging*.jar 파일 삭제

CacheInvalidation Service

  • CMP EJB에서 CacheInvalidation을 사용하지 않을 경우 삭제할 수 있음
  • 1. $SERVER_HOME/deploy/cache-invalidation-service.xml 삭제
  • 주의 : HA Cluster를 사용할 경우 에러 발생할 수 있습니다.

JavaMail

  • 1. $SERVER_HOME/deploy/mail-service.xml 파일 삭제
  • 2. $SERVER_HOME/lib/mail* 삭제


크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/29 11:32 2008/09/29 11:32

사용자 삽입 이미지
요즘 지하철을 타고 다니면서 느끼는 점은 가만히 '멍'을 때리고 있는 분들은 대체 무슨 생각을 하고 있을까하는 생각입니다. 제가 미금역에서 지하철을 타고 선릉에서 내리니까 정확하게 42분을 그러고 오는 분들인데 42분이면 웬만한 얇은 자기 개발서 50%를 읽을 수 있는 시간입니다.

어제 집에 갈 때는 또 다른 유형의 분을 보았는 데 처음 탔을 때부터 정말 무언가에 집중을 하는 모습이 역력하던군요. 당연히 책이었겠죠. 그런데 내리는 데 갑자기 귀에서 뭘 빼는 데 자세히 봤더니 귀마개더군요. 흥미로웠습니다.

귀마개까지는 필요없겠지만 지하철 안에서 시끄러운 지하철 전동차 소리, 다른 사람들의 이야기하는 소리가 들리지 않도록 누구나 훈련할 수 있을 거라 생각합니다. 집중을 잘 할 수 있는 훈련을 지하철에서 하게 되면 그의 연장 선상에서 업무 시간내 처리할 수 있는 생산성을 당연히 높아지리라 예상합니다.

그러한 것도 싫다면 그냥 가벼운 영어책이라도 들고 다니면서 그냥 달달 외우세요. 40분이면 최소한 숙어 10개는 외울 거에요.

P.S : 지금 JBoss 씨를 뿌리러 다니느라 사무실에 있을 시간이 별로 없는 게 안타깝습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/26 10:05 2008/09/26 10:05

제 동생은 지금 IT업계에 근무하고 있습니다. WebLogic을 담당하는 엔지니어로 예전 BEA의 파트너 업체에서 근무하고 있습니다. 원래 하던 일은 전기쪽 일이었는데 6년 전쯤에 IT교육센터에 집어넣으면서 IT쪽으로 전환을 시켰습니다. 그게 잘된 일인지 잘못된 일이었는지 알 수는 없지만 잘 다니고 있다니 그저 다행이라는 생각만 하고 있었습니다.

그런데 얼마전 한컴 상무님께서 연락을 하셔서 미들웨어 엔지니어를 뽑는다고 인재를 추천해달라고 했습니다. 동생이 생각이 나서 우선 동생에게 전화를 했드랬지요.

놀새~: 괜찮은 자리가 나왔는데 직장 바꿔볼 생각없냐? 회사 옮기면 기본적인 연봉 인상에 혜택도 있지. 대신 제안서도 많이 작성하고 지금 네가 하는 일과 가장 크게 달라지는 건 근태를 확실하게 해야 할거야. 그나마 다행인 건 너희 집에서 전철로 한 정거장만 가면 된다.

며칠 뒤..
동생 : 내가 지금 나갈 수 있는 상황은 아닌것 같아. 회사에서 지금 내가 없으면 안되는 상황이거든~

그냥 그 때 느낌을 그대로 표현하자면 이렇습니다.
"이 미친 새끼~"

나 없으면 회사가 안돌아갈 것 같다는 생각은 막말로 아주 개초보같은 생각입니다. 회사란 항상 대안이 있기 마련이며 누구 없다고 안 돌아가는 회사는 이 세상에 단 한군데도 존재하지 않습니다. 돈 없다고 쩔쩔 매면서 연봉 40%이상을 올려줄 수 있는데도 불구하고 새로운 도전에 대한 두려움 때문에 또 젊은 녀석이 몸 편한 회사에 있겠다는 것은 앞뒤가 맞지 않습니다.

직원에 대한 risk는 회사가 안게 됩니다. 직접 사업을 하게 되면 100% risk가 생기지만 risk가 있는 회사의 직원으로 입사하고 회사가 문을 닫는다 해도 직원은 경력이 남게 됩니다.

크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/22 11:49 2008/09/22 11:49

Spring도 드디어 subscription이라는 방식으로 서비스를 제공하기 시작했습니다.

http://www.springsource.com/node/558

위의 내용을 지원하는 국내 총판을 하나 만들어도 성공하겠는걸요.

그리고 언제나 그랬듯이 serverside.com에 논쟁이 일고 있네요.
http://www.theserverside.com/news/thread.tss?thread_id=50727

크리에이티브 커먼즈 라이센스
Creative Commons License
2008/09/20 22:02 2008/09/20 22:02

사용자 삽입 이미지
TCK라는 게 있습니다. 아는 분들이 많이 없으리라 생각이 드는데 일반적으로 Java EE의 인증을 받았다 안받았다라고 이야기는 들어보셨을 것입니다. 그 인증이라는 것을 진행할 때 사용하는 것을 TCK라고 합니다.

TCK test suite를 생성하여 통과해야 할 결과를 만들고 그것이 만족되면 인증을 주는 절차로 구성되어 있습니다. 자세한 내용은 아래의 사이트에 나와 있습니다.
http://java.sun.com/developer/technicalArticles/JCPtools/

Java EE 5의 경우에는 총 27098개의 테스트가 있습니다. 서비스의 종류로는 다음과 같은데 결국 스펙에서 이야기하는 내용입니다.

appclient
assembly
connector
ejb
ejb30/*
ejb30/persistence
integration
j2eetools
jacc
javamail
jaxr
jaxrpc
jaxws
jdbc