'Jboss'에 해당되는 글 3건

  1. 2009.03.16 JBoss 5.0.0 변경 내역
  2. 2009.03.10 JBoss 설정하기
  3. 2009.03.06 jboss 에서 datasource 설정 하기 및 테스트
2009.03.16 15:08

JBoss 5.0.0 변경 내역




Changes:
Detailed Release Notes
Includes versions: JBossAS-5.0.0.GA
Feature Request

    * [ JBAS-70 ] Security event listener that could be plugged in to listen to authentication and authorization events.
    * [ JBAS-3767 ] Create a canonical "JndiServiceMBeanSupport" useful for binding objects to JNDI
    * [ JBAS-3997 ] getManagedConnection retries
    * [ JBAS-4588 ] DeploymentSorter in the new profile service based deployment scanner
    * [ JBAS-5192 ] ServiceBindingManager that can handle pojo services
    * [ JBAS-5348 ] Move remoting configuration into deploy
    * [ JBAS-5535 ] Modularisation of the JBoss Bootstrap
    * [ JBAS-5545 ] Implement the jsr77 view on top of the new deployers/profileservice/mc
    * [ JBAS-5766 ] Add new aop deployers
    * [ JBAS-5900 ] jars are not loaded from the lib directory of a sar in JBoss AS 5
    * [ JBAS-5960 ] EJB2: Lack of security domain in JBoss DD does not bypass security
    * [ JBAS-5966 ] Migrate TomcatService mbean deployment descriptor to mc bean descriptor
    * [ JBAS-5974 ] Turn of deployment of base-aspects.xml by default
    * [ JBAS-5975 ] Switch to MC based AOP deployers
    * [ JBAS-5989 ] Security Beans need ManagedObject annotations
    * [ JBAS-5998 ] Add resources filtering to MetaDataAwareProfile
    * [ JBAS-6013 ] Support createDestination in jboss/message-driven
    * [ JBAS-6032 ] Refactor AOPClassLoaderDeployer
    * [ JBAS-6058 ] Web descriptors parsing
    * [ JBAS-6070 ] Need an overview of the profile service in the 5.0 docs
    * [ JBAS-6088 ] Add simple cache / cluster support for Spring beans
    * [ JBAS-6099 ] add alternate, not meta data based JSF injection provider
    * [ JBAS-6130 ] AS5:JACC: * in web.xml should allow configurable authorization bypass
    * [ JBAS-6136 ] Pojoize the jca configuration
    * [ JBAS-6158 ] Reduce the distribution size by sharing the libraries between the all and default configs
    * [ JBAS-6182 ] Add support for JBC MVCC locking in Hibernate 2nd Level Cache configs
    * [ JBAS-6205 ] Make server.log logging level configurable via system property
    * [ JBAS-6223 ] Externalize the DeploymentRepository attachments location
    * [ JBAS-6267 ] Introduce SecurityContextInterceptor in the ejb2 proxy

Bug

    * [ JBAS-2149 ] ByValueContainerInvoker
    * [ JBAS-5081 ] New transaction manager does not implement TransactionTimeoutConfiguration properly
    * [ JBAS-5114 ] MessageDriven EJB3 does not create destination automatically
    * [ JBAS-5115 ] Valid jboss-app.xml file not recognized correctly by jbossxb runtime
    * [ JBAS-5209 ] Hot deployment scanner deploys files which were expected to be filtered
    * [ JBAS-5301 ] JaasSecurityManagerService.startService - java.lang.IllegalArgumentException: handler exists
    * [ JBAS-5412 ] BaseLocalProxyFactory should not check for explicit security context
    * [ JBAS-5689 ] Not seeing bootstrap ManagedDeployment/ManagedComponents
    * [ JBAS-5732 ] Deployment of @WebService fails
    * [ JBAS-5767 ] Security schemas
    * [ JBAS-5895 ] OptAnnotationMetaDataDeployer is processing too many classes
    * [ JBAS-5942 ] Session replication with passivation causes inconsistent session data
    * [ JBAS-5943 ] JRMPInvokerProxyHA should not failover if PooledInvokerProxy.invoke() throws 
java.rmi.ConnectException with cause of java.io.EOFException
    * [ JBAS-5951 ] ProfileService unit tests are not validating persistence of updates
    * [ JBAS-5964 ] NPE in expiration of passivated sessions
    * [ JBAS-5968 ] NullPointerException in WebServiceDeployerEJB
    * [ JBAS-5978 ] Mask password logging in ServiceConfigurator
    * [ JBAS-5979 ] java.lang.NoClassDefFoundError: org/jboss/aop/pointcut/ast/PointcutExpressionParserVisitor in EJB client
    * [ JBAS-5999 ] EJBTimerServiceImpl timerServiceMap access should be synchronized
    * [ JBAS-6002 ] NPE for JSF managed beans.
    * [ JBAS-6007 ] Wrong bean name when EJB is not deployed within an ear
    * [ JBAS-6017 ] JRMPProxyFactory should rebind the proxy in JNDI rather than just bind it
    * [ JBAS-6028 ] Bootstrap dependencies failure of ejb3 session beans
    * [ JBAS-6040 ] Ensure correct TCCL is set before accessing clustered web session cache
    * [ JBAS-6041 ] let the web metadata override a default context-param
    * [ JBAS-6044 ] JMX console invokeOp confused ObjectName encoding
    * [ JBAS-6056 ] UserTransaction cannot be deployed as clustered proxy and sticky transactions randomly work
    * [ JBAS-6060 ] Tolerate security domain convention in JBoss DD
    * [ JBAS-6062 ] Exploded WAR archive with no web.xml is no longer supported
    * [ JBAS-6067 ] XACML policy is not removed when deployment unit is undeployed
    * [ JBAS-6068 ] Mask passwords in the Deployers
    * [ JBAS-6077 ] seam-int: hot-redeploys occur constantly on JBoss 5 trunk
    * [ JBAS-6076 ] Seam war not using jboss-seam-int
    * [ JBAS-6093 ] Exposing the EMF in JNDI via jboss.entity.manager.factory.jndi.name doesn't work in JBoss 5.0.0.CR2
    * [ JBAS-6098 ] juddi-service.sar bundles juddi.jar & scout.jar
    * [ JBAS-6107 ] Seam hibernate and jpa examples throw ZipExceptions during deployment - but the jars are valid
    * [ JBAS-6110 ] Tomcat status in the web-console missing logo
    * [ JBAS-6111 ] Ensure hibernate.cache.region_prefix is specified by PersistenceUnitDeployment
    * [ JBAS-6116 ] UserTransaction.commit()/rollback() are not fully compliant with the JTA standard
    * [ JBAS-6117 ] IOException in VFS while undeploying a Seam example
    * [ JBAS-6131 ] EJB1.1 isCallerInRole must throw RTE if role is not found in deployment descriptor
    * [ JBAS-6135 ] Concurrent connection of HAPartition channels fails
    * [ JBAS-6147 ] Profile.getModifiedDeployments() does not ignore .bak file
    * [ JBAS-6149 ] connectionMap.remove in WrapperDatasourceService never called
    * [ JBAS-6153 ] Transaction sticky target not available should be thrown as ServiceUnavailableException
    * [ JBAS-6161 ] Two ears with a same named jar fails to deploy
    * [ JBAS-6162 ] Error logged when attempting to passivate invalidated session
    * [ JBAS-6165 ] NPE in TransactionScopedEntityManager
    * [ JBAS-6174 ] shutdown.jar is missing classes
    * [ JBAS-6176 ] appclient doesn't declare a dependency on persistence unit
    * [ JBAS-6177 ] Error on jchannel.getState() right after connect (even with flush)
    * [ JBAS-6181 ] cannot secure jmx invoker service
    * [ JBAS-6193 ] JBossCacheManager leaks ReplicationStatistics.TimeStatistic
    * [ JBAS-6194 ] Move transaction sticky logic in proxy to interceptors to avoid bottleneck
    * [ JBAS-6206 ] JBossManager sets invalid session cookie after failover
    * [ JBAS-6207 ] update jts install for new lib layout
    * [ JBAS-6209 ] DelegatingClassloader is trying to get the parent in an unprivileged block
    * [ JBAS-6214 ] Default port bindings overriding (bindings.xml) doesn't work.
    * [ JBAS-6224 ] SecurityContextEstablishmentValve is making expensive loadClass calls
    * [ JBAS-6229 ] Resolving of relative persistence units doesn't work
    * [ JBAS-6231 ] jboss.messaging.jar (server) on /client
    * [ JBAS-6239 ] Regression on run-as in a MDB
    * [ JBAS-6241 ] EJB TIMERS Table Creation Fails When Oracle Schema Specified
    * [ JBAS-6243 ] EJB2: Reintroduce explicit run as check before authentication
    * [ JBAS-6252 ] Messaging release is missing connection-factories-service.xml
    * [ JBAS-6256 ] NPE during undeployment of test artifact /bundled-myfaces-hellojsf.war
    * [ JBAS-6275 ] Fix *both* 4.2.x & 5.0.x compatibility matrix tests

Task

    * [ JBAS-2563 ] Cleanup the build for jboss5
    * [ JBAS-3916 ] Update source code headers.
    * [ JBAS-4370 ] SecurityDeployer: XACML/acl Policy Registration
    * [ JBAS-4814 ] Refactor the conf/jboss-service.xml services
    * [ JBAS-4967 ] Extract setting of default clustering JBossWebMetaData from TomcatDeployer
    * [ JBAS-5078 ] Validate SRP Configuration
    * [ JBAS-5234 ] Include the Windows Service Runner binary (jbossvc.exe) in the distro
    * [ JBAS-5358 ] Move remote access to profile service into deploy
    * [ JBAS-5677 ] Add discussion of usage of FC to Clustering Guide
    * [ JBAS-5778 ] Improve HttpSessionListener handling in clustered environment
    * [ JBAS-5794 ] Administration and configuration guide
    * [ JBAS-5795 ] Administration and configuration guide
    * [ JBAS-5872 ] Update org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase
    * [ JBAS-5873 ] Create JBoss-AS-5.0.x-CompatibilityMatrix test run based on the 4.2.x one
    * [ JBAS-5883 ] Unify name usage in ProfileService
    * [ JBAS-5908 ] ClientUserTransactionObjectFactory is inefficient
    * [ JBAS-5930 ] Investigate ENC issues to obtain JBoss Security Manager in the web layer
    * [ JBAS-5945 ] Make JBossCacheClusteredSession.initAfterLoad() part of an override of update()
    * [ JBAS-5958 ] Fix any remaining testsuite failures
    * [ JBAS-5963 ] ClientUserTransaction should log cause exceptions
    * [ JBAS-5977 ] FIXME the HackClassloaderMetaDataDeployer boot WARN
    * [ JBAS-5988 ] AS5 Codebase Privileged Blocks
    * [ JBAS-5994 ] Switch to repository based ProfileService as the default
    * [ JBAS-6023 ] Inject Naming instance into DetachedHANamingService
    * [ JBAS-6030 ] Uncomment @JMX annotation in deployers.xml to enable JMX management of DeployersImpl
    * [ JBAS-6039 ] Change JGroups thread pool rejection policy to 'Discard'
    * [ JBAS-6064 ] JSR-196 integration for web layer
    * [ JBAS-6080 ] On Linux, HA-JNDI to pass SocketAddress to MulticastSocket constructor
    * [ JBAS-6081 ] Remove TUNNEL config
    * [ JBAS-6084 ] Reduce Logging Visibility when setting DefaultJndiBindingPolicy (when not explicitly specified)
    * [ JBAS-6087 ] Reduce the excessive logging
    * [ JBAS-6090 ] Convert legacy clustered services to pojo configuration
    * [ JBAS-6091 ] Allow JRMPInvoker to work as an MC bean
    * [ JBAS-6103 ] Review the 'minimal' config
    * [ JBAS-6105 ] Improve start-up time
    * [ JBAS-6109 ] ClusteredSession should not subclass StandardSession
    * [ JBAS-6129 ] Missing licenses
    * [ JBAS-6132 ] Revert to AS 4 behavior of handling distributable webapps in default config
    * [ JBAS-6143 ] Remove legacy persistence unit resolving functions from appclient and tomcat
    * [ JBAS-6148 ] Port metadata awareness to the repository profileservice
    * [ JBAS-6154 ] Verify JAXB version for 5.0.0.GA release
    * [ JBAS-6159 ] Make an integration abstraction for the UserTransactionListener and CachedConnectionManager
    * [ JBAS-6160 ] Component Update to jboss-ejb3-as-int
    * [ JBAS-6163 ] JACC: Look at the cmp2-audit.jar for security domain
    * [ JBAS-6169 ] Make "bootstrap" module reusable
    * [ JBAS-6170 ] Update package names moved from "main" to "bootstrap"
    * [ JBAS-6172 ] org.jboss.system.server.Server should be JVM-agnostic
    * [ JBAS-6183 ] ATTRIBUTE granularity clustered session should store attribute in same JBC node as metadata
    * [ JBAS-6184 ] Eliminate a JBC Fqn level in clustered session caching
    * [ JBAS-6186 ] Use JBossWebMetaData to drive DistributedCacheManagerFactory
    * [ JBAS-6189 ] Add plain reports to the test target
    * [ JBAS-6201 ] Eliminate injection of DistributedReplicantManagerImpl into ClusterPartition
    * [ JBAS-6237 ] Remove the old JMX kernel's dependency on the Deployment layer
    * [ JBAS-6238 ] Remove JBossMQ from the 5.0.0 branch
    * [ JBAS-6249 ] Pick a different port for the JBM Data channel's MPING
    * [ JBAS-6254 ] Provide an implementation for ejb3 CachedConnectionManager SPI
    * [ JBAS-6261 ] Rename cluster-jboss-beans.xml to hapartition-jboss-beans.xml
    * [ JBAS-6263 ] Use Microcontainer to build JBC configs
    * [ JBAS-6271 ] Create a 'standard' config out of the 'cts' one.
    * [ JBAS-6273 ] Create release notes for AS 5.0.0.GA
    * [ JBAS-6279 ] Remove assumption about who master is from HA Singleton test cases
    * [ JBAS-6280 ] Refresh the communit docs

Sub-task

    * [ JBAS-3858 ] Update jbossweb-cluster.aop to match the current configuration
    * [ JBAS-5349 ] Test bootstrap dependencies
    * [ JBAS-5370 ] Deploy an ear/war app through ProfileService
    * [ JBAS-5856 ] SBM-compatible JBM remoting connector config
    * [ JBAS-5858 ] Add @JMX annotation to ServiceBindingManager
    * [ JBAS-5953 ] JBoss-AS-5.0.x-TestSuite-sun16-sun16 - org.jboss.test.jmx.test.UndeployBrokenPackageUnitTestCase
    * [ JBAS-5969 ] Remove dependency of AOP on VFSDeploymentUnit
    * [ JBAS-5970 ] Remove dependency of AOP on ServiceMBeanSupport
    * [ JBAS-5984 ] Make names unique in jbossweb-cluster.aop/META-INF/jboss-aop.xml
    * [ JBAS-5985 ] Make the switch in aop.xml and deployers.xml
    * [ JBAS-5986 ] Remove jboss-aop.xml from the deployment for aop.AnnotatedTestCase and aop.ScopedAnnotatedTestCase
    * [ JBAS-5987 ] Add new tests for scoped aspects with dependencies
    * [ JBAS-5996 ] Move TomcatDeployer.securityManagerService injection out of the deployer
    * [ JBAS-5997 ] iiop-service.xml is missing naming service dependencies
    * [ JBAS-6036 ] Add tests for restart of server to validate profileservice overrides are applied
    * [ JBAS-6037 ] Restore ProfileService attachments persistence
    * [ JBAS-6042 ] Remove the user of LoaderRepositoryConfig as an attachment
    * [ JBAS-6055 ] Use the enforcer plugin to avoid bringing in duplicate/wrong dependencies
    * [ JBAS-6082 ] JUDDIService.setBindJaxr cannot attempt to bind into jndi
    * [ JBAS-6083 ] HAPartitionCacheHandler.cache injection is broken
    * [ JBAS-6096 ] Upgrade ha-server-cache-jbc
    * [ JBAS-6121 ] Upgrate JAXR to 1.2.1.GA
    * [ JBAS-6124 ] regression - org.jboss.test.jcaprops.test.*
    * [ JBAS-6125 ] regression - org.jboss.test.deployers.seam.test.SeamVFSClassloadingUnitTestCase
    * [ JBAS-6139 ] Create a hudson job that builds using a clean local maven repo.
    * [ JBAS-6141 ] Upgrade to jboss-server-manager 1.0.0.GA and jboss-test 1.1.3.GA
    * [ JBAS-6146 ] JBoss-AS-5.0.x-TestSuite-jrockit16-jrockit16 - server all fails to shutdown
    * [ JBAS-6151 ] Upgrade JBossXACML dependency to 2.0.2.SP1
    * [ JBAS-6166 ] regression - org.jboss.test.security.test.authorization.XACMLEJBIntegrationUnitTestCase
    * [ JBAS-6167 ] Restore the ServerInfo bean/mbean
    * [ JBAS-6168 ] Modify the Bootstrap spi to pass the kernel deployments loaded by the Server bootstrap
    * [ JBAS-6178 ] JBoss-AS-5.0.x-CompatibilityMatrix Failures
    * [ JBAS-6187 ] Break out profileservice spi from jboss-system.jar
    * [ JBAS-6190 ] repository based ProfileService hot deployment is not working
    * [ JBAS-6191 ] VFS URL Handler Stubs for JDK PolicyFile implementation to read vfs entries
    * [ JBAS-6198 ] Javadoc for ManagedOperation.invoke() says it will return a MetaValue, but it's returning unwrapped Objects
    * [ JBAS-6199 ] break out profileservice spis as a separate project
    * [ JBAS-6203 ] "config-property" property on Local Datasource managed component returns incorrect MetaType
    * [ JBAS-6210 ] common core to 2.2.10.GA
    * [ JBAS-6211 ] jboss integration to 5.0.2.GA
    * [ JBAS-6215 ] when creating a new Datasource via managementView.applyTemplate(), if the "metadata" 
CompositeValue property contains no items or a null-valued item, the ds.xml file is written with an empty "metadata" 
element, which causes the deployer to complain
    * [ JBAS-6216 ] ManagementView.getComponentsForType(type) returns null, rather than an empty Set, if no Components of the specified 
type are deployed
    * [ JBAS-6217 ] JBossWebRealm->enableAuditFlag should be false by default
    * [ JBAS-6234 ] ManagedProperty contains certain metadata that is not contained in MetaType
    * [ JBAS-6245 ] org.jboss.test.asynch.AsynchTestCase
    * [ JBAS-6246 ] org.jboss.test.web.test.JSFIntegrationUnitTestCase
    * [ JBAS-6247 ] org.jboss.test.xml.DDValidatorUnitTestCase
    * [ JBAS-6248 ] org.jboss.test.profileservice.override.test.JmsDestinationOverrideTestCase
    * [ JBAS-6251 ] 15 failures in JBossWS-3.0.4.GA-testsuite-AS5.0.x
    * [ JBAS-6253 ] Management interface for HAPartition and DRM
    * [ JBAS-6255 ] 8 test-aop-scoped failures
    * [ JBAS-6269 ] regression - org.jboss.test.refs.test.ResourceResolutionUnitTestCase.testClientORBResources
    * [ JBAS-6270 ] ManagementView.getDeploymentNames does not show the bootstrap deployment names

Thirdparty Change

    * [ JBAS-5597 ] Track jboss and thirdparty dependencies upgrades for JBoss 5.0.0.GA

Component Upgrade

    * [ JBAS-5382 ] Upgrade PojoCache to 3.0.0.GA
    * [ JBAS-5894 ] Upgrade jboss AOP to 2.0.0.GA
    * [ JBAS-5919 ] Upgrade jboss transactions to 4.4.0.GA
    * [ JBAS-5927 ] Upgrade jboss-integration spis to 5.0.1.GA
    * [ JBAS-6004 ] Upgrade jbossws to 3.0.4.GA
    * [ JBAS-6015 ] Upgrade seam-integration to 5.0.0.GA
    * [ JBAS-6016 ] Upgrade JBossWeb to 2.1.1.GA
    * [ JBAS-6018 ] Upgrade jboss-javaee apis to 5.0.0.GA
    * [ JBAS-6019 ] Upgrade JBoss Aspects to their final version
    * [ JBAS-6021 ] Upgrade jboss-security to 2.0.2.SP3
    * [ JBAS-6022 ] Upgrade jboss vfs to 2.0.0.GA
    * [ JBAS-6024 ] Upgrade jbossxb to 2.0.0.GA
    * [ JBAS-6025 ] Upgrade to jnp-client/server 5.0.0.GA
    * [ JBAS-6026 ] Upgrade jboss-messaging to 1.4.1.GA
    * [ JBAS-6045 ] Upgrade jboss-microcontainer to 2.0.0.GA
    * [ JBAS-6046 ] Upgrade jboss-managed/metatype to 2.0.0.GA
    * [ JBAS-6048 ] Upgrade jboss-deployers to 2.0.0.GA
    * [ JBAS-6049 ] Upgrade jboss-reflect to 2.0.0.GA
    * [ JBAS-6050 ] Upgrade jboss-mdr to 2.0.0.GA
    * [ JBAS-6051 ] Upgrade jboss-classloading to 2.0.1.GA
    * [ JBAS-6053 ] Upgrade jboss-jaxbintros to a final release
    * [ JBAS-6063 ] Upgrade javassist to 3.9.0.GA
    * [ JBAS-6065 ] Upgrade jgroups
    * [ JBAS-6079 ] Upgrade JBoss Cache to 3.0.1.GA
    * [ JBAS-6100 ] JBoss Remoting update needed
    * [ JBAS-6233 ] Upgrade jboss-reflect to 2.0.1.GA
Trackback 1 Comment 0
2009.03.10 09:38

JBoss 설정하기




Boss 설정하기

# jboss설치
-http://labs.jboss.com/ 에서 최근버전을 받아서 압축을 푼다
-자바 환경변수는 1.5버전을 추천한다. 
-JBOSS_HOME/bin/run.bat 실행 후 http://localhost:8080/으로 확인한다.
-JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/root.war 이 경로가 디폴트로 보여진다.

# jboss deploy 폴더 설정
-JBOSS_HOME/server/default/conf/jboss-service.xml의 아래 예시와 같이 콤마(,)를 구분자로 하여 배포파일 또는 폴더를 추가한다.
-디폴트는 deploy/ 폴더이고 경로의 끝에 슬래쉬(/)를 붙이면 폴더로 인식한다.
-주의할 점은 jar, war, ear같은 파일뒤에 슬래쉬를 붙이면 deploy 되지 않지만 JBOSS_HOME/server/default/deploy폴더 속에 aaa.jar 과 같은 이름의 폴더는 deploy 가능하다.

      <attribute name="URLs">
        deploy/,
        file:///D:/aa/bbb/ccccejb.jar
      </attribute>
      
# jboss 오라클 드라이버 설정
-ojdbc14.zip를 JBOSS_HOME/server/default/lib 폴더에 복사
-JBOSS_HOME/docs/examples/jca/oracle-ds.xml을 JBOSS_HOME/server/default/deploy 폴더에 복사
-oracle-ds.xml를 아래와 같이 수정
  <local-tx-datasource>
    <jndi-name>oracle</jndi-name>
    <connection-url>jdbc:oracle:thin:@127.0.0.1:1521:orcl(일반적으로)</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>xxx</user-name>
    <password>yyy</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <metadata>
         <type-mapping>Oracle9i</type-mapping>
      </metadata>
  </local-tx-datasource>
  
-jboss를 restart하면 콘솔에서
[WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=oracle' to JNDI name 'java:oracle'
메시지 확인 가능  
  
-WEB-INF/web.xml 수정
 <resource-ref>
  <res-ref-name>jdbc/oracle</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <res-auth>Container</res-auth>
 </resource-ref>
 
-WEB-INF/jboss-web.xml
 <resource-ref>
  <res-ref-name>jdbc/oracle</res-ref-name>
  <jndi-name>java:oracle</jndi-name>
 </resource-ref> 
 
# 기타 라이브러리 추가
ojdbc.jar 파일 등 
서비스시 필요한 라이브러리는 JBOSS_HOME/server/default/lib 폴더에 복사한다

# 서비스 루트 설정
WEB-INF/jboss-web.xml 아래 소스 추가 또는 수정
 <context-root>/</context-root>

# 서비스 설정이 되었다면 이클립스로 가서 유저 라이브러리를 설정해 ejb를 사용해 보자. 
이클립스를 실행하고 환경설정에 가서 JAVA 항목으로 간다. 
두번째 유저 라이브러리 항목을 설정하고 EJB 라는 이름을 라이브러리를 만든다.
그리고 필요한 jar 파일을 가져오자. 

Trackback 0 Comment 0
2009.03.06 14:53

jboss 에서 datasource 설정 하기 및 테스트




\server\qnsolv\deploy\ oracle-ds.xml 파일 생성한다.

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>jdbc.dsCizle</jndi-name>
    <connection-url>jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:HEAVEN</connection-url>

    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>user_xxx</user-name>
    <password>user_xxx00</password>
 
    <min-pool-size>10</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
    
   <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <metadata>
     <type-mapping>Oracle9i</type-mapping>
    </metadata>
  </local-tx-datasource>

</datasources>


jsp 소스


<%@page import="javax.transaction.Transaction"%>
<%@page import="javax.transaction.TransactionManager"%>
<%@page import="javax.transaction.UserTransaction"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>

<%@ page import="java.sql.Connection"%>
<%@ page import="javax.sql.DataSource"%>
<%@ page import="javax.naming.Context"%>
<%@ page import="javax.naming.InitialContext"%>
oracle test<br>
<%
Connection con=null;
Connection conmysql=null;
InitialContext ctx=null;
DataSource datasource=null;
TransactionManager tm=null;
ResultSet rs=null;
Statement stmt=null;
try {
ctx = new InitialContext();
tm = (TransactionManager)ctx.lookup("java:/TransactionManager");
tm.begin();
datasource = (DataSource) ctx.lookup("java:/jdbc.dsCizle");
out.println("<br>datasource==" + datasource);
con = datasource.getConnection();
out.println("<br>tm="+tm);
stmt = con.createStatement();
rs = stmt.executeQuery("select count(*) cnt from aa");
while(rs.next()){
out.println("<br/>start cnt="+rs.getString("cnt")+"<br/>");
}
stmt.executeUpdate("insert into aa(a) values(1)");
out.println("<br>after insert date<br>");
rs = stmt.executeQuery("select count(*) cnt from aa");
while(rs.next()){
out.println("insert cnt="+rs.getString("cnt"));
}
rs = stmt.executeQuery("select a from aa");
while(rs.next()){
out.println("<br>"+rs.getString("a"));
}
out.println("<br>");
tm.rollback();
rs = stmt.executeQuery("select count(*) cnt from aa");
while(rs.next()){
out.println("rollback cnt="+rs.getString("cnt"));
}
out.println("<br>after rollback date");
rs = stmt.executeQuery("select a from aa");
while(rs.next()){
out.println("<br>"+rs.getString("a"));
}
} catch (Exception e) {
try{
con.close();
ctx.close();
tm.rollback();
}catch(Exception e2){
}
e.printStackTrace();
}
%>

Trackback 0 Comment 0


티스토리 툴바