Compare commits
28 Commits
bb2d93d3c3
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d2b23e3513 | |||
| 387880d926 | |||
| a4a4913958 | |||
| e7d80a1fbc | |||
| 7859b5c801 | |||
| 1f51386b57 | |||
| 1ab7c5836d | |||
| 66f9a12491 | |||
| ca8220960a | |||
| 845e3ad05e | |||
| 6c493feafc | |||
| 4ad1f88623 | |||
| 0451f187f5 | |||
| fb9df23db7 | |||
| db2e755fcb | |||
| 96e34686a7 | |||
| 5c2fe4303f | |||
| b930f460c8 | |||
| a7ecd6f3ab | |||
| 23342a1bf5 | |||
| 5b4e30baaa | |||
| 9edd9ebaeb | |||
| b6de6840d3 | |||
| 32f7cd07d9 | |||
| 2c5feb25f6 | |||
| 948671d63a | |||
| 4fbd462714 | |||
| d4502eb762 |
@@ -47,3 +47,11 @@ result
|
|||||||
|
|
||||||
### Angualr Demo ###
|
### Angualr Demo ###
|
||||||
**/node_modules
|
**/node_modules
|
||||||
|
|
||||||
|
### Java LSP ###
|
||||||
|
.jdtls
|
||||||
|
|
||||||
|
### Wildfly ###
|
||||||
|
.wildfly-base/*
|
||||||
|
!.wildfly-base/configuration/
|
||||||
|
.wildfly-base/configuration/standalone_xml_history
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# Properties declaration of users roles for the realm 'ApplicationRealm' which is the default realm
|
||||||
|
# for application services on a new installation.
|
||||||
|
#
|
||||||
|
# This includes the following protocols: remote ejb, remote jndi, web, remote jms
|
||||||
|
#
|
||||||
|
# Users can be added to this properties file at any time, updates after the server has started
|
||||||
|
# will be automatically detected.
|
||||||
|
#
|
||||||
|
# The format of this file is as follows: -
|
||||||
|
# username=role1,role2,role3
|
||||||
|
#
|
||||||
|
# A utility script is provided which can be executed from the bin folder to add the users: -
|
||||||
|
# - Linux
|
||||||
|
# bin/add-user.sh
|
||||||
|
#
|
||||||
|
# - Windows
|
||||||
|
# bin\add-user.bat
|
||||||
|
#
|
||||||
|
# The following illustrates how an admin user could be defined.
|
||||||
|
#
|
||||||
|
#admin=PowerUser,BillingAdmin,
|
||||||
|
#guest=guest
|
||||||
|
guest=guest
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#
|
||||||
|
# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm
|
||||||
|
# for application services on a new installation.
|
||||||
|
#
|
||||||
|
# This includes the following protocols: remote ejb, remote jndi, web, remote jms
|
||||||
|
#
|
||||||
|
# Users can be added to this properties file at any time, updates after the server has started
|
||||||
|
# will be automatically detected.
|
||||||
|
#
|
||||||
|
# The format of this realm is as follows: -
|
||||||
|
# username=HEX( MD5( username ':' realm ':' password))
|
||||||
|
#
|
||||||
|
# A utility script is provided which can be executed from the bin folder to add the users: -
|
||||||
|
# - Linux
|
||||||
|
# bin/add-user.sh
|
||||||
|
#
|
||||||
|
# - Windows
|
||||||
|
# bin\add-user.bat
|
||||||
|
#
|
||||||
|
#$REALM_NAME=ApplicationRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
|
||||||
|
#
|
||||||
|
# The following illustrates how an admin user could be defined, this
|
||||||
|
# is for illustration only and does not correspond to a usable password.
|
||||||
|
#
|
||||||
|
#admin=2a0923285184943425d1f53ddd58ec7a
|
||||||
|
guest=b5d048a237bfd2874b6928e1f37ee15e
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# Note this file has been generated and will be overwritten if a
|
||||||
|
# logging subsystem has been defined in the XML configuration.
|
||||||
|
|
||||||
|
|
||||||
|
# Additional loggers to configure (the root logger is always configured)
|
||||||
|
loggers=sun.rmi,com.networknt.schema,io.jaegertracing.Configuration,org.jboss.as.config,com.arjuna
|
||||||
|
|
||||||
|
logger.level=INFO
|
||||||
|
logger.handlers=FILE,CONSOLE
|
||||||
|
|
||||||
|
logger.sun.rmi.level=WARN
|
||||||
|
logger.sun.rmi.useParentHandlers=true
|
||||||
|
|
||||||
|
logger.com.networknt.schema.level=WARN
|
||||||
|
logger.com.networknt.schema.useParentHandlers=true
|
||||||
|
|
||||||
|
logger.io.jaegertracing.Configuration.level=WARN
|
||||||
|
logger.io.jaegertracing.Configuration.useParentHandlers=true
|
||||||
|
|
||||||
|
logger.org.jboss.as.config.level=DEBUG
|
||||||
|
logger.org.jboss.as.config.useParentHandlers=true
|
||||||
|
|
||||||
|
logger.com.arjuna.level=WARN
|
||||||
|
logger.com.arjuna.useParentHandlers=true
|
||||||
|
|
||||||
|
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
|
||||||
|
handler.CONSOLE.level=INFO
|
||||||
|
handler.CONSOLE.formatter=COLOR-PATTERN
|
||||||
|
handler.CONSOLE.properties=autoFlush,target
|
||||||
|
handler.CONSOLE.autoFlush=true
|
||||||
|
handler.CONSOLE.target=SYSTEM_OUT
|
||||||
|
|
||||||
|
handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
|
||||||
|
handler.FILE.level=ALL
|
||||||
|
handler.FILE.formatter=PATTERN
|
||||||
|
handler.FILE.properties=autoFlush,append,fileName,suffix
|
||||||
|
handler.FILE.constructorProperties=fileName,append
|
||||||
|
handler.FILE.autoFlush=true
|
||||||
|
handler.FILE.append=true
|
||||||
|
handler.FILE.fileName=/home/oq/repos/itc.componentware/.wildfly-base/log/server.log
|
||||||
|
handler.FILE.suffix=.yyyy-MM-dd
|
||||||
|
|
||||||
|
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
|
||||||
|
formatter.PATTERN.properties=pattern
|
||||||
|
formatter.PATTERN.pattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %-5p [%c] (%t) %s%e%n
|
||||||
|
|
||||||
|
formatter.COLOR-PATTERN=org.jboss.logmanager.formatters.PatternFormatter
|
||||||
|
formatter.COLOR-PATTERN.properties=pattern
|
||||||
|
formatter.COLOR-PATTERN.pattern=%K{level}%d{HH\:mm\:ss,SSS} %-5p [%c] (%t) %s%e%n
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Properties declaration of users groups for the realm 'ManagementRealm'.
|
||||||
|
#
|
||||||
|
# This is used for domain management, users groups membership information is used to assign the user
|
||||||
|
# specific management roles.
|
||||||
|
#
|
||||||
|
# Users can be added to this properties file at any time, updates after the server has started
|
||||||
|
# will be automatically detected.
|
||||||
|
#
|
||||||
|
# The format of this file is as follows: -
|
||||||
|
# username=role1,role2,role3
|
||||||
|
#
|
||||||
|
# A utility script is provided which can be executed from the bin folder to add the users: -
|
||||||
|
# - Linux
|
||||||
|
# bin/add-user.sh
|
||||||
|
#
|
||||||
|
# - Windows
|
||||||
|
# bin\add-user.bat
|
||||||
|
#
|
||||||
|
# The following illustrates how an admin user could be defined.
|
||||||
|
#
|
||||||
|
#admin=PowerUser,BillingAdmin,
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#
|
||||||
|
# Properties declaration of users for the realm 'ManagementRealm' which is the default realm
|
||||||
|
# for new installations. Further authentication mechanism can be configured
|
||||||
|
# as part of the <management /> in standalone.xml.
|
||||||
|
#
|
||||||
|
# Users can be added to this properties file at any time, updates after the server has started
|
||||||
|
# will be automatically detected.
|
||||||
|
#
|
||||||
|
# By default the properties realm expects the entries to be in the format: -
|
||||||
|
# username=HEX( MD5( username ':' realm ':' password))
|
||||||
|
#
|
||||||
|
# A utility script is provided which can be executed from the bin folder to add the users: -
|
||||||
|
# - Linux
|
||||||
|
# bin/add-user.sh
|
||||||
|
#
|
||||||
|
# - Windows
|
||||||
|
# bin\add-user.bat
|
||||||
|
#
|
||||||
|
#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
|
||||||
|
#
|
||||||
|
# On start-up the server will also automatically add a user $local - this user is specifically
|
||||||
|
# for local tools running against this AS installation.
|
||||||
|
#
|
||||||
|
# The following illustrates how an admin user could be defined, this
|
||||||
|
# is for illustration only and does not correspond to a usable password.
|
||||||
|
#
|
||||||
|
#admin=2a0923285184943425d1f53ddd58ec7a
|
||||||
@@ -0,0 +1,659 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.clustering.jgroups"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.ejb3"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jdr"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.jsf"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.mail"/>
|
||||||
|
<extension module="org.jboss.as.modcluster"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.pojo"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.sar"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.webservices"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.batch.jberet"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.ejb"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.singleton"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.discovery"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.messaging-activemq"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
<extension module="org.wildfly.iiop-openjdk"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:batch-jberet:3.0">
|
||||||
|
<default-job-repository name="in-memory"/>
|
||||||
|
<default-thread-pool name="batch"/>
|
||||||
|
<security-domain name="ApplicationDomain"/>
|
||||||
|
<job-repository name="in-memory">
|
||||||
|
<in-memory/>
|
||||||
|
</job-repository>
|
||||||
|
<thread-pool name="batch">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="30" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:discovery:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-ejb:community:2.0">
|
||||||
|
<bean-management default="default">
|
||||||
|
<infinispan-bean-management name="default" max-active-beans="10000" cache-container="ejb"/>
|
||||||
|
</bean-management>
|
||||||
|
<infinispan-client-mappings-registry cache-container="ejb" cache="client-mappings"/>
|
||||||
|
<infinispan-timer-management name="transient" cache-container="ejb" cache="transient"/>
|
||||||
|
<infinispan-timer-management name="persistent" cache-container="ejb" cache="persistent"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<primary-owner-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<infinispan-routing cache-container="web" cache="routing"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
|
||||||
|
<session-bean>
|
||||||
|
<stateless>
|
||||||
|
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
|
||||||
|
</stateless>
|
||||||
|
<stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
|
||||||
|
<singleton default-access-timeout="5000"/>
|
||||||
|
</session-bean>
|
||||||
|
<mdb>
|
||||||
|
<resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
|
||||||
|
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
|
||||||
|
</mdb>
|
||||||
|
<pools>
|
||||||
|
<bean-instance-pools>
|
||||||
|
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
</bean-instance-pools>
|
||||||
|
</pools>
|
||||||
|
<caches>
|
||||||
|
<simple-cache name="simple"/>
|
||||||
|
<distributable-cache name="distributable"/>
|
||||||
|
</caches>
|
||||||
|
<async thread-pool-name="default"/>
|
||||||
|
<timer-service default-persistent-timer-management="persistent" default-transient-timer-management="transient">
|
||||||
|
<data-stores>
|
||||||
|
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
|
||||||
|
</data-stores>
|
||||||
|
</timer-service>
|
||||||
|
<remote connectors="http-remoting-connector" thread-pool-name="default">
|
||||||
|
<channel-creation-options>
|
||||||
|
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
|
||||||
|
</channel-creation-options>
|
||||||
|
</remote>
|
||||||
|
<thread-pools>
|
||||||
|
<thread-pool name="default">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="60" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</thread-pools>
|
||||||
|
<iiop enable-by-default="false" use-qualified-name="false"/>
|
||||||
|
<default-security-domain value="other"/>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
<default-missing-method-permissions-deny-access value="true"/>
|
||||||
|
<statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<log-system-exceptions value="true"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
|
||||||
|
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:iiop-openjdk:3.0">
|
||||||
|
<orb socket-binding="iiop"/>
|
||||||
|
<initializers security="elytron" transactions="spec"/>
|
||||||
|
<security server-requires-ssl="false" client-requires-ssl="false"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="ejb" default-cache="dist" aliases="sfsb" modules="org.wildfly.clustering.ejb.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<local-cache name="transient">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<replicated-cache name="client-mappings">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<distributed-cache name="dist">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
<distributed-cache name="persistent">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
<invalidation-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</invalidation-cache>
|
||||||
|
<replicated-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="dist" modules="org.wildfly.clustering.session.infinispan.embedded" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<replicated-cache name="sso">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<replicated-cache name="routing">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<distributed-cache name="dist">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="server" default-cache="default" aliases="singleton cluster" modules="org.wildfly.clustering.singleton.server" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<replicated-cache name="default">
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jgroups:community:9.0">
|
||||||
|
<channels default="ee">
|
||||||
|
<channel name="ee" stack="udp" cluster="ejb"/>
|
||||||
|
</channels>
|
||||||
|
<stacks>
|
||||||
|
<stack name="udp">
|
||||||
|
<transport type="UDP" socket-binding="jgroups-udp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<protocol type="PING"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<socket-protocol type="FD_SOCK2" socket-binding="jgroups-udp-fd"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
<stack name="tcp">
|
||||||
|
<transport type="TCP" socket-binding="jgroups-tcp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<socket-protocol type="MPING" socket-binding="jgroups-mping"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
</stacks>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:mail:4.0">
|
||||||
|
<mail-session name="default" jndi-name="java:jboss/mail/Default">
|
||||||
|
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
|
||||||
|
</mail-session>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:messaging-activemq:17.0">
|
||||||
|
<server name="default">
|
||||||
|
<security elytron-domain="ApplicationDomain"/>
|
||||||
|
<cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
|
||||||
|
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<security-setting name="#">
|
||||||
|
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
|
||||||
|
</security-setting>
|
||||||
|
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
|
||||||
|
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
|
||||||
|
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
|
||||||
|
<param name="batch-delay" value="50"/>
|
||||||
|
</http-connector>
|
||||||
|
<in-vm-connector name="in-vm" server-id="0">
|
||||||
|
<param name="buffer-pooling" value="false"/>
|
||||||
|
</in-vm-connector>
|
||||||
|
<http-acceptor name="http-acceptor" http-listener="default"/>
|
||||||
|
<http-acceptor name="http-acceptor-throughput" http-listener="default">
|
||||||
|
<param name="batch-delay" value="50"/>
|
||||||
|
<param name="direct-deliver" value="false"/>
|
||||||
|
</http-acceptor>
|
||||||
|
<in-vm-acceptor name="in-vm" server-id="0">
|
||||||
|
<param name="buffer-pooling" value="false"/>
|
||||||
|
</in-vm-acceptor>
|
||||||
|
<jgroups-broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/>
|
||||||
|
<jgroups-discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
|
||||||
|
<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
|
||||||
|
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
|
||||||
|
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
|
||||||
|
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
|
||||||
|
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
|
||||||
|
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
|
||||||
|
</server>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:modcluster:6.0">
|
||||||
|
<proxy name="default" advertise-socket="modcluster" listener="ajp">
|
||||||
|
<dynamic-load-provider>
|
||||||
|
<load-metric type="cpu"/>
|
||||||
|
</dynamic-load-provider>
|
||||||
|
</proxy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0">
|
||||||
|
<remote-naming/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:singleton:1.0">
|
||||||
|
<singleton-policies default="default">
|
||||||
|
<singleton-policy name="default" cache-container="server">
|
||||||
|
<simple-election-policy/>
|
||||||
|
</singleton-policy>
|
||||||
|
</singleton-policies>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}" default-security-domain="other">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<ajp-listener name="ajp" socket-binding="ajp"/>
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<location name="/" handler="welcome-content"/>
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<handlers>
|
||||||
|
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
|
||||||
|
</handlers>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
|
||||||
|
<endpoint-config name="Standard-Endpoint-Config"/>
|
||||||
|
<endpoint-config name="Recording-Endpoint-Config">
|
||||||
|
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
|
||||||
|
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
|
||||||
|
</pre-handler-chain>
|
||||||
|
</endpoint-config>
|
||||||
|
<client-config name="Standard-Client-Config"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="private">
|
||||||
|
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="unsecure">
|
||||||
|
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="iiop" interface="unsecure" port="3528"/>
|
||||||
|
<socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
|
||||||
|
<socket-binding name="jgroups-mping" interface="private" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
|
||||||
|
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
|
||||||
|
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
|
||||||
|
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="modcluster" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
<outbound-socket-binding name="mail-smtp">
|
||||||
|
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
|
||||||
|
</outbound-socket-binding>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,583 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.ejb3"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jdr"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.jsf"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.mail"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.pojo"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.sar"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.webservices"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.batch.jberet"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.ejb"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.discovery"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.messaging-activemq"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
<extension module="org.wildfly.iiop-openjdk"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:batch-jberet:3.0">
|
||||||
|
<default-job-repository name="in-memory"/>
|
||||||
|
<default-thread-pool name="batch"/>
|
||||||
|
<security-domain name="ApplicationDomain"/>
|
||||||
|
<job-repository name="in-memory">
|
||||||
|
<in-memory/>
|
||||||
|
</job-repository>
|
||||||
|
<thread-pool name="batch">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="30" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:discovery:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-ejb:community:2.0">
|
||||||
|
<bean-management default="default">
|
||||||
|
<infinispan-bean-management name="default" max-active-beans="10000" cache-container="ejb" cache="passivation"/>
|
||||||
|
</bean-management>
|
||||||
|
<local-client-mappings-registry/>
|
||||||
|
<infinispan-timer-management name="persistent" cache-container="ejb" cache="persistent"/>
|
||||||
|
<infinispan-timer-management name="transient" cache-container="ejb" cache="transient"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<local-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<local-routing/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
|
||||||
|
<session-bean>
|
||||||
|
<stateless>
|
||||||
|
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
|
||||||
|
</stateless>
|
||||||
|
<stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>
|
||||||
|
<singleton default-access-timeout="5000"/>
|
||||||
|
</session-bean>
|
||||||
|
<mdb>
|
||||||
|
<resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
|
||||||
|
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
|
||||||
|
</mdb>
|
||||||
|
<pools>
|
||||||
|
<bean-instance-pools>
|
||||||
|
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
</bean-instance-pools>
|
||||||
|
</pools>
|
||||||
|
<caches>
|
||||||
|
<simple-cache name="simple"/>
|
||||||
|
<distributable-cache name="distributable"/>
|
||||||
|
</caches>
|
||||||
|
<async thread-pool-name="default"/>
|
||||||
|
<timer-service thread-pool-name="default" default-data-store="default-file-store">
|
||||||
|
<data-stores>
|
||||||
|
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
|
||||||
|
</data-stores>
|
||||||
|
</timer-service>
|
||||||
|
<remote connectors="http-remoting-connector" thread-pool-name="default">
|
||||||
|
<channel-creation-options>
|
||||||
|
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
|
||||||
|
</channel-creation-options>
|
||||||
|
</remote>
|
||||||
|
<thread-pools>
|
||||||
|
<thread-pool name="default">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="60" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</thread-pools>
|
||||||
|
<iiop enable-by-default="false" use-qualified-name="false"/>
|
||||||
|
<default-security-domain value="other"/>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
<default-missing-method-permissions-deny-access value="true"/>
|
||||||
|
<statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<log-system-exceptions value="true"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
|
||||||
|
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:iiop-openjdk:3.0">
|
||||||
|
<orb socket-binding="iiop"/>
|
||||||
|
<initializers security="elytron" transactions="spec"/>
|
||||||
|
<security server-requires-ssl="false" client-requires-ssl="false"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<local-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="ejb" default-cache="passivation" aliases="sfsb" modules="org.wildfly.clustering.ejb.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<local-cache name="passivation">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="persistent">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store preload="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="transient">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="passivation" modules="org.wildfly.clustering.web.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<local-cache name="passivation">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="sso">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:mail:4.0">
|
||||||
|
<mail-session name="default" jndi-name="java:jboss/mail/Default">
|
||||||
|
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
|
||||||
|
</mail-session>
|
||||||
|
<mail-session name="uebung3" debug="false" jndi-name="java:/jboss/mail/uebung3">
|
||||||
|
<smtp-server outbound-socket-binding-ref="mail-smtp-gmail" ssl="false" tls="true" username="invalid" password="invalid"/>
|
||||||
|
</mail-session>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:messaging-activemq:17.0">
|
||||||
|
<server name="default">
|
||||||
|
<security elytron-domain="ApplicationDomain"/>
|
||||||
|
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<security-setting name="#">
|
||||||
|
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
|
||||||
|
</security-setting>
|
||||||
|
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
|
||||||
|
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
|
||||||
|
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
|
||||||
|
<param name="batch-delay" value="50"/>
|
||||||
|
</http-connector>
|
||||||
|
<in-vm-connector name="in-vm" server-id="0">
|
||||||
|
<param name="buffer-pooling" value="false"/>
|
||||||
|
</in-vm-connector>
|
||||||
|
<http-acceptor name="http-acceptor" http-listener="default"/>
|
||||||
|
<http-acceptor name="http-acceptor-throughput" http-listener="default">
|
||||||
|
<param name="batch-delay" value="50"/>
|
||||||
|
<param name="direct-deliver" value="false"/>
|
||||||
|
</http-acceptor>
|
||||||
|
<in-vm-acceptor name="in-vm" server-id="0">
|
||||||
|
<param name="buffer-pooling" value="false"/>
|
||||||
|
</in-vm-acceptor>
|
||||||
|
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
|
||||||
|
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
|
||||||
|
<jms-queue name="MyQueue" entries="java:/jms/queue/MyQueue java:jboss/exported/jms/queue/MyQueue"/>
|
||||||
|
<jms-topic name="Praktikum3Topic" entries="java:/jms/topic/Praktikum3Topic java:jboss/exported/jms/topic/Praktikum3Topic"/>
|
||||||
|
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
|
||||||
|
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
|
||||||
|
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
|
||||||
|
</server>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0">
|
||||||
|
<remote-naming/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}" default-security-domain="other">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<location name="/" handler="welcome-content"/>
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<handlers>
|
||||||
|
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
|
||||||
|
</handlers>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
|
||||||
|
<endpoint-config name="Standard-Endpoint-Config"/>
|
||||||
|
<endpoint-config name="Recording-Endpoint-Config">
|
||||||
|
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
|
||||||
|
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
|
||||||
|
</pre-handler-chain>
|
||||||
|
</endpoint-config>
|
||||||
|
<client-config name="Standard-Client-Config"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="unsecure">
|
||||||
|
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="iiop" interface="unsecure" port="3528"/>
|
||||||
|
<socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
<outbound-socket-binding name="mail-smtp">
|
||||||
|
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
|
||||||
|
</outbound-socket-binding>
|
||||||
|
<outbound-socket-binding name="mail-smtp-gmail">
|
||||||
|
<remote-destination host="smtp.gmail.com" port="587"/>
|
||||||
|
</outbound-socket-binding>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,608 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.clustering.jgroups"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.ejb3"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jdr"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.jsf"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.mail"/>
|
||||||
|
<extension module="org.jboss.as.modcluster"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.pojo"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.sar"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.webservices"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.batch.jberet"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.ejb"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.singleton"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.discovery"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:batch-jberet:3.0">
|
||||||
|
<default-job-repository name="in-memory"/>
|
||||||
|
<default-thread-pool name="batch"/>
|
||||||
|
<security-domain name="ApplicationDomain"/>
|
||||||
|
<job-repository name="in-memory">
|
||||||
|
<in-memory/>
|
||||||
|
</job-repository>
|
||||||
|
<thread-pool name="batch">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="30" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:discovery:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-ejb:community:2.0">
|
||||||
|
<bean-management default="default">
|
||||||
|
<infinispan-bean-management name="default" max-active-beans="10000" cache-container="ejb"/>
|
||||||
|
</bean-management>
|
||||||
|
<infinispan-client-mappings-registry cache-container="ejb" cache="client-mappings"/>
|
||||||
|
<infinispan-timer-management name="transient" cache-container="ejb" cache="transient"/>
|
||||||
|
<infinispan-timer-management name="persistent" cache-container="ejb" cache="persistent"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<primary-owner-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<infinispan-routing cache-container="web" cache="routing"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
|
||||||
|
<session-bean>
|
||||||
|
<stateless>
|
||||||
|
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
|
||||||
|
</stateless>
|
||||||
|
<stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
|
||||||
|
<singleton default-access-timeout="5000"/>
|
||||||
|
</session-bean>
|
||||||
|
<pools>
|
||||||
|
<bean-instance-pools>
|
||||||
|
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
</bean-instance-pools>
|
||||||
|
</pools>
|
||||||
|
<caches>
|
||||||
|
<simple-cache name="simple"/>
|
||||||
|
<distributable-cache name="distributable"/>
|
||||||
|
</caches>
|
||||||
|
<async thread-pool-name="default"/>
|
||||||
|
<timer-service default-persistent-timer-management="persistent" default-transient-timer-management="transient">
|
||||||
|
<data-stores>
|
||||||
|
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
|
||||||
|
</data-stores>
|
||||||
|
</timer-service>
|
||||||
|
<remote connectors="http-remoting-connector" thread-pool-name="default">
|
||||||
|
<channel-creation-options>
|
||||||
|
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
|
||||||
|
</channel-creation-options>
|
||||||
|
</remote>
|
||||||
|
<thread-pools>
|
||||||
|
<thread-pool name="default">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="60" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</thread-pools>
|
||||||
|
<default-security-domain value="other"/>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
<default-missing-method-permissions-deny-access value="true"/>
|
||||||
|
<statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<log-system-exceptions value="true"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
|
||||||
|
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="ejb" default-cache="dist" aliases="sfsb" modules="org.wildfly.clustering.ejb.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<local-cache name="transient">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<replicated-cache name="client-mappings">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<distributed-cache name="dist">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
<distributed-cache name="persistent">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
<invalidation-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</invalidation-cache>
|
||||||
|
<replicated-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="dist" modules="org.wildfly.clustering.session.infinispan.embedded" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<replicated-cache name="sso">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<replicated-cache name="routing">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<distributed-cache name="dist">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="server" default-cache="default" aliases="singleton cluster" modules="org.wildfly.clustering.singleton.server" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<replicated-cache name="default">
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jgroups:community:9.0">
|
||||||
|
<channels default="ee">
|
||||||
|
<channel name="ee" stack="udp" cluster="ejb"/>
|
||||||
|
</channels>
|
||||||
|
<stacks>
|
||||||
|
<stack name="udp">
|
||||||
|
<transport type="UDP" socket-binding="jgroups-udp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<protocol type="PING"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<socket-protocol type="FD_SOCK2" socket-binding="jgroups-udp-fd"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
<stack name="tcp">
|
||||||
|
<transport type="TCP" socket-binding="jgroups-tcp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<socket-protocol type="MPING" socket-binding="jgroups-mping"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
</stacks>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:mail:4.0">
|
||||||
|
<mail-session name="default" jndi-name="java:jboss/mail/Default">
|
||||||
|
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
|
||||||
|
</mail-session>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:modcluster:6.0">
|
||||||
|
<proxy name="default" advertise-socket="modcluster" listener="ajp">
|
||||||
|
<dynamic-load-provider>
|
||||||
|
<load-metric type="cpu"/>
|
||||||
|
</dynamic-load-provider>
|
||||||
|
</proxy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0">
|
||||||
|
<remote-naming/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:singleton:1.0">
|
||||||
|
<singleton-policies default="default">
|
||||||
|
<singleton-policy name="default" cache-container="server">
|
||||||
|
<simple-election-policy/>
|
||||||
|
</singleton-policy>
|
||||||
|
</singleton-policies>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}" default-security-domain="other">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<ajp-listener name="ajp" socket-binding="ajp"/>
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<location name="/" handler="welcome-content"/>
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<handlers>
|
||||||
|
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
|
||||||
|
</handlers>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
|
||||||
|
<endpoint-config name="Standard-Endpoint-Config"/>
|
||||||
|
<endpoint-config name="Recording-Endpoint-Config">
|
||||||
|
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
|
||||||
|
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
|
||||||
|
</pre-handler-chain>
|
||||||
|
</endpoint-config>
|
||||||
|
<client-config name="Standard-Client-Config"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="private">
|
||||||
|
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="jgroups-mping" interface="private" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
|
||||||
|
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
|
||||||
|
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
|
||||||
|
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="modcluster" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
<outbound-socket-binding name="mail-smtp">
|
||||||
|
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
|
||||||
|
</outbound-socket-binding>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,239 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<http-listener name="management" socket-binding="mcmp-management" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<filter-ref name="load-balancer"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default"/>
|
||||||
|
<filters>
|
||||||
|
<mod-cluster name="load-balancer" management-socket-binding="mcmp-management" advertise-socket-binding="modcluster" enable-http2="true" max-retries="3">
|
||||||
|
<single-affinity/>
|
||||||
|
</mod-cluster>
|
||||||
|
</filters>
|
||||||
|
</subsystem>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="private">
|
||||||
|
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="mcmp-management" interface="private" port="${jboss.mcmp.port:8090}"/>
|
||||||
|
<socket-binding name="modcluster" interface="private" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,467 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.clustering.jgroups"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.messaging-activemq"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.fault-tolerance-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.openapi-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.telemetry"/>
|
||||||
|
<extension module="org.wildfly.extension.opentelemetry"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<primary-owner-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<infinispan-routing cache-container="web" cache="routing"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
<invalidation-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</invalidation-cache>
|
||||||
|
<replicated-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="dist" modules="org.wildfly.clustering.session.infinispan.embedded" marshaller="PROTOSTREAM">
|
||||||
|
<transport lock-timeout="60000"/>
|
||||||
|
<replicated-cache name="sso">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<replicated-cache name="routing">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</replicated-cache>
|
||||||
|
<distributed-cache name="dist">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</distributed-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jgroups:community:9.0">
|
||||||
|
<channels default="ee">
|
||||||
|
<channel name="ee" stack="udp" cluster="ejb"/>
|
||||||
|
</channels>
|
||||||
|
<stacks>
|
||||||
|
<stack name="udp">
|
||||||
|
<transport type="UDP" socket-binding="jgroups-udp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<protocol type="PING"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<socket-protocol type="FD_SOCK2" socket-binding="jgroups-udp-fd"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
<stack name="tcp">
|
||||||
|
<transport type="TCP" socket-binding="jgroups-tcp"/>
|
||||||
|
<protocol type="RED"/>
|
||||||
|
<socket-protocol type="MPING" socket-binding="jgroups-mping"/>
|
||||||
|
<protocol type="MERGE3"/>
|
||||||
|
<protocol type="FD_ALL3"/>
|
||||||
|
<protocol type="VERIFY_SUSPECT2"/>
|
||||||
|
<protocol type="NAKACK4"/>
|
||||||
|
<protocol type="UNICAST4"/>
|
||||||
|
<protocol type="pbcast.GMS"/>
|
||||||
|
<protocol type="FRAG4"/>
|
||||||
|
</stack>
|
||||||
|
</stacks>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:messaging-activemq:17.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-fault-tolerance-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-health-smallrye:3.0" security-enabled="false" empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}" empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}" empty-startup-checks-status="${env.MP_HEALTH_EMPTY_STARTUP_CHECKS_STATUS:UP}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-openapi-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-telemetry:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:opentelemetry:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="private">
|
||||||
|
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="jgroups-mping" interface="private" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
|
||||||
|
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
|
||||||
|
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
|
||||||
|
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,418 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.messaging-activemq"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.fault-tolerance-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.openapi-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.telemetry"/>
|
||||||
|
<extension module="org.wildfly.extension.opentelemetry"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<local-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<local-routing/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<local-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="passivation" modules="org.wildfly.clustering.web.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<local-cache name="passivation">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="sso">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:messaging-activemq:17.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-fault-tolerance-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-health-smallrye:3.0" security-enabled="false" empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}" empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}" empty-startup-checks-status="${env.MP_HEALTH_EMPTY_STARTUP_CHECKS_STATUS:UP}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-openapi-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-telemetry:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:opentelemetry:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
@@ -0,0 +1,528 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<server xmlns="urn:jboss:domain:community:20.0">
|
||||||
|
<extensions>
|
||||||
|
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||||
|
<extension module="org.jboss.as.connector"/>
|
||||||
|
<extension module="org.jboss.as.deployment-scanner"/>
|
||||||
|
<extension module="org.jboss.as.ee"/>
|
||||||
|
<extension module="org.jboss.as.ejb3"/>
|
||||||
|
<extension module="org.jboss.as.jaxrs"/>
|
||||||
|
<extension module="org.jboss.as.jdr"/>
|
||||||
|
<extension module="org.jboss.as.jmx"/>
|
||||||
|
<extension module="org.jboss.as.jpa"/>
|
||||||
|
<extension module="org.jboss.as.jsf"/>
|
||||||
|
<extension module="org.jboss.as.logging"/>
|
||||||
|
<extension module="org.jboss.as.mail"/>
|
||||||
|
<extension module="org.jboss.as.naming"/>
|
||||||
|
<extension module="org.jboss.as.pojo"/>
|
||||||
|
<extension module="org.jboss.as.remoting"/>
|
||||||
|
<extension module="org.jboss.as.sar"/>
|
||||||
|
<extension module="org.jboss.as.transactions"/>
|
||||||
|
<extension module="org.jboss.as.webservices"/>
|
||||||
|
<extension module="org.jboss.as.weld"/>
|
||||||
|
<extension module="org.wildfly.extension.batch.jberet"/>
|
||||||
|
<extension module="org.wildfly.extension.bean-validation"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.ejb"/>
|
||||||
|
<extension module="org.wildfly.extension.clustering.web"/>
|
||||||
|
<extension module="org.wildfly.extension.core-management"/>
|
||||||
|
<extension module="org.wildfly.extension.discovery"/>
|
||||||
|
<extension module="org.wildfly.extension.ee-security"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron"/>
|
||||||
|
<extension module="org.wildfly.extension.elytron-oidc-client"/>
|
||||||
|
<extension module="org.wildfly.extension.health"/>
|
||||||
|
<extension module="org.wildfly.extension.io"/>
|
||||||
|
<extension module="org.wildfly.extension.metrics"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.microprofile.jwt-smallrye"/>
|
||||||
|
<extension module="org.wildfly.extension.request-controller"/>
|
||||||
|
<extension module="org.wildfly.extension.security.manager"/>
|
||||||
|
<extension module="org.wildfly.extension.undertow"/>
|
||||||
|
</extensions>
|
||||||
|
<management>
|
||||||
|
<audit-log>
|
||||||
|
<formatters>
|
||||||
|
<json-formatter name="json-formatter"/>
|
||||||
|
</formatters>
|
||||||
|
<handlers>
|
||||||
|
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||||
|
</handlers>
|
||||||
|
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||||
|
<handlers>
|
||||||
|
<handler name="file"/>
|
||||||
|
</handlers>
|
||||||
|
</logger>
|
||||||
|
</audit-log>
|
||||||
|
<management-interfaces>
|
||||||
|
<http-interface http-authentication-factory="management-http-authentication" console-enabled="true">
|
||||||
|
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
|
||||||
|
<socket-binding http="management-http"/>
|
||||||
|
</http-interface>
|
||||||
|
</management-interfaces>
|
||||||
|
<access-control provider="simple">
|
||||||
|
<role-mapping>
|
||||||
|
<role name="SuperUser">
|
||||||
|
<include>
|
||||||
|
<user name="$local"/>
|
||||||
|
</include>
|
||||||
|
</role>
|
||||||
|
</role-mapping>
|
||||||
|
</access-control>
|
||||||
|
</management>
|
||||||
|
<profile>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:logging:8.0">
|
||||||
|
<console-handler name="CONSOLE">
|
||||||
|
<level name="INFO"/>
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="COLOR-PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
</console-handler>
|
||||||
|
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||||
|
<formatter>
|
||||||
|
<named-formatter name="PATTERN"/>
|
||||||
|
</formatter>
|
||||||
|
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||||
|
<suffix value=".yyyy-MM-dd"/>
|
||||||
|
<append value="true"/>
|
||||||
|
</periodic-rotating-file-handler>
|
||||||
|
<logger category="com.arjuna">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="com.networknt.schema">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="io.jaegertracing.Configuration">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="org.jboss.as.config">
|
||||||
|
<level name="DEBUG"/>
|
||||||
|
</logger>
|
||||||
|
<logger category="sun.rmi">
|
||||||
|
<level name="WARN"/>
|
||||||
|
</logger>
|
||||||
|
<root-logger>
|
||||||
|
<level name="INFO"/>
|
||||||
|
<handlers>
|
||||||
|
<handler name="CONSOLE"/>
|
||||||
|
<handler name="FILE"/>
|
||||||
|
</handlers>
|
||||||
|
</root-logger>
|
||||||
|
<formatter name="PATTERN">
|
||||||
|
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
<formatter name="COLOR-PATTERN">
|
||||||
|
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||||
|
</formatter>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:batch-jberet:3.0">
|
||||||
|
<default-job-repository name="in-memory"/>
|
||||||
|
<default-thread-pool name="batch"/>
|
||||||
|
<security-domain name="ApplicationDomain"/>
|
||||||
|
<job-repository name="in-memory">
|
||||||
|
<in-memory/>
|
||||||
|
</job-repository>
|
||||||
|
<thread-pool name="batch">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="30" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:datasources:7.2">
|
||||||
|
<datasources>
|
||||||
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=${wildfly.h2.compatibility.mode:REGULAR}</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security user-name="sa" password="sa"/>
|
||||||
|
</datasource>
|
||||||
|
<drivers>
|
||||||
|
<driver name="h2" module="com.h2database.h2">
|
||||||
|
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||||
|
</driver>
|
||||||
|
</drivers>
|
||||||
|
</datasources>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||||
|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:discovery:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-ejb:community:2.0">
|
||||||
|
<bean-management default="default">
|
||||||
|
<infinispan-bean-management name="default" max-active-beans="10000" cache-container="ejb" cache="passivation"/>
|
||||||
|
</bean-management>
|
||||||
|
<local-client-mappings-registry/>
|
||||||
|
<infinispan-timer-management name="persistent" cache-container="ejb" cache="persistent"/>
|
||||||
|
<infinispan-timer-management name="transient" cache-container="ejb" cache="transient"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:distributable-web:community:5.0">
|
||||||
|
<session-management default="default">
|
||||||
|
<infinispan-session-management name="default" cache-container="web" granularity="SESSION">
|
||||||
|
<local-affinity/>
|
||||||
|
</infinispan-session-management>
|
||||||
|
</session-management>
|
||||||
|
<single-sign-on-management default="default">
|
||||||
|
<infinispan-single-sign-on-management name="default" cache-container="web" cache="sso"/>
|
||||||
|
</single-sign-on-management>
|
||||||
|
<local-routing/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee:6.0">
|
||||||
|
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||||
|
<concurrent>
|
||||||
|
<context-services>
|
||||||
|
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default"/>
|
||||||
|
</context-services>
|
||||||
|
<managed-thread-factories>
|
||||||
|
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||||
|
</managed-thread-factories>
|
||||||
|
<managed-executor-services>
|
||||||
|
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||||
|
</managed-executor-services>
|
||||||
|
<managed-scheduled-executor-services>
|
||||||
|
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-termination-period="0" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||||
|
</managed-scheduled-executor-services>
|
||||||
|
</concurrent>
|
||||||
|
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
|
||||||
|
<session-bean>
|
||||||
|
<stateless>
|
||||||
|
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
|
||||||
|
</stateless>
|
||||||
|
<stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>
|
||||||
|
<singleton default-access-timeout="5000"/>
|
||||||
|
</session-bean>
|
||||||
|
<pools>
|
||||||
|
<bean-instance-pools>
|
||||||
|
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||||
|
</bean-instance-pools>
|
||||||
|
</pools>
|
||||||
|
<caches>
|
||||||
|
<simple-cache name="simple"/>
|
||||||
|
<distributable-cache name="distributable"/>
|
||||||
|
</caches>
|
||||||
|
<async thread-pool-name="default"/>
|
||||||
|
<timer-service thread-pool-name="default" default-data-store="default-file-store">
|
||||||
|
<data-stores>
|
||||||
|
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
|
||||||
|
</data-stores>
|
||||||
|
</timer-service>
|
||||||
|
<remote connectors="http-remoting-connector" thread-pool-name="default">
|
||||||
|
<channel-creation-options>
|
||||||
|
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
|
||||||
|
</channel-creation-options>
|
||||||
|
</remote>
|
||||||
|
<thread-pools>
|
||||||
|
<thread-pool name="default">
|
||||||
|
<max-threads count="10"/>
|
||||||
|
<keepalive-time time="60" unit="seconds"/>
|
||||||
|
</thread-pool>
|
||||||
|
</thread-pools>
|
||||||
|
<default-security-domain value="other"/>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
<default-missing-method-permissions-deny-access value="true"/>
|
||||||
|
<statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<log-system-exceptions value="true"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron:community:18.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||||
|
<providers>
|
||||||
|
<aggregate-providers name="combined-providers">
|
||||||
|
<providers name="elytron"/>
|
||||||
|
<providers name="openssl"/>
|
||||||
|
</aggregate-providers>
|
||||||
|
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||||
|
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||||
|
</providers>
|
||||||
|
<audit-logging>
|
||||||
|
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||||
|
</audit-logging>
|
||||||
|
<security-domains>
|
||||||
|
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local"/>
|
||||||
|
</security-domain>
|
||||||
|
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||||
|
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||||
|
<realm name="local" role-mapper="super-user-mapper"/>
|
||||||
|
</security-domain>
|
||||||
|
</security-domains>
|
||||||
|
<security-realms>
|
||||||
|
<identity-realm name="local" identity="$local"/>
|
||||||
|
<properties-realm name="ApplicationRealm">
|
||||||
|
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||||
|
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
<properties-realm name="ManagementRealm">
|
||||||
|
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||||
|
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||||
|
</properties-realm>
|
||||||
|
</security-realms>
|
||||||
|
<mappers>
|
||||||
|
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||||
|
<permission-mapping>
|
||||||
|
<principal name="anonymous"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
<permission-mapping match-all="true">
|
||||||
|
<permission-set name="login-permission"/>
|
||||||
|
<permission-set name="default-permissions"/>
|
||||||
|
</permission-mapping>
|
||||||
|
</simple-permission-mapper>
|
||||||
|
<constant-realm-mapper name="local" realm-name="local"/>
|
||||||
|
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||||
|
<constant-role-mapper name="super-user-mapper">
|
||||||
|
<role name="SuperUser"/>
|
||||||
|
</constant-role-mapper>
|
||||||
|
</mappers>
|
||||||
|
<permission-sets>
|
||||||
|
<permission-set name="login-permission">
|
||||||
|
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||||
|
</permission-set>
|
||||||
|
<permission-set name="default-permissions">
|
||||||
|
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||||
|
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
|
||||||
|
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
|
||||||
|
</permission-set>
|
||||||
|
</permission-sets>
|
||||||
|
<http>
|
||||||
|
<http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="BASIC">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="DIGEST">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</http-authentication-factory>
|
||||||
|
<provider-http-server-mechanism-factory name="global"/>
|
||||||
|
</http>
|
||||||
|
<sasl>
|
||||||
|
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||||
|
<mechanism-configuration>
|
||||||
|
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||||
|
<mechanism mechanism-name="DIGEST-MD5">
|
||||||
|
<mechanism-realm realm-name="ManagementRealm"/>
|
||||||
|
</mechanism>
|
||||||
|
</mechanism-configuration>
|
||||||
|
</sasl-authentication-factory>
|
||||||
|
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||||
|
<properties>
|
||||||
|
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||||
|
<property name="wildfly.sasl.local-user.challenge-path" value="${jboss.server.temp.dir}/auth"/>
|
||||||
|
</properties>
|
||||||
|
</configurable-sasl-server-factory>
|
||||||
|
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||||
|
<filters>
|
||||||
|
<filter provider-name="WildFlyElytron"/>
|
||||||
|
</filters>
|
||||||
|
</mechanism-provider-filtering-sasl-server-factory>
|
||||||
|
<provider-sasl-server-factory name="global"/>
|
||||||
|
</sasl>
|
||||||
|
<tls>
|
||||||
|
<key-stores>
|
||||||
|
<key-store name="applicationKS">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
<implementation type="JKS"/>
|
||||||
|
<file path="application.keystore" relative-to="jboss.server.config.dir"/>
|
||||||
|
</key-store>
|
||||||
|
</key-stores>
|
||||||
|
<key-managers>
|
||||||
|
<key-manager name="applicationKM" key-store="applicationKS" generate-self-signed-certificate-host="localhost">
|
||||||
|
<credential-reference clear-text="password"/>
|
||||||
|
</key-manager>
|
||||||
|
</key-managers>
|
||||||
|
<server-ssl-contexts>
|
||||||
|
<server-ssl-context name="applicationSSC" key-manager="applicationKM"/>
|
||||||
|
</server-ssl-contexts>
|
||||||
|
</tls>
|
||||||
|
<policy name="jacc">
|
||||||
|
<jacc-policy/>
|
||||||
|
</policy>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:elytron-oidc-client:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:health:1.0" security-enabled="false"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:infinispan:15.0">
|
||||||
|
<cache-container name="hibernate" modules="org.infinispan.hibernate-cache" marshaller="JBOSS">
|
||||||
|
<local-cache name="entity">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="local-query">
|
||||||
|
<heap-memory size="10000"/>
|
||||||
|
<expiration max-idle="100000"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="timestamps">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="pending-puts">
|
||||||
|
<expiration max-idle="60000"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="ejb" default-cache="passivation" aliases="sfsb" modules="org.wildfly.clustering.ejb.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<local-cache name="passivation">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="persistent">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store preload="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="transient">
|
||||||
|
<locking isolation="REPEATABLE_READ"/>
|
||||||
|
<transaction mode="BATCH"/>
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true" purge="true"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
<cache-container name="web" default-cache="passivation" modules="org.wildfly.clustering.web.infinispan" marshaller="PROTOSTREAM">
|
||||||
|
<local-cache name="passivation">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
<file-store passivation="true"/>
|
||||||
|
</local-cache>
|
||||||
|
<local-cache name="sso">
|
||||||
|
<expiration interval="0"/>
|
||||||
|
</local-cache>
|
||||||
|
</cache-container>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:io:4.0" default-worker="default">
|
||||||
|
<worker name="default"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jaxrs:5.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jca:6.0">
|
||||||
|
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||||
|
<bean-validation enabled="true"/>
|
||||||
|
<default-workmanager>
|
||||||
|
<short-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</short-running-threads>
|
||||||
|
<long-running-threads>
|
||||||
|
<core-threads count="50"/>
|
||||||
|
<queue-length count="50"/>
|
||||||
|
<max-threads count="50"/>
|
||||||
|
<keepalive-time time="10" unit="seconds"/>
|
||||||
|
</long-running-threads>
|
||||||
|
</default-workmanager>
|
||||||
|
<cached-connection-manager/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||||
|
<expose-resolved-model/>
|
||||||
|
<expose-expression-model/>
|
||||||
|
<remoting-connector/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||||
|
<jpa default-extended-persistence-inheritance="DEEP"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:mail:4.0">
|
||||||
|
<mail-session name="default" jndi-name="java:jboss/mail/Default">
|
||||||
|
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
|
||||||
|
</mail-session>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:wildfly:metrics:1.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:2.0"/>
|
||||||
|
<subsystem xmlns="urn:wildfly:microprofile-jwt-smallrye:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:naming:2.0">
|
||||||
|
<remote-naming/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:remoting:8.0">
|
||||||
|
<endpoint worker="default"/>
|
||||||
|
<http-connector name="http-remoting-connector" connector-ref="default" sasl-authentication-factory="application-sasl-authentication"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:resource-adapters:7.1"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||||
|
<deployment-permissions>
|
||||||
|
<maximum-set>
|
||||||
|
<permission class="java.security.AllPermission"/>
|
||||||
|
</maximum-set>
|
||||||
|
</deployment-permissions>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:transactions:6.0">
|
||||||
|
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||||
|
<process-id>
|
||||||
|
<uuid/>
|
||||||
|
</process-id>
|
||||||
|
</core-environment>
|
||||||
|
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||||
|
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
|
||||||
|
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:undertow:community:14.0" default-virtual-host="default-host" default-servlet-container="default" default-server="default-server" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}" default-security-domain="other">
|
||||||
|
<byte-buffer-pool name="default"/>
|
||||||
|
<buffer-cache name="default"/>
|
||||||
|
<server name="default-server">
|
||||||
|
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||||
|
<https-listener name="https" socket-binding="https" ssl-context="applicationSSC" enable-http2="true"/>
|
||||||
|
<host name="default-host" alias="localhost">
|
||||||
|
<location name="/" handler="welcome-content"/>
|
||||||
|
<http-invoker http-authentication-factory="application-http-authentication"/>
|
||||||
|
</host>
|
||||||
|
</server>
|
||||||
|
<servlet-container name="default">
|
||||||
|
<jsp-config/>
|
||||||
|
<websockets/>
|
||||||
|
</servlet-container>
|
||||||
|
<handlers>
|
||||||
|
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
|
||||||
|
</handlers>
|
||||||
|
<application-security-domains>
|
||||||
|
<application-security-domain name="other" security-domain="ApplicationDomain"/>
|
||||||
|
</application-security-domains>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:webservices:2.0" statistics-enabled="${wildfly.webservices.statistics-enabled:${wildfly.statistics-enabled:false}}">
|
||||||
|
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
|
||||||
|
<endpoint-config name="Standard-Endpoint-Config"/>
|
||||||
|
<endpoint-config name="Recording-Endpoint-Config">
|
||||||
|
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
|
||||||
|
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
|
||||||
|
</pre-handler-chain>
|
||||||
|
</endpoint-config>
|
||||||
|
<client-config name="Standard-Client-Config"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem xmlns="urn:jboss:domain:weld:5.0"/>
|
||||||
|
</profile>
|
||||||
|
<interfaces>
|
||||||
|
<interface name="management">
|
||||||
|
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
<interface name="public">
|
||||||
|
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||||
|
</interface>
|
||||||
|
</interfaces>
|
||||||
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||||
|
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||||
|
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||||
|
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||||
|
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||||
|
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||||
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||||
|
<socket-binding name="txn-status-manager" port="4713"/>
|
||||||
|
<outbound-socket-binding name="mail-smtp">
|
||||||
|
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
|
||||||
|
</outbound-socket-binding>
|
||||||
|
</socket-binding-group>
|
||||||
|
</server>
|
||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
mvn clean install
|
||||||
|
mvn clean package
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# deploy the server
|
||||||
|
#
|
||||||
|
# usage:
|
||||||
|
# deploy server/target/ejb-server-1.0-SNAPSHOT.jar
|
||||||
|
|
||||||
|
cp -v "$1" "$WILDFLY_BASE_DIR/deployments/"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# usage
|
||||||
|
# run org.example.demo.uebung1.aufgabe16.Client
|
||||||
|
|
||||||
|
(cd client && mvn clean compile && mvn exec:java -Dexec.mainClass="$1")
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# starts the server
|
||||||
|
#
|
||||||
|
# usage:
|
||||||
|
# start
|
||||||
|
|
||||||
|
wildfly-fhs -c "standalone-full.xml"
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>de.componentware</groupId>
|
||||||
|
<artifactId>componentware-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<artifactId>ejb-client</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-ejb-client-bom</artifactId>
|
||||||
|
<version>39.0.0.Final</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!-- Server-Interfaces (Remote-Interface etc.) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.componentware</groupId>
|
||||||
|
<artifactId>ejb-server</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Artemis JMS Client (implementation) - must match the Artemis version bundled in WildFly -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>artemis-jakarta-client</artifactId>
|
||||||
|
<version>2.44.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- WildFly Naming Client (Remote JNDI) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-naming-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- Jakarta Messaging API (JMS 3.1) – macht die JMS-Typen verfügbar -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.jms</groupId>
|
||||||
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
<configuration>
|
||||||
|
<classpathScope>runtime</classpathScope>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe1;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
|
||||||
|
"org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
|
InitialContext ctx = new InitialContext(props);
|
||||||
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/Calculator!org.example.demo.praktikum1.aufgabe1.CalculatorRemote";
|
||||||
|
var calc = (CalculatorRemote) ctx.lookup(jndiName);
|
||||||
|
|
||||||
|
System.out.println("6 + 7 = " + calc.addiere(6, 7));
|
||||||
|
System.out.println("6 - 7 = " + calc.subtrahiere(6, 7));
|
||||||
|
System.out.println("6 * 7 = " + calc.multipliziere(6, 7));
|
||||||
|
System.out.println("6 / 7 = " + calc.dividiere(6, 7));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe2;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
|
||||||
|
"org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
|
InitialContext ctx = new InitialContext(props);
|
||||||
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/StatefulCalculator!org.example.demo.praktikum1.aufgabe2.StatefulCalculatorRemote";
|
||||||
|
var calc = (StatefulCalculatorRemote) ctx.lookup(jndiName);
|
||||||
|
|
||||||
|
System.out.println("6 + 7 = " + calc.addiere(6, 7));
|
||||||
|
System.out.println("6 + 7 + 8 = " + calc.addiere(8));
|
||||||
|
System.out.println("6 - 7 = " + calc.subtrahiere(6, 7));
|
||||||
|
System.out.println("6 - 7 - 8 = " + calc.subtrahiere(8));
|
||||||
|
System.out.println("6 * 7 = " + calc.multipliziere(6, 7));
|
||||||
|
System.out.println("6 * 7 * 8 = " + calc.multipliziere(8));
|
||||||
|
System.out.println("6 / 7 = " + calc.dividiere(6, 7));
|
||||||
|
System.out.println("6 / 7 / 8 = " + calc.dividiere(8));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe3;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
|
InitialContext ctx = new InitialContext(props);
|
||||||
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/GuessingGame!org.example.demo.praktikum1.aufgabe3.GuessingGameRemote";
|
||||||
|
var game = (GuessingGameRemote) ctx.lookup(jndiName);
|
||||||
|
var scanner = new Scanner(System.in);
|
||||||
|
var another = true;
|
||||||
|
while (another) {
|
||||||
|
playRound(game, scanner);
|
||||||
|
|
||||||
|
// todo: input exception handling
|
||||||
|
System.out.print("Do you want to play another? ");
|
||||||
|
another = scanner.nextBoolean();
|
||||||
|
}
|
||||||
|
scanner.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void playRound(GuessingGameRemote game, Scanner scanner) {
|
||||||
|
game.init();
|
||||||
|
|
||||||
|
GuessResult result;
|
||||||
|
do {
|
||||||
|
// todo: input exception handling
|
||||||
|
System.out.print("Guess a number from 1-100: ");
|
||||||
|
var guess = scanner.nextInt();
|
||||||
|
result = game.testGuess(guess);
|
||||||
|
|
||||||
|
switch (result) {
|
||||||
|
case Success:
|
||||||
|
System.out.println("Correct! The number was "+ guess);
|
||||||
|
break;
|
||||||
|
case TooBig:
|
||||||
|
System.out.println("Your guess was too big!");
|
||||||
|
break;
|
||||||
|
case TooSmall:
|
||||||
|
System.out.println("Your guess was too small!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (result != GuessResult.Success);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
|
InitialContext ctx = new InitialContext(props);
|
||||||
|
AdresseServiceRemote adresseService = (AdresseServiceRemote) ctx.lookup( "ejb:/ejb-server-1.0-SNAPSHOT/AdresseService!org.example.demo.praktikum2.AdresseServiceRemote");
|
||||||
|
PersonServiceRemote personService = (PersonServiceRemote) ctx.lookup("ejb:/ejb-server-1.0-SNAPSHOT/PersonService!org.example.demo.praktikum2.PersonServiceRemote");
|
||||||
|
|
||||||
|
var adresse = Adresse.builder().strasse("strasse").plz("plz").ort("ort").build();
|
||||||
|
int adresseId = adresseService.speichereAdresse(adresse);
|
||||||
|
System.out.println("Adresse gespeichert mit ID: " + adresseId);
|
||||||
|
System.out.println("Adresse nach dem Speichern: " + adresse);
|
||||||
|
|
||||||
|
var person = Person.builder().name("max").adresse(List.of(adresse)).build();
|
||||||
|
int personId = personService.speicherePerson(person);
|
||||||
|
System.out.println("Person gespeichert mit ID: " + personId);
|
||||||
|
System.out.println("Person nach dem Speichern: " + person);
|
||||||
|
|
||||||
|
} catch (NamingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
|
public class ChatWindow extends JFrame {
|
||||||
|
private JTextArea textArea;
|
||||||
|
private MessageReceiver receiver;
|
||||||
|
|
||||||
|
private JPanel inputPanel;
|
||||||
|
private JTextField messageInput;
|
||||||
|
private JButton messageSubmit;
|
||||||
|
private MessageSender sender;
|
||||||
|
|
||||||
|
public ChatWindow(MessageReceiver receiver, MessageSender sender) {
|
||||||
|
textArea = new JTextArea();
|
||||||
|
this.add(BorderLayout.NORTH, textArea);
|
||||||
|
receiver.setText(textArea);
|
||||||
|
|
||||||
|
inputPanel = new JPanel();
|
||||||
|
inputPanel.setLayout(new FlowLayout());
|
||||||
|
this.add(BorderLayout.SOUTH, inputPanel);
|
||||||
|
|
||||||
|
messageInput = new JTextField(20);
|
||||||
|
inputPanel.add(messageInput);
|
||||||
|
|
||||||
|
messageSubmit = new JButton("Submit");
|
||||||
|
messageSubmit.addActionListener(e -> {
|
||||||
|
sender.sendMessage(messageInput.getText());
|
||||||
|
});
|
||||||
|
inputPanel.add(messageSubmit);
|
||||||
|
|
||||||
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
import jakarta.jms.ConnectionFactory;
|
||||||
|
import jakarta.jms.Topic;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
public Client(int id) {
|
||||||
|
this.id = id;
|
||||||
|
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
|
||||||
|
|
||||||
|
try {
|
||||||
|
InitialContext context = new InitialContext(props);
|
||||||
|
ConnectionFactory cf = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
|
||||||
|
Topic topic = (Topic) context.lookup("jms/topic/Praktikum3Topic");
|
||||||
|
|
||||||
|
var sender = new MessageSender(topic, cf, "Sender " + this.id + ": ");
|
||||||
|
var receiver = new MessageReceiver(topic, cf, null);
|
||||||
|
var win = new ChatWindow(receiver, sender);
|
||||||
|
|
||||||
|
win.setVisible(true);
|
||||||
|
win.setTitle("Chat - Sender " + this.id);
|
||||||
|
receiver.start();
|
||||||
|
} catch (NamingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
public class Client1 {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
new Client(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
public class Client2 {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
new Client(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
import jakarta.jms.ConnectionFactory;
|
||||||
|
import jakarta.jms.JMSConsumer;
|
||||||
|
import jakarta.jms.JMSContext;
|
||||||
|
import jakarta.jms.Topic;
|
||||||
|
|
||||||
|
public class MessageReceiver extends Thread {
|
||||||
|
private JTextArea text;
|
||||||
|
private Topic topic;
|
||||||
|
private ConnectionFactory cf;
|
||||||
|
|
||||||
|
public MessageReceiver(Topic topic, ConnectionFactory cf, JTextArea text) {
|
||||||
|
this.text = text;
|
||||||
|
this.topic = topic;
|
||||||
|
this.cf = cf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextArea getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(JTextArea text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
try (JMSContext context = cf.createContext("guest", "guest")) {
|
||||||
|
JMSConsumer consumer = context.createConsumer(topic);
|
||||||
|
while (true) {
|
||||||
|
String message = consumer.receiveBody(String.class);
|
||||||
|
if (message != null) {
|
||||||
|
SwingUtilities.invokeLater(() -> text.append(message + "\n"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package org.example.demo.praktikum3;
|
||||||
|
|
||||||
|
import jakarta.jms.ConnectionFactory;
|
||||||
|
import jakarta.jms.JMSContext;
|
||||||
|
import jakarta.jms.JMSProducer;
|
||||||
|
import jakarta.jms.TextMessage;
|
||||||
|
import jakarta.jms.Topic;
|
||||||
|
|
||||||
|
public class MessageSender {
|
||||||
|
private String prefix;
|
||||||
|
private Topic topic;
|
||||||
|
private ConnectionFactory cf;
|
||||||
|
|
||||||
|
public MessageSender(Topic topic, ConnectionFactory cf, String prefix) {
|
||||||
|
this.topic = topic;
|
||||||
|
this.cf = cf;
|
||||||
|
this.prefix = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendMessage(String msg) {
|
||||||
|
var text = prefix + msg;
|
||||||
|
|
||||||
|
try (JMSContext context = cf.createContext("guest", "guest")) {
|
||||||
|
JMSProducer producer = context.createProducer();
|
||||||
|
TextMessage message = context.createTextMessage(text);
|
||||||
|
producer.send(topic, message);
|
||||||
|
System.out.println("Message '"+text+"' sent successfully.");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
System.out.println("Message '"+text+"' couldn't be sent: " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-2
@@ -11,8 +11,8 @@ public class Client {
|
|||||||
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
InitialContext ctx = new InitialContext(props);
|
InitialContext ctx = new InitialContext(props);
|
||||||
EncryptorRemote encryptor = (EncryptorRemote) ctx.lookup(
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/Encryptor!org.example.demo.uebung1.aufgabe16.EncryptorRemote";
|
||||||
"ejb:/IhrProjektname/Encryptor!encryption.EncryptorRemote");
|
EncryptorRemote encryptor = (EncryptorRemote) ctx.lookup(jndiName);
|
||||||
|
|
||||||
String original = "Hallo Welt";
|
String original = "Hallo Welt";
|
||||||
String encrypted = encryptor.encrypt(original);
|
String encrypted = encryptor.encrypt(original);
|
||||||
+3
-3
@@ -3,7 +3,7 @@ import javax.naming.InitialContext;
|
|||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class CounterClient {
|
public class Client {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
|
||||||
@@ -11,8 +11,8 @@ public class CounterClient {
|
|||||||
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
InitialContext ctx = new InitialContext(props);
|
InitialContext ctx = new InitialContext(props);
|
||||||
CounterRemote counter = (CounterRemote) ctx.lookup(
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/Counter!org.example.demo.uebung1.aufgabe17.CounterRemote?stateful";
|
||||||
"ejb:/IhrProjektname/Counter!counter.CounterRemote?stateful");
|
CounterRemote counter = (CounterRemote) ctx.lookup(jndiName);
|
||||||
|
|
||||||
System.out.println(counter.getAndIncrement());
|
System.out.println(counter.getAndIncrement());
|
||||||
System.out.println(counter.getAndIncrement());
|
System.out.println(counter.getAndIncrement());
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package org.example.demo.uebung2.aufgabe22;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
|
||||||
|
import org.example.demo.uebung2.aufgabe21.Mitarbeiter;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||||
|
|
||||||
|
InitialContext ctx = new InitialContext(props);
|
||||||
|
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/MitarbeiterService!org.example.demo.uebung2.aufgabe22.MitarbeiterServiceRemote";
|
||||||
|
MitarbeiterServiceRemote service = (MitarbeiterServiceRemote) ctx.lookup(jndiName);
|
||||||
|
|
||||||
|
Mitarbeiter m = new Mitarbeiter("Max Mustermann", 12345);
|
||||||
|
int generierteId = service.speichereMitarbeiter(m);
|
||||||
|
System.out.println("Mitarbeiter gespeichert mit ID: " + generierteId);
|
||||||
|
System.out.println("Entity nach dem Speichern: " + m);
|
||||||
|
|
||||||
|
} catch (NamingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package org.example.demo.uebung3.aufgabe13;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
import jakarta.jms.Connection;
|
||||||
|
import jakarta.jms.ConnectionFactory;
|
||||||
|
import jakarta.jms.Destination;
|
||||||
|
import jakarta.jms.JMSException;
|
||||||
|
import jakarta.jms.MessageProducer;
|
||||||
|
import jakarta.jms.Session;
|
||||||
|
import jakarta.jms.TextMessage;
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
props.setProperty(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
|
||||||
|
|
||||||
|
try {
|
||||||
|
InitialContext context = new InitialContext(props);
|
||||||
|
|
||||||
|
// ConnectionFactory und Ziel-Queue ermitteln
|
||||||
|
ConnectionFactory factory = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
|
||||||
|
Destination queue = (Destination) context.lookup("jms/queue/MyQueue");
|
||||||
|
|
||||||
|
// Verbindung und Session aufbauen
|
||||||
|
Connection con = factory.createConnection("guest", "guest");
|
||||||
|
Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
con.start();
|
||||||
|
|
||||||
|
// Nachricht erstellen und senden
|
||||||
|
MessageProducer producer = session.createProducer(queue);
|
||||||
|
TextMessage message = session.createTextMessage("Hallo-Welt");
|
||||||
|
producer.send(message);
|
||||||
|
|
||||||
|
System.out.println("Nachricht 'Hallo-Welt' in Queue gestellt.");
|
||||||
|
|
||||||
|
// Ressourcen schließen
|
||||||
|
producer.close();
|
||||||
|
session.close();
|
||||||
|
con.close();
|
||||||
|
context.close();
|
||||||
|
} catch (NamingException | JMSException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,40 @@
|
|||||||
|
# Übung Componentware – Aufgabenblatt zu Kapitel 6
|
||||||
|
|
||||||
|
## Aufgaben
|
||||||
|
|
||||||
|
1. Worum handelt es sich bei einer Transaktion?
|
||||||
|
|
||||||
|
2. Worin besteht der Unterschied zwischen Container Managed Transactions und Bean Managed Transactions?
|
||||||
|
|
||||||
|
3. Beschreiben Sie den generellen Ablauf einer Transaktion im Application Server bei vom Container verwalteten Transaktionen.
|
||||||
|
|
||||||
|
4. Welche Gründe gibt es für einen Abbruch einer Transaktion? Gehen Sie dabei insbesondere auch auf unterschiedliche Typen von Exceptions ein.
|
||||||
|
|
||||||
|
5. Worum handelt es sich bei Session Synchronisierung? Welche Methoden bzw. Annotationen umfasst die Session Synchronisierung?
|
||||||
|
|
||||||
|
6. Wie können Transaktionen von der Bean verwaltetet werden?
|
||||||
|
|
||||||
|
7. Wie können Transaktionen durch den Client verwaltetet werden?
|
||||||
|
|
||||||
|
8. Betrachten Sie das Programm in den Projekten `Componentware_Kapitel6_Transaktionen_Uebung` und `Componentware_Kapitel6_Transaktionen_Uebung_TestClient`.
|
||||||
|
Wo finden Transaktionsaufrufe statt? An welcher Stelle findet ein Rollback statt und wo endet eine Transaktion mit einem commit?
|
||||||
|
|
||||||
|
9. Beschreiben Sie den Aufbau der Startklasse einer Spring Boot Applikation, also die Klasse, die die `main`-Methode enthält, für den einfachsten Fall.
|
||||||
|
|
||||||
|
10. Wie kann in Spring Boot eine Shell-Applikation erstellt werden?
|
||||||
|
|
||||||
|
11. Gegeben Sie die folgende Klasse:
|
||||||
|
```java
|
||||||
|
@Component
|
||||||
|
public class Hello {
|
||||||
|
public String sayHello() {
|
||||||
|
return "Hello World!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Wie kann ein Objekt der Klasse `Hello` in ein Attribut einer anderen Klasse injiziert werden?
|
||||||
|
|
||||||
|
12. Welchen Vorteil bieten Spring Repositories gegenüber der Verwendung von JPA?
|
||||||
|
|
||||||
|
13. Erstellen Sie mit Spring Boot einen Web Service, der eine Methode bereitstellt, die zwei Zahlen als Path-Parameter in der URL `localhost:8080/math/sum/<zahl1>/<zahl2>` entgegennimmt. Die Methode soll diese beiden Zahlen addieren und die Summe als Ergebnis zurückliefern.
|
||||||
|
Testen Sie den Service über einen Web Browser.
|
||||||
Binary file not shown.
@@ -0,0 +1,316 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||||
|
. /usr/local/etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`\\unset -f command; \\command -v java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||||
|
fi
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
else
|
||||||
|
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read key value; do
|
||||||
|
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Downloading from: $jarUrl"
|
||||||
|
fi
|
||||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found wget ... using wget"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found curl ... using curl"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
else
|
||||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Falling back to using Java to download"
|
||||||
|
fi
|
||||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaClass=`cygpath --path --windows "$javaClass"`
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
# Compiling the Java class
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
# Running the downloader
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Running MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
fi
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" \
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %DOWNLOAD_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% ^
|
||||||
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||||
|
%MAVEN_OPTS% ^
|
||||||
|
%MAVEN_DEBUG_OPTS% ^
|
||||||
|
-classpath %WRAPPER_JAR% ^
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
|
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
cmd /C exit /B %ERROR_CODE%
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>de.hadrys</groupId>
|
||||||
|
<artifactId>Componentware_Kapitel6_Transaktionen_Uebung</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Componentware_Kapitel6_Transaktionen_Uebung</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<junit.version>5.13.2</junit.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.enterprise</groupId>
|
||||||
|
<artifactId>jakarta.enterprise.cdi-api</artifactId>
|
||||||
|
<version>4.1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.ejb</groupId>
|
||||||
|
<artifactId>jakarta.ejb-api</artifactId>
|
||||||
|
<version>4.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.transaction</groupId>
|
||||||
|
<artifactId>jakarta.transaction-api</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.orm</groupId>
|
||||||
|
<artifactId>hibernate-core</artifactId>
|
||||||
|
<version>7.0.4.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
<version>4.0.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-engine</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
public class HelloException1 extends Exception {
|
||||||
|
public HelloException1() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HelloException1(String text) {
|
||||||
|
super(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
import jakarta.ejb.ApplicationException;
|
||||||
|
|
||||||
|
@ApplicationException
|
||||||
|
public class HelloException2 extends Exception {
|
||||||
|
public HelloException2() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HelloException2(String text) {
|
||||||
|
super(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateful;
|
||||||
|
|
||||||
|
@Stateful
|
||||||
|
public class HelloWorld implements HelloWorldRemote {
|
||||||
|
|
||||||
|
public HelloWorld() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sayHello1() throws HelloException1 {
|
||||||
|
System.out.println("sH1");
|
||||||
|
throw new HelloException1();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sayHello2() throws HelloException2 {
|
||||||
|
System.out.println("sH2");
|
||||||
|
throw new HelloException2();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sayHello3(){
|
||||||
|
System.out.println("sH3");
|
||||||
|
int number = Integer.parseInt("Einhundertdreiundzwanzig");
|
||||||
|
System.out.println(number);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sayHello4(){
|
||||||
|
System.out.println("Hello World");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface HelloWorldRemote {
|
||||||
|
public void sayHello1() throws HelloException1;
|
||||||
|
public void sayHello2() throws HelloException2;
|
||||||
|
public void sayHello3();
|
||||||
|
public void sayHello4();
|
||||||
|
}
|
||||||
Executable → Regular
Executable → Regular
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd"
|
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd"
|
||||||
version="3.2">
|
version="3.2">
|
||||||
<persistence-unit name="default">
|
<persistence-unit name="default">
|
||||||
|
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
</persistence>
|
</persistence>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>de.hadrys</groupId>
|
||||||
|
<artifactId>Componentware_Kapitel6_Transaktionen_Uebung_TestClient</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>25</maven.compiler.source>
|
||||||
|
<maven.compiler.target>25</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
public class HelloException1 extends Exception{
|
||||||
|
public HelloException1() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HelloException1(String text){
|
||||||
|
super(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
import jakarta.ejb.ApplicationException;
|
||||||
|
|
||||||
|
@ApplicationException
|
||||||
|
public class HelloException2 extends Exception{
|
||||||
|
public HelloException2() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HelloException2(String text){
|
||||||
|
super(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package aufgabe8;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface HelloWorldRemote {
|
||||||
|
public void sayHello1() throws HelloException1;
|
||||||
|
public void sayHello2() throws HelloException2;
|
||||||
|
public void sayHello3();
|
||||||
|
public void sayHello4();
|
||||||
|
}
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
package clients;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
|
||||||
|
import aufgabe8.HelloWorldRemote;
|
||||||
|
|
||||||
|
public class HelloClient {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Properties properties = new Properties();
|
||||||
|
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
|
||||||
|
properties.setProperty(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
|
||||||
|
|
||||||
|
try {
|
||||||
|
InitialContext context = new InitialContext(properties);
|
||||||
|
HelloWorldRemote hello = (HelloWorldRemote)context.lookup("ejb:/Componentware_Kapitel6_Transaktionen_Uebung/HelloWorld!aufgabe8.HelloWorldRemote?stateful");
|
||||||
|
|
||||||
|
try{
|
||||||
|
System.out.println("vor sayHello1()");
|
||||||
|
hello.sayHello1();
|
||||||
|
System.out.println("nach sayHello1()");
|
||||||
|
}
|
||||||
|
catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
System.out.println("vor sayHello2()");
|
||||||
|
hello.sayHello2();
|
||||||
|
System.out.println("nach sayHello2()");
|
||||||
|
}
|
||||||
|
catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
System.out.println("vor sayHello3()");
|
||||||
|
hello.sayHello3();
|
||||||
|
System.out.println("nach sayHello3()");
|
||||||
|
}
|
||||||
|
catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
System.out.println("vor sayHello4()");
|
||||||
|
hello.sayHello4();
|
||||||
|
System.out.println("nach sayHello4()");
|
||||||
|
}
|
||||||
|
catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -99,19 +99,19 @@
|
|||||||
|
|
||||||
\item \textbf{Erstellen Sie eine Stateless Session Bean, die eine Methode zur Verschlüsselung eines Strings bereitstellt.}
|
\item \textbf{Erstellen Sie eine Stateless Session Bean, die eine Methode zur Verschlüsselung eines Strings bereitstellt.}
|
||||||
|
|
||||||
\textbf{Remote-Interface:} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe16/EncryptorRemote.java}
|
\textbf{Remote-Interface:} \inputminted{java}{../../server/src/main/java/org/example/demo/uebung1/aufgabe16/EncryptorRemote.java}
|
||||||
|
|
||||||
\textbf{Bean-Klasse:} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe16/Encryptor.java}
|
\textbf{Bean-Klasse:} \inputminted{java}{../../server/src/main/java/org/example/demo/uebung1/aufgabe16/Encryptor.java}
|
||||||
|
|
||||||
\textbf{Standalone-Client:} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe16/Client.java}
|
\textbf{Standalone-Client:} \inputminted{java}{../../client/src/main/java/org/example/demo/uebung1/aufgabe16/Client.java}
|
||||||
|
|
||||||
\item \textbf{Erstellen Sie eine Stateful Session Bean, die einen Zähler zur Verfügung stellt.}
|
\item \textbf{Erstellen Sie eine Stateful Session Bean, die einen Zähler zur Verfügung stellt.}
|
||||||
|
|
||||||
\textbf{Remote-Interface:} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe17/CounterRemote.java}
|
\textbf{Remote-Interface:} \inputminted{java}{../../server/src/main/java/org/example/demo/uebung1/aufgabe17/CounterRemote.java}
|
||||||
|
|
||||||
\textbf{Bean-Klasse:} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe17/Counter.java}
|
\textbf{Bean-Klasse:} \inputminted{java}{../../server/src/main/java/org/example/demo/uebung1/aufgabe17/Counter.java}
|
||||||
|
|
||||||
\textbf{Client (mehrfache Aufrufe auf derselben Instanz):} \inputminted{java}{../../src/main/java/org/example/demo/uebung1/aufgabe17/CounterClient.java}
|
\textbf{Client (mehrfache Aufrufe auf derselben Instanz):} \inputminted{java}{../../client/src/main/java/org/example/demo/uebung1/aufgabe17/Client.java}
|
||||||
|
|
||||||
\item \textbf{Warum liefert die get-Methode aus Aufgabe 17 bei einem erneuten Aufruf der Testklasse immer wieder den Startwert des Zählers?}
|
\item \textbf{Warum liefert die get-Methode aus Aufgabe 17 bei einem erneuten Aufruf der Testklasse immer wieder den Startwert des Zählers?}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
\documentclass{uebung}
|
||||||
|
|
||||||
|
\author{Linus Nagel}
|
||||||
|
\chapter{2}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\begin{exercises}
|
||||||
|
\item \textbf{Was ist eine Entity?}
|
||||||
|
|
||||||
|
Eine Entity ist das Java-Pendant zu einem Datensatz aus der Datenbank. Es handelt sich um ein POJO (Plain Old Java Object), das mit der Annotation \texttt{@Entity} ausgezeichnet wird. Entities repräsentieren die Geschäftsobjekte bzw. die Daten einer Anwendung.
|
||||||
|
|
||||||
|
\item \textbf{Wie wird eine Entity erstellt und welche Inhalte enthält eine Entity üblicherweise?}
|
||||||
|
|
||||||
|
Eine Entity wird erstellt, indem eine gewöhnliche Java-Klasse mit \texttt{@Entity} annotiert wird. Üblicherweise enthält sie:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Attribute (z.B. eine ID als Primärschlüssel, fachliche Daten)
|
||||||
|
\item einen parameterlosen Konstruktor (zwingend)
|
||||||
|
\item Getter und Setter für die Attribute
|
||||||
|
\item Implementierung von \texttt{Serializable}
|
||||||
|
\item optional \texttt{toString()}, \texttt{hashCode()}, \texttt{equals()}
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Durch welche Annotation wird ein Attribut als Primärschlüssel gekennzeichnet?}
|
||||||
|
|
||||||
|
Mit \texttt{@Id}. Zusätzlich kann \texttt{@GeneratedValue} verwendet werden, um die automatische Generierung des Primärschlüssels zu ermöglichen.
|
||||||
|
|
||||||
|
\item \textbf{Was ist ein EntityManager?}
|
||||||
|
|
||||||
|
Der EntityManager ist die zentrale Schnittstelle der JPA für Datenbankoperationen. Er stellt Methoden zum Speichern, Suchen, Löschen und Bearbeiten von Entities bereit und synchronisiert diese mit der Datenbank.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann eine Klasse ein EntityManager-Objekt auslesen/erhalten?}
|
||||||
|
|
||||||
|
Eine Klasse kann den EntityManager über Dependency Injection mittels der Annotation \texttt{@PersistenceContext} erhalten:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@PersistenceContext
|
||||||
|
private EntityManager em;
|
||||||
|
\end{minted}
|
||||||
|
Alternativ ist ein JNDI-Lookup möglich.
|
||||||
|
|
||||||
|
\item \textbf{Welche Methode des EntityManagers wird verwendet um ein Objekt in der Datenbank anzulegen?}
|
||||||
|
|
||||||
|
Die Methode \texttt{persist(Object entity)}. Beispiel: \texttt{em.persist(person);}
|
||||||
|
|
||||||
|
\item \textbf{Was ist eine Persistence Unit und welche Datei wird verwendet um eine Persistence Unit zu definieren?}
|
||||||
|
|
||||||
|
Eine Persistence Unit legt fest, welche Entities auf welche Weise (O/R-Mapping) auf die Datenbank abgebildet werden. Sie wird in der Datei \texttt{persistence.xml} im Ordner \texttt{META-INF} definiert.
|
||||||
|
|
||||||
|
\item \textbf{Welche Zustände existieren im Lebenszyklus einer Entity?}
|
||||||
|
|
||||||
|
Die Zustände sind:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{New (transient):} Entity neu erzeugt, noch nicht mit Persistenzkontext verbunden.
|
||||||
|
\item \textbf{Managed:} Entity wird vom Persistenzkontext verwaltet, Änderungen werden automatisch nachverfolgt.
|
||||||
|
\item \textbf{Detached:} Entity nicht mehr im Persistenzkontext (z.B. nach Übergabe an den Client).
|
||||||
|
\item \textbf{Removed:} Entity wurde zum Löschen markiert.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Welchen Zustand hat eine Entity, die an einen Client übergeben wurde?}
|
||||||
|
|
||||||
|
Sie befindet sich im Zustand \textbf{detached}.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann eine Entity, die an den Client übergeben wurde, wieder in den Zustand managed überführt werden?}
|
||||||
|
|
||||||
|
Durch Aufruf der Methode \texttt{merge(entity)} des EntityManagers:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
person = em.merge(person);
|
||||||
|
\end{minted}
|
||||||
|
Oder durch erneutes Laden mit \texttt{find(...)}.
|
||||||
|
|
||||||
|
\item \textbf{Welche Rückgabe hat die Methode merge(…) und warum ist eine Rückgabe notwendig?}
|
||||||
|
|
||||||
|
\texttt{merge(entity)} gibt eine verwaltete Instanz der Entity zurück. Die Rückgabe ist notwendig, weil die übergebene detached Entity nicht selbst zum managed Zustand wird, sondern der Persistenzkontext eine (möglicherweise andere) verwaltete Instanz liefert. Daher muss das Ergebnis der Variablen zugewiesen werden.
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich beim Lazy loading?}
|
||||||
|
|
||||||
|
Lazy Loading bezeichnet das verzögerte Laden von Attributen oder Assoziationen einer Entity erst dann, wenn sie tatsächlich verwendet werden. Es wird z.B. mit \texttt{@Basic(fetch=FetchType.LAZY)} oder \texttt{@OneToMany(fetch=FetchType.LAZY)} gesteuert und verbessert die Performance, da nicht alle Daten sofort aus der Datenbank geladen werden.
|
||||||
|
|
||||||
|
\item \textbf{Welche Möglichkeiten gibt es um mittels O/R-Mapping Vererbung auf Tabellen abzubilden? Beschreiben Sie diese Strategien grob.}
|
||||||
|
|
||||||
|
Es gibt drei Strategien, gesteuert durch \texttt{@Inheritance(strategy=...)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{Single Table:} Die gesamte Vererbungshierarchie wird in einer Tabelle abgebildet. Eine Diskriminatorspalte (z.B. \texttt{DTYPE}) speichert den konkreten Typ. Vorteil: einfach, Nachteil: viele leere (\texttt{null}) Spalten.
|
||||||
|
\item \textbf{Table per Class:} Für jede Entity (auch abstrakte) wird eine eigene Tabelle erzeugt, die alle Attribute der jeweiligen Klasse enthält. Vorteil: keine leeren Spalten, Nachteil: aufwendige Abfragen bei Polymorphie.
|
||||||
|
\item \textbf{Joined:} Jede Klasse bekommt eine Tabelle. Die Tabellen der Unterklassen enthalten nur die zusätzlichen Attribute sowie eine Fremdschlüsselspalte auf die Tabelle der Oberklasse. Daten werden per Join zusammengesetzt. Vorteil: keine Redundanz, Nachteil: viele Joins bei tiefen Hierarchien.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Mit welcher Annotation wird eine 1:1-Beziehung abgebildet?}
|
||||||
|
|
||||||
|
Mit \texttt{@OneToOne} auf beiden Seiten der Beziehung.
|
||||||
|
|
||||||
|
\item \textbf{Was ist die „owning side“ einer 1:1-Beziehung und wie kann sie festgelegt werden?}
|
||||||
|
|
||||||
|
Die \textit{owning side} (führende Seite) ist diejenige Seite, die den Fremdschlüssel in der Datenbank erhält. Sie wird festgelegt, indem auf der anderen Seite das Attribut \texttt{mappedBy} gesetzt wird:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@OneToOne(mappedBy="auto")
|
||||||
|
private Lenkrad lenkrad;
|
||||||
|
\end{minted}
|
||||||
|
Die Klasse ohne \texttt{mappedBy} ist die owning side.
|
||||||
|
|
||||||
|
\item \textbf{Welche Annotation erhält eine 1:n-Beziehung?}
|
||||||
|
|
||||||
|
Die Annotation \texttt{@OneToMany} auf der Seite des Elternobjekts (z.B. \texttt{Fahrer} hat viele \texttt{Fahrt}).
|
||||||
|
|
||||||
|
\item \textbf{Welche Annotation erhält eine n:1-Beziehung?}
|
||||||
|
|
||||||
|
Die Annotation \texttt{@ManyToOne} auf der Seite des Kindobjekts (z.B. \texttt{Fahrt} referenziert einen \texttt{Fahrer}).
|
||||||
|
|
||||||
|
\item \textbf{Welche ist in einer 1:n- oder n:1-Beziehung die owning side?}
|
||||||
|
|
||||||
|
In einer 1:n- / n:1-Beziehung ist die \textbf{n:1-Seite} (die Seite mit \texttt{@ManyToOne}) immer die owning side. Sie erhält den Fremdschlüssel in der Datenbank. Auf der anderen Seite (1:n) verwendet man \texttt{@OneToMany(mappedBy=...)}.
|
||||||
|
|
||||||
|
\item \textbf{Wie wird eine m:n-Beziehung annotiert?}
|
||||||
|
|
||||||
|
Auf beiden Seiten wird \texttt{@ManyToMany} verwendet. Eine Seite muss \texttt{mappedBy} angeben, die andere ist die owning side. Es wird automatisch eine Relationstabelle generiert.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann eine Anfrage in JPQL erzeugt werden in der alle Objekte einer Klasse Auto abgefragt werden? Bitte geben Sie beispielhaft den Quellcode an.}
|
||||||
|
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
TypedQuery<Auto> query = em.createQuery("SELECT a FROM Auto a", Auto.class);
|
||||||
|
List<Auto> autos = query.getResultList();
|
||||||
|
\end{minted}
|
||||||
|
Oder kurz:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
List<Auto> autos = em.createQuery("SELECT a FROM Auto a", Auto.class).getResultList();
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Erstellen Sie eine Entity namens Mitarbeiter, die die fachlichen Attribute name (String) und personalnummer (int) enthält.}
|
||||||
|
|
||||||
|
\noindent
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung2/aufgabe21/Mitarbeiter.java}
|
||||||
|
|
||||||
|
\item \textbf{Erstellen Sie eine Stateless Session Bean, die eine Methode bereitstellt, die als Parameter ein Objekt der Klasse Mitarbeiter (aus Aufgabe 21) übergeben bekommt. Dieses Objekt soll durch die Methode in der Datenbank gespeichert werden. Die dabei generierte ID soll von der Methode zurückgeliefert werden. Testen Sie ihre Klassen durch einen geeigneten Client über das Remote Interface.}
|
||||||
|
|
||||||
|
\textbf{Remote-Interface:}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung2/aufgabe22/MitarbeiterServiceRemote.java}
|
||||||
|
|
||||||
|
\textbf{Stateless Session Bean:}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung2/aufgabe22/MitarbeiterService.java}
|
||||||
|
|
||||||
|
\textbf{Standalone-Client:}
|
||||||
|
\inputminted[breaklines]{java}{../../client/src/main/java/org/example/demo/uebung2/aufgabe22/Client.java}
|
||||||
|
|
||||||
|
\textbf{persistence.xml:}
|
||||||
|
\inputminted[breaklines]{xml}{../../server/src/main/resources/META-INF/persistence.xml}
|
||||||
|
|
||||||
|
\end{exercises}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
\documentclass{uebung}
|
||||||
|
|
||||||
|
\author{Linus Nagel}
|
||||||
|
\chapter{3}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\begin{exercises}
|
||||||
|
\item \textbf{Worum handelt es sich bei JMS?}
|
||||||
|
|
||||||
|
JMS (Jakarta Messaging Service) ist ein Jakarta‑EE‑Standard für die asynchrone Nachrichtenübermittlung. Er ermöglicht die lose, sprachunabhängige Kopplung von Komponenten, indem Sender und Empfänger nur über einen Nachrichtendienst (Message Broker) kommunizieren. Der Sender gibt eine Nachricht ab und arbeitet sofort weiter; der Empfänger verarbeitet sie unabhängig. JMS garantiert dabei eine zuverlässige Zustellung und unterstützt transaktionale Abläufe.
|
||||||
|
|
||||||
|
\item \textbf{Erläutern Sie das Point-to-point-Modell.}
|
||||||
|
|
||||||
|
Im Point‑to‑Point‑Modell werden Nachrichten in eine \emph{Queue} (Warteschlange) eingestellt. Beliebig viele Empfänger können sich bei derselben Queue registrieren, aber der JMS‑Server liefert jede Nachricht immer nur an genau einen Empfänger aus. Nach der Auslieferung wird die Nachricht aus der Queue entfernt. Ist zum Zeitpunkt des Sendens kein Empfänger aktiv, bleibt die Nachricht in der Queue gespeichert, bis ein Empfänger sie abholt.
|
||||||
|
|
||||||
|
\item \textbf{Erläutern Sie das Publish-subscribe-Modell.}
|
||||||
|
|
||||||
|
Beim Publish‑Subscribe‑Modell werden Nachrichten an ein \emph{Topic} gesendet. Alle Empfänger, die gerade für dieses Topic registriert sind, erhalten eine Kopie der Nachricht – ähnlich wie Zuschauer eines Fernsehprogramms. Empfänger, die zum Sendezeitpunkt nicht lauschen, bekommen die Nachricht nicht mit, es sei denn, sie haben eine \emph{dauerhafte Subscription} (Durable Subscription). In diesem Fall bewahrt der Server die Nachrichten auf und stellt sie bei der nächsten Verbindung zu.
|
||||||
|
|
||||||
|
\item \textbf{Beschreiben Sie die einzelnen Schritte um eine Nachricht über JMS zu senden.}
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \texttt{Properties} für den JNDI-Zugriff setzen und einen \texttt{InitialContext} erzeugen.
|
||||||
|
\item \texttt{ConnectionFactory} aus dem JNDI holen (\texttt{context.lookup}).
|
||||||
|
\item Mit der Factory eine \texttt{Connection} zum Nachrichtenserver erstellen \break (\texttt{factory.createConnection(user, pwd)}).
|
||||||
|
\item Über die Connection eine \texttt{Session} anlegen \break (\texttt{con.createSession(false, AUTO\_ACKNOWLEDGE)}).
|
||||||
|
\item Die Connection mit \texttt{con.start()} aktivieren.
|
||||||
|
\item Das Ziel (\texttt{Destination}) – eine Queue oder ein Topic – per JNDI-Lookup ermitteln.
|
||||||
|
\item Mit der Session einen \texttt{MessageProducer} für das Ziel erzeugen \break (\texttt{session.createProducer(ziel)}).
|
||||||
|
\item Eine konkrete Nachricht erstellen (z.\,B. \texttt{TextMessage}) und mit Inhalt füllen.
|
||||||
|
\item Nachricht über den Producer versenden (\texttt{producer.send(message)}).
|
||||||
|
\item Connection schließen (\texttt{con.close()}).
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item \textbf{In welcher Datei kann eine Queue oder ein Topic konfiguriert werden? In welchem Abschnitt wird die Konfiguration vorgenommen?}
|
||||||
|
|
||||||
|
Die Konfiguration erfolgt in der Datei \texttt{standalone-full.xml} im Verzeichnis \path{<Wildfly>/standalone/configuration}. Queues und Topics werden im Subsystem \texttt{messaging-activemq} innerhalb des Elements \texttt{<subsystem xmlns="urn:jboss:domain:messaging-activemq:...">} definiert. Queues mit dem Tag \texttt{<jms-queue ...>}, Topics mit \texttt{<jms-topic ...>}.
|
||||||
|
|
||||||
|
\item \textbf{Welche unterschiedlichen Schritte sind im Vergleich zum Senden erforderlich, wenn Sie als Client eine Nachricht lesen möchten?}
|
||||||
|
|
||||||
|
Statt eines \texttt{MessageProducer} wird ein \texttt{MessageConsumer} benötigt. Der Empfang erfolgt mit der blockierenden Methode \texttt{consumer.receive()}, die ein \texttt{jakarta.jms.Message}-Objekt zurückgibt. Dieses wird auf den konkreten Nachrichtentyp (z.\,B. \texttt{TextMessage}) gecastet und der Inhalt mit der entsprechenden \texttt{get...()}‑Methode ausgelesen. Außerdem entfällt das Erstellen einer Nachricht und das Senden.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann bei einer Nachricht ein Wert angegeben werden, nach dem beim Empfang gefiltert werden kann?}
|
||||||
|
|
||||||
|
Auf der gesendeten Nachricht werden vor dem Versand Properties gesetzt, z.\,B. mit \break \texttt{message.setStringProperty("Typ", "Typ1")}. Es stehen für alle primitiven Typen (außer \texttt{char}) entsprechende Setter zur Verfügung.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann beim Empfang einer Nachricht ein Filterwert angegeben werden?}
|
||||||
|
|
||||||
|
Beim Erstellen des \texttt{MessageConsumer} wird der Methode \texttt{session}\allowbreak\texttt{.createConsumer(destination, messageSelector)} ein Selektor-String nach der Syntax \texttt{key = 'value'} übergeben. Beispiel: \texttt{session}\allowbreak\texttt{.createConsumer(queue, "Typ = 'Typ1'")}. Dadurch empfängt der Consumer nur Nachrichten, deren Property \texttt{Typ} den Wert \texttt{'Typ1'} besitzt.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann sich ein Empfänger dauerhaft für den Empfang von Topics registrieren?}
|
||||||
|
|
||||||
|
Der Empfänger setzt zunächst mit \texttt{connection.setClientID("eindeutigerName")} eine eindeutige Client-ID. Anschließend wird anstelle eines normalen \texttt{MessageConsumer} ein \texttt{Topic}\allowbreak\texttt{Subscriber} über \texttt{session.createDurableSubscriber((Topic) topic, "{}eindeutigerName")} erzeugt. Der Server merkt sich diese dauerhafte Subscription und liefert alle Nachrichten aus, die während der Abwesenheit des Clients eingegangen sind, sobald der Client sich erneut verbindet.
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei einer MDB?}
|
||||||
|
|
||||||
|
Eine Message Driven Bean (MDB) ist ein von Jakarta EE bereitgestellter Bean-Typ, der ausschließlich dazu dient, asynchron eingehende Nachrichten aus einer Queue oder einem Topic zu verarbeiten. Sie wird vom Container in einem Pool verwaltet, benötigt keine Client-Interfaces und implementiert das Interface \texttt{jakarta.jms.MessageListener} mit der Methode \texttt{onMessage(Message)}.
|
||||||
|
|
||||||
|
\item \textbf{Wie wird eine MDB erstellt? Gehen Sie insbesondere auf die zu verwendenden Annotationen ein.}
|
||||||
|
|
||||||
|
Eine MDB wird als POJO erstellt und mit \texttt{@MessageDriven} annotiert. Die Klasse implementiert \texttt{jakarta.jms.MessageListener} und überschreibt \texttt{onMessage(Message)}. Die Zuweisung zu einer Queue bzw. einem Topic erfolgt über das \texttt{activationConfig}-Attribut der Annotation, das ein Array von \texttt{@ActivationConfigProperty}-Annotationen enthält. Wichtige Properties sind:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{destinationType} – \texttt{jakarta.jms.Queue} oder \texttt{jakarta.jms.Topic}
|
||||||
|
\item \texttt{destination} – JNDI-Name der Queue / des Topics
|
||||||
|
\item \texttt{acknowledgeMode} – \texttt{AUTO\_ACKNOWLEDGE} oder \texttt{DUPS\_OK\_ACKNOWLEDGE}
|
||||||
|
\item \texttt{messageSelector} – optionaler Filterausdruck
|
||||||
|
\item \texttt{subscriptionDurability} – \texttt{durable} oder \texttt{nonDurable} (nur bei Topics)
|
||||||
|
\end{itemize}
|
||||||
|
Zusätzlich können per \texttt{@Resource} oder \texttt{@EJB} weitere Ressourcen injiziert werden.
|
||||||
|
|
||||||
|
\item \textbf{Welchen Vorteil bieten MDBs gegenüber dem Vorgehen des Empfangs bei einem Stand-Alone-Client?}
|
||||||
|
|
||||||
|
MDBs werden vollständig vom Container verwaltet. Der Container übernimmt das Verbindungsmanagement, die Lebenszyklus‑Steuerung, das Pooling sowie die Transaktionssteuerung. Der Entwickler muss sich nicht um das manuelle Erzeugen von Connections, Sessions oder Consumern kümmern und profitiert von automatischer Skalierung und robustem Fehlerverhalten. Stand‑Alone‑Clients erfordern hingegen expliziten Code für Verbindungsaufbau, Empfangsschleifen und Fehlerbehandlung.
|
||||||
|
|
||||||
|
\item \textbf{JMS-Projekt: MDB und Client}
|
||||||
|
|
||||||
|
\noindent\textbf{Message Driven Bean:}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung3/aufgabe13/ReceiveQueueMessageAndSendAsMail.java}
|
||||||
|
|
||||||
|
\noindent\textbf{Client:}
|
||||||
|
\inputminted[breaklines]{java}{../../client/src/main/java/org/example/demo/uebung3/aufgabe13/Client.java}
|
||||||
|
|
||||||
|
\end{exercises}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
\documentclass{uebung}
|
||||||
|
|
||||||
|
\author{Linus Nagel}
|
||||||
|
\chapter{4}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\begin{exercises}
|
||||||
|
|
||||||
|
\item \textbf{Welchen Zweck erfüllen SOAP-Web Services?}
|
||||||
|
|
||||||
|
SOAP-Web Services stellen Geschäftslogik als Service für entfernte Aufrufe bereit. Sie ermöglichen eine programmiersprachen- und systemübergreifende Kommunikation, indem sie Methodenaufrufe über standardisierte XML-Dokumente (SOAP) abbilden. Die Kommunikation erfolgt in der Regel über HTTP, wodurch eine lose Kopplung und hohe Interoperabilität erreicht wird.
|
||||||
|
|
||||||
|
\item \textbf{Wie wird ein SOAP-Webservice erstellt?}
|
||||||
|
|
||||||
|
Ein SOAP-Webservice wird durch eine Klasse (POJO oder EJB) realisiert, die mit der Annotation \texttt{@WebService} versehen ist. Die Klasse muss \texttt{public} sein und einen parameterlosen Konstruktor besitzen. Nach dem Deployment generiert der Application Server automatisch eine WSDL-Datei und stellt den Service unter einer URL bereit. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@WebService
|
||||||
|
public class HelloWorld {
|
||||||
|
public String getHello() {
|
||||||
|
return "Hello World";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Welchen Zweck erfüllt die WSDL-Datei?}
|
||||||
|
|
||||||
|
Die WSDL (Web Service Definition Language) ist ein XML-basiertes Interface, das die verfügbaren Methoden, deren Parameter, Rückgabewerte, Exceptions, das verwendete Protokoll (Binding) und die konkrete Endpoint-URI eines Web Services beschreibt. Der Client kann daraus die nötigen Proxy-Klassen generieren.
|
||||||
|
|
||||||
|
\item \textbf{Wie können die Clientklassen aus einer bestehenden WSDL-Datei generiert werden?}
|
||||||
|
|
||||||
|
Mit dem Tool \texttt{wsimport} (ab Java 11 aus dem Projekt \texttt{jaxws-ri}) werden aus einer vorhandenen WSDL-Datei Java-Clientklassen generiert. Aufrufbeispiel:
|
||||||
|
\begin{verbatim}
|
||||||
|
wsimport.sh http://localhost:8080/Pfad/HelloWorld?wsdl
|
||||||
|
\end{verbatim}
|
||||||
|
Die erzeugten Klassen werden in eine JAR-Datei verpackt und dem Clientprojekt hinzugefügt.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann ein Fehler programmiersprachenunabhängig übertragen werden? Welche Maßnahmen sind dabei bei der Programmierung notwendig?}
|
||||||
|
|
||||||
|
Fehler werden über das \texttt{soap:Fault}-Element im SOAP-Body übertragen. Es enthält \texttt{faultcode}, \texttt{faultstring} und \texttt{detail}. In Java wird standardmäßig eine \texttt{SOAPFaultException} geworfen. Für sprachunabhängige Fehler kann eine eigene, von \texttt{SOAPFaultException} abgeleitete Exception erstellt werden, die eine \texttt{SOAPFault} erhält. Auf Serverseite wird die Exception mit einer erzeugten \texttt{SOAPFault} geworfen. Dadurch wird der Fehler als standardisierte SOAP-Nachricht übertragen.
|
||||||
|
|
||||||
|
\item \textbf{Wie muss eine Fachkonzeptklasse modifiziert werden, damit sie bei einem SOAP-Aufruf eine Fachkonzeptklasse übertragen werden kann?}
|
||||||
|
|
||||||
|
Die Fachkonzeptklasse muss mit der JAXB-Annotation \texttt{@XmlRootElement} versehen werden. Dadurch wird sie in ein XML-Element umgewandelt und kann im SOAP-Nachrichtenbody transportiert werden.
|
||||||
|
|
||||||
|
\item \textbf{Beschreiben Sie den REST-Architekturstil. Gehen Sie dabei auch auf den Begriff Ressource ein und beschreiben, wie eine Ressource aufgerufen werden kann.}
|
||||||
|
|
||||||
|
REST (Representational State Transfer) ist ein Architekturstil, bei dem jede Information als \emph{Ressource} aufgefasst wird, die über eine eindeutige URI erreichbar ist. Ressourcen werden mit den HTTP-Methoden POST (anlegen), GET (abfragen), PUT (ändern) und DELETE (löschen) manipuliert. Der Server speichert nur den Zustand der Ressource, der Client verwaltet den Anwendungszustand. Eine Ressource kann mehrere Repräsentationen (z.B. HTML, XML, JSON) besitzen. Der Aufruf erfolgt durch Senden einer HTTP-Anfrage an die URI der Ressource mit der entsprechenden HTTP-Methode.
|
||||||
|
|
||||||
|
\item \textbf{Wie wird im einfachsten Fall ein RESTful Web Service erstellt?}
|
||||||
|
|
||||||
|
Eine POJO-Klasse wird mit \texttt{@Path} annotiert, die Methode mit einer HTTP-Methode wie \texttt{@GET}. Zusätzlich ist eine Konfigurationsklasse nötig, die von \texttt{jakarta.ws.rs.core.Application} abgeleitet und mit \texttt{@ApplicationPath} versehen wird. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Path("/hallo")
|
||||||
|
public class HalloWelt {
|
||||||
|
@GET
|
||||||
|
public String sagHallo() {
|
||||||
|
return "Hallo Welt";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Wie kann aus einem Response ein Objekt ausgelesen werden?}
|
||||||
|
|
||||||
|
Über das \texttt{Response}-Objekt wird die Methode \texttt{readEntity(Class<T>)} aufgerufen. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
String ergebnis = response.readEntity(String.class);
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Wie kann eine ID als URI-Parameter übergeben werden?}
|
||||||
|
|
||||||
|
In der \texttt{@Path}-Annotation wird ein Platzhalter in geschweiften Klammern definiert (z.B. \texttt{@Path("/buch/\{id\}")}). Der Methodenparameter wird mit \texttt{@PathParam("{}id")} annotiert. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@GET
|
||||||
|
@Path("/buch/{id}")
|
||||||
|
public String getBuch(@PathParam("id") int id) { ... }
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Was ist gemeint, wenn von Content-Negotiation gesprochen wird? Mit welchen Annotationen wird dies mit RESTful Web Services in Java realisiert?}
|
||||||
|
|
||||||
|
Content-Negotiation bezeichnet die Auswahl der passenden Repräsentation einer Ressource basierend auf dem \texttt{Accept}-Header des Requests. In JAX-RS wird dies mit den Annotationen \texttt{@Produces} (für die Antwort) und \texttt{@Consumes} (für die Anfrage) realisiert. Als Attribut wird ein \texttt{MediaType} (z.B. \texttt{MediaType.APPLICATION\_JSON}) übergeben.
|
||||||
|
|
||||||
|
\item \textbf{Durch welche Klasse kann der Response (StatusCode und Rückgabe) einer Klasse beeinflusst werden? Wie kann ein solches Objekt erstellt werden und wie wird der eigentliche Response generiert?}
|
||||||
|
|
||||||
|
Die Klasse \texttt{jakarta.ws.rs.core.Response} ermöglicht die Kontrolle über HTTP-Statuscode, Header und Entität. Ein \texttt{Response}-Objekt wird über einen \texttt{ResponseBuilder} erzeugt, den man z.B. mit \texttt{Response.ok().build()} erhält. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
return Response.status(Response.Status.NOT_FOUND)
|
||||||
|
.entity("Nicht gefunden")
|
||||||
|
.type(MediaType.TEXT_PLAIN)
|
||||||
|
.build();
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Erstellen Sie einen Restful Web Service, der eine Methode namens getTime() bereitstellt. Diese Methode soll die aktuelle Zeit des Servers unter der URI localhost:8080/projektname/time zurück liefern.}
|
||||||
|
|
||||||
|
\noindent\textbf{TimeService.java}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung4/aufgabe13/TimeService.java}
|
||||||
|
|
||||||
|
\noindent\textbf{ApplicationConfig.java}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung4/aufgabe13/ApplicationConfig.java}
|
||||||
|
|
||||||
|
\end{exercises}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
\documentclass{uebung}
|
||||||
|
|
||||||
|
\author{Linus Nagel}
|
||||||
|
\chapter{5}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\begin{exercises}
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei Dependency Injection?}
|
||||||
|
|
||||||
|
Dependency Injection (DI) ist ein Entwurfsmuster, bei dem der Container (z.B. der CDI-Container) die Abhängigkeiten eines Objekts automatisch bereitstellt, anstatt dass das Objekt sie selbst erzeugt oder sucht.
|
||||||
|
Dadurch wird eine lose Kopplung erreicht, der Code wird besser testbar und die Verantwortung für die Erstellung der Abhängigkeiten wird aus der Klasse ausgelagert.
|
||||||
|
In CDI wird dies hauptsächlich über die Annotation \texttt{@Inject} realisiert.
|
||||||
|
|
||||||
|
\item \textbf{Beschreiben Sie den Lebenszyklus von CDI-Beans.}
|
||||||
|
|
||||||
|
Der Container verwaltet den gesamten Lebenszyklus einer CDI-Bean:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \textbf{Instanziierung} – Aufruf des parameterlosen Konstruktors.
|
||||||
|
\item \textbf{Dependency Injection} – Alle mit \texttt{@Inject} annotierten Felder/Setter werden gesetzt.
|
||||||
|
\item \textbf{PostConstruct} – Eine mit \texttt{@PostConstruct} annotierte Methode wird ausgeführt (Initialisierung).
|
||||||
|
\item \textbf{Nutzung} – Die Bean steht für Geschäftslogik zur Verfügung.
|
||||||
|
\item \textbf{PreDestroy} – Vor dem Entfernen der Bean wird eine mit \texttt{@PreDestroy} annotierte Methode aufgerufen.
|
||||||
|
\item \textbf{Zerstörung} – Die Bean wird aus dem Speicher entfernt (Scope-abhängig).
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich beim Bean Discovery? Welche Voraussetzung gibt es für das Bean Discovery?}
|
||||||
|
|
||||||
|
Bean Discovery ist der Prozess, bei dem der CDI-Container während des Deployments nach CDI-Beans sucht (z.B. in JARs oder Klassenordnern).
|
||||||
|
Voraussetzung ist das Vorhandensein der Datei \texttt{beans.xml} im Ordner \texttt{META-INF} (für JARs) oder \texttt{WEB-INF} (für WARs).
|
||||||
|
Seit CDI 1.1 kann der Modus \texttt{bean-discovery-mode="annotated"} verwendet werden; dann werden nur Klassen mit einer \textit{bean defining annotation} (z.B. \texttt{@RequestScoped}) entdeckt.
|
||||||
|
|
||||||
|
\item \textbf{Welche Regeln gelten für CDI-Beans?}
|
||||||
|
|
||||||
|
Eine CDI-Bean muss folgende Regeln erfüllen:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Sie ist eine konkrete Klasse (oder mit \texttt{@Decorator} annotiert).
|
||||||
|
\item Sie besitzt einen parameterlosen Konstruktor (Default-Konstruktor).
|
||||||
|
\item Sie kann mit Scopes annotiert sein (z.B. \texttt{@RequestScoped}).
|
||||||
|
\item Sie befindet sich in einem Archiv, das vom Bean Discovery erfasst wird.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei Qualifizierern?}
|
||||||
|
|
||||||
|
Qualifizierer sind benutzerdefinierte Annotationen, die es dem CDI-Container ermöglichen, zwischen mehreren Implementierungen desselben Schnittstellentyps zu unterscheiden.
|
||||||
|
Sie werden an der Implementierungsklasse und am Injection Point verwendet und sorgen für typsichere Auswahl (im Gegensatz zu String-basierten Lösungen).
|
||||||
|
|
||||||
|
\item \textbf{Wie wird ein Qualifizierer erstellt? Wie wird er im Quellcode verwendet?}
|
||||||
|
|
||||||
|
Erstellung einer Qualifier-Annotation:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Qualifier
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
|
||||||
|
public @interface Lotto6aus49 {}
|
||||||
|
\end{minted}
|
||||||
|
Verwendung:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Implementierungsklasse: \texttt{@Lotto6aus49 public class Generator6aus49 implements LottoGenerator \{ ... \}}
|
||||||
|
\item Injection Point: \texttt{@Inject @Lotto6aus49 private LottoGenerator generator;}
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Wie kann ein Qualifizierer mit Attributen versehen werden?}
|
||||||
|
|
||||||
|
Man definiert Methoden in der Annotation, die die Attribute zurückgeben. Als Typen sind nur primitive Typen, Strings, Enums, Class und deren Arrays erlaubt.
|
||||||
|
Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Qualifier
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target({ElementType.TYPE, ElementType.FIELD})
|
||||||
|
public @interface LottoNausM {
|
||||||
|
Auswahl auswahl();
|
||||||
|
Gesamt gesamt();
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Verwendung: \texttt{@LottoNausM(auswahl=Auswahl.SECHS, gesamt=Gesamt.NEUNUNDVIERZIG)}.
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei einer Alternative?}
|
||||||
|
|
||||||
|
Eine Alternative ist eine Implementierung eines Interfaces, die mit \texttt{@Alternative} annotiert wird.
|
||||||
|
Sie kann in der \texttt{beans.xml} aktiviert werden, um die Standardimplementierung zu überschreiben (z.B. für Mock-Objekte in Tests). Ohne Aktivierung in \texttt{beans.xml} wird sie ignoriert.
|
||||||
|
|
||||||
|
\item \textbf{Welchen Zweck erfüllen Producer?}
|
||||||
|
|
||||||
|
Producer (Methoden oder Felder mit \texttt{@Produces}) erzeugen Objekte, die keine CDI-Beans sind (z.B. \texttt{String}, \texttt{Date}, externe Bibliotheken) oder deren Erzeugung eine besondere Logik erfordert. Sie machen solche Objekte injizierbar.
|
||||||
|
|
||||||
|
\item \textbf{Wie werden Producer erstellt und verwendet?}
|
||||||
|
|
||||||
|
Eine Methode oder ein Feld wird mit \texttt{@Produces} annotiert. Meist gibt man zusätzlich einen Qualifizierer an.
|
||||||
|
Beispiel – Producer-Methode:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Produces @Datum
|
||||||
|
public Date aktuellesDatum() {
|
||||||
|
return new Date();
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Verwendung – Injection:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Inject @Datum private Date datum;
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Welche Aufgabe übernimmt ein Disposer? Wie wird ein Disposer erstellt?}
|
||||||
|
|
||||||
|
Ein Disposer schließt oder räumt Ressourcen auf, die von einem Producer erzeugt wurden (z.B. Datenbankverbindungen).
|
||||||
|
Erstellt wird er durch eine Methode in derselben Klasse wie der Producer, die den zu zerstörenden Wert als Parameter mit der Annotation \texttt{@Disposes} erhält.
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
public void schliesse(@Disposes Date datum) {
|
||||||
|
// Ressourcen freigeben
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Welche Scopes umfasst CDI?}
|
||||||
|
|
||||||
|
CDI definiert fünf Scopes:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{@ApplicationScoped} – eine Instanz pro Anwendung.
|
||||||
|
\item \texttt{@SessionScoped} – eine Instanz pro HTTP-Session.
|
||||||
|
\item \texttt{@RequestScoped} – eine Instanz pro HTTP-Request.
|
||||||
|
\item \texttt{@ConversationScoped} – vom Entwickler steuerbarer, längerlebiger Scope.
|
||||||
|
\item \texttt{@Dependent} (Pseudo-Scope) – Lebenszyklus abhängig von der injizierenden Bean.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Welche Lebensdauer deckt der Conversation Scope ab? Wie kann eine Conversation gestartet und beendet werden?}
|
||||||
|
|
||||||
|
Der Conversation Scope bleibt über mehrere Requests erhalten, bis er explizit beendet wird.
|
||||||
|
Eine mit \texttt{@ConversationScoped} annotierte Bean kann eine \texttt{Conversation} injizieren:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Inject private Conversation conversation;
|
||||||
|
\end{minted}
|
||||||
|
Start: \texttt{conversation.begin();} (danach ist die Conversation \textit{long running})
|
||||||
|
Ende: \texttt{conversation.end();} (danach ist sie wieder \textit{transient}).
|
||||||
|
|
||||||
|
\item \textbf{Welchen Zweck erfüllt die Annotation @Named?}
|
||||||
|
|
||||||
|
\texttt{@Named} vergibt einen Namen für eine CDI-Bean, damit sie in Expression Languages (z.B. JSF) angesprochen werden kann.
|
||||||
|
Standardname ist der einfache Klassenname mit kleinem Anfangsbuchstaben.
|
||||||
|
Beispiel: \texttt{@Named("meinService")} erlaubt den Zugriff über \texttt{\#\{meinService.methode()\}}.
|
||||||
|
|
||||||
|
\item \textbf{Welchen Sinn haben Interceptoren? Wie ist der Ablauf eines Interceptoraufrufs?}
|
||||||
|
|
||||||
|
Interceptoren führen Querschnittsaufgaben (Logging, Security, Transaktionen) vor/nach einer Methode aus.
|
||||||
|
Ablauf:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Der Client ruft eine Methode der Zielklasse auf.
|
||||||
|
\item Der Container ruft zuerst die \texttt{@AroundInvoke}-Methode des Interceptors auf.
|
||||||
|
\item Diese führt eigenen Code aus und ruft dann \texttt{ic.proceed()} auf.
|
||||||
|
\item \texttt{proceed()} ruft die eigentliche Zielmethode (oder den nächsten Interceptor) auf.
|
||||||
|
\item Der Rückgabewert wird zurückgegeben.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item \textbf{Wie werden Interceptoren für Methoden erstellt?}
|
||||||
|
|
||||||
|
Man schreibt eine Methode mit der Annotation \texttt{@AroundInvoke}, die ein \texttt{InvocationContext}-Objekt erhält und \texttt{Object} zurückgibt. Beispiel:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@AroundInvoke
|
||||||
|
public Object log(InvocationContext ic) throws Exception {
|
||||||
|
System.out.println("Vorher");
|
||||||
|
return ic.proceed();
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\item \textbf{Wie können Interceptoren für mehrere Klassen erstellt werden?}
|
||||||
|
|
||||||
|
Man lagert die Interceptor-Methode in eine eigene Klasse aus und bindet sie mit \texttt{@Interceptors(LoggingInterceptor.class)} an die gewünschte Klasse oder Methode.
|
||||||
|
Alternativ verwendet man ein \textit{Interceptor Binding} (siehe nächste Aufgabe).
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich beim Interceptor Binding?}
|
||||||
|
|
||||||
|
Interceptor Binding ist eine Qualifizierer-ähnliche Annotation, die mit \texttt{@InterceptorBinding} markiert wird.
|
||||||
|
Der Interceptor wird mit dieser Annotation sowie \texttt{@Interceptor} versehen.
|
||||||
|
Man kann dann jede Klasse oder Methode mit der Binding-Annotation versehen, um den Interceptor anzuwenden – ohne direkte Referenz auf die Interceptor-Klasse (lose Kopplung).
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei Dekoratoren?}
|
||||||
|
|
||||||
|
Dekoratoren sind spezielle CDI-Beans, die das Verhalten einer bestehenden Bean erweitern, indem sie dieselbe Schnittstelle implementieren und eine delegierte Referenz injizieren.
|
||||||
|
Sie werden mit \texttt{@Decorator} annotiert und in \texttt{beans.xml} aktiviert.
|
||||||
|
Dekoratoren eignen sich, um fachliche Erweiterungen (z.B. eine Superzahl bei Lottozahlen) hinzuzufügen.
|
||||||
|
|
||||||
|
\item \textbf{Wie können mit CDI Events erstellt werden?}
|
||||||
|
|
||||||
|
Ein Event wird über die generische Klasse \texttt{Event<T>} injiziert:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Inject private Event<MyEvent> event;
|
||||||
|
\end{minted}
|
||||||
|
Senden: \texttt{event.fire(myEvent);} (synchron) oder \texttt{event.fireAsync(myEvent);} (asynchron, seit CDI 2.0).
|
||||||
|
Empfangen: Eine Methode mit Parameter \texttt{@Observes MyEvent event} (oder \texttt{@ObservesAsync}) in einer beliebigen CDI-Bean.
|
||||||
|
|
||||||
|
\item \textbf{Erstellen Sie einen Producer der ein Objekt vom Typ org.jboss.logging.Logger erstellt. Dieser Logger soll in verschiedene Klassen injizierbar sein. Testen Sie den Producer, indem Sie sich den Logger in einer Stateless Session Bean injizieren lassen und einen beliebigen String in die Konsole loggen.}
|
||||||
|
|
||||||
|
Die vollständige Implementierung befindet sich in den folgenden Dateien (siehe Code-Verzeichnis).
|
||||||
|
Kurze Erklärung: Der Producer verwendet die \texttt{InjectionPoint}-API, um den Typ der injizierenden Klasse zu ermitteln. Dadurch wird der korrekte Logger für jede Klasse erzeugt. Die Stateless Session Bean injiziert den Logger und ruft \texttt{info()} auf.
|
||||||
|
|
||||||
|
\noindent\textbf{LoggerProducer.java}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung5/aufgabe21/LoggerProducer.java}
|
||||||
|
|
||||||
|
\noindent\textbf{TestLoggerService.java}
|
||||||
|
\inputminted[breaklines]{java}{../../server/src/main/java/org/example/demo/uebung5/aufgabe21/TestLoggerService.java}
|
||||||
|
|
||||||
|
\end{exercises}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
\documentclass{uebung}
|
||||||
|
|
||||||
|
\author{Linus Nagel}
|
||||||
|
\chapter{6}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\begin{exercises}
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei einer Transaktion?}
|
||||||
|
|
||||||
|
Eine Transaktion ist eine Aneinanderreihung von Einzelaktionen, die als atomare Einheit behandelt wird. Vor der ersten Aktion wird die Transaktion eröffnet und der vorherige Zustand zwischengespeichert. Laufen alle Schritte fehlerfrei ab, werden die Änderungen dauerhaft bestätigt (\emph{commit}); bei einem Fehler wird der ursprüngliche Zustand wiederhergestellt (\emph{rollback}). Der Application Server stellt dabei das \textbf{ACID}-Prinzip sicher:
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{Atomicity} – Alle Teilschritte oder keiner wird ausgeführt.
|
||||||
|
\item \textbf{Consistency} – Der Datenbestand ist nach der Ausführung stets konsistent.
|
||||||
|
\item \textbf{Isolation} – Mehrere parallele Transaktionen beeinflussen sich nicht gegenseitig.
|
||||||
|
\item \textbf{Durability} – Das Ergebnis ist dauerhaft und übersteht z.\,B. einen Server-Neustart.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Worin besteht der Unterschied zwischen Container Managed Transactions und Bean Managed Transactions?}
|
||||||
|
|
||||||
|
Bei \textbf{Container Managed Transactions (CMT)} übernimmt der Container die komplette Transaktionsverwaltung: Er startet die Transaktion beim Methodenaufruf, überwacht den Erfolg und leitet automatisch ein Commit oder Rollback ein. CMT ist die Voreinstellung für EJBs und wird mit \texttt{@TransactionManagement(TransactionManagementType.CONTAINER)} konfiguriert.
|
||||||
|
|
||||||
|
Bei \textbf{Bean Managed Transactions (BMT)} steuert der Entwickler die Transaktionen selbst über die JTA-Schnittstelle \texttt{UserTransaction}. Er bestimmt explizit, wann eine Transaktion beginnt (\texttt{begin()}), erfolgreich abgeschlossen (\texttt{commit()}) oder zurückgerollt (\texttt{rollback()}) wird. BMT wird mit \texttt{@TransactionManagement(TransactionManagementType.BEAN)} aktiviert.
|
||||||
|
|
||||||
|
\item \textbf{Beschreiben Sie den generellen Ablauf einer Transaktion im Application Server bei vom Container verwalteten Transaktionen.}
|
||||||
|
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Ein Client ruft eine Methode einer CMT-Bean auf.
|
||||||
|
\item Der Container startet – sofern gemäß \texttt{@TransactionAttribute} erforderlich – eine neue Transaktion und erzeugt einen Transaktionskontext.
|
||||||
|
\item Die Methode wird ausgeführt. Ressourcen wie Datenbankverbindungen oder JMS-Verbindungen werden in den Transaktionskontext aufgenommen.
|
||||||
|
\item Der Transaktionskontext wird entlang der Aufrufkette an aufgerufene Methoden weiterpropagiert.
|
||||||
|
\item Am Ende der Methode wertet der Container das Ergebnis aus:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Kein Fehler → \emph{commit}: alle Änderungen werden dauerhaft geschrieben.
|
||||||
|
\item System-Exception, \texttt{@ApplicationException(rollback=true)} oder \texttt{setRollbackOnly()} → \emph{rollback}: der Zustand vor der Transaktion wird wiederhergestellt.
|
||||||
|
\end{itemize}
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item \textbf{Welche Gründe gibt es für einen Abbruch einer Transaktion? Gehen Sie dabei insbesondere auch auf unterschiedliche Typen von Exceptions ein.}
|
||||||
|
|
||||||
|
Ein Rollback wird in folgenden Fällen ausgelöst:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \textbf{System-Exception} – Exceptions, die von \texttt{RuntimeException} oder \texttt{java.rmi.RemoteException} abgeleitet sind (z.\,B. \texttt{NullPointerException}). Sie werden vom Server in eine Application-Exception verpackt und an den Client weitergeleitet. Nach einer System-Exception wird die Bean-Instanz zerstört. Durch die Annotation \texttt{@ApplicationException} kann ein Rollback für eine solche Exception verhindert werden.
|
||||||
|
\item \textbf{Application-Exception mit Rollback-Flag} – Checked Exceptions (von \texttt{Exception} abgeleitet, nicht von \texttt{RuntimeException}), die mit \texttt{@ApplicationException(rollback=true)} annotiert wurden. Ohne dieses Flag führt eine Application-Exception \emph{nicht} zu einem Rollback; sie wird direkt an den Client weitergegeben.
|
||||||
|
\item \textbf{Manuelles Markieren} – Der Entwickler ruft \texttt{sessionContext.setRollbackOnly()} auf. Der \texttt{SessionContext} wird per \texttt{@Resource} injiziert.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item \textbf{Worum handelt es sich bei Session Synchronisierung? Welche Methoden bzw. Annotationen umfasst die Session Synchronisierung?}
|
||||||
|
|
||||||
|
Die Session Synchronisierung ermöglicht es Stateful Session Beans, zu bestimmten Zeitpunkten über den Zustand einer laufenden Transaktion informiert zu werden. Eine Bean implementiert dazu das Interface \texttt{SessionSynchronization} oder versieht entsprechend benannte Methoden mit Annotationen:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{afterBegin()} / \texttt{@AfterBegin} – wird nach dem Beginn der Transaktion aufgerufen; hier können Zustände für einen eventuellen Rollback gespeichert werden.
|
||||||
|
\item \texttt{beforeCompletion()} / \texttt{@BeforeCompletion} – wird in der ersten Phase des Zwei-Phasen-Commits aufgerufen.
|
||||||
|
\item \texttt{afterCompletion(boolean commit)} / \texttt{@AfterCompletion} – wird in der zweiten Phase aufgerufen. Der Parameter ist \texttt{true} bei erfolgreichem Commit und \texttt{false} bei einem Rollback. Hier werden zwischengespeicherte Zustände wiederhergestellt, falls nötig.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Wie können Transaktionen von der Bean verwaltet werden?}
|
||||||
|
|
||||||
|
Die Bean-Klasse wird mit \texttt{@TransactionManagement(TransactionManagementType.BEAN)} annotiert. Innerhalb der Methoden erhält der Entwickler über \texttt{sessionContext.getUserTransaction()} eine Instanz von \texttt{UserTransaction} und steuert die Transaktion manuell:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
UserTransaction tx = sessionContext.getUserTransaction();
|
||||||
|
try {
|
||||||
|
tx.begin();
|
||||||
|
// Datenbankoperationen, JMS, etc.
|
||||||
|
tx.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
tx.rollback();
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Zu beachten ist, dass BMT-Beans nicht an propagierten Transaktionen teilnehmen können; jeder \texttt{begin()}-Aufruf startet stets eine neue Transaktion.
|
||||||
|
|
||||||
|
\item \textbf{Wie können Transaktionen durch den Client verwaltet werden?}
|
||||||
|
|
||||||
|
Der Client holt sich ein \texttt{UserTransaction}-Objekt per JNDI-Lookup und steuert die Transaktion über dieselben Methoden wie bei BMT:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
InitialContext ctx = new InitialContext(properties);
|
||||||
|
UserTransaction tx = (UserTransaction) ctx.lookup("UserTransaction");
|
||||||
|
try {
|
||||||
|
tx.begin();
|
||||||
|
// Mehrere Server-Methodenaufrufe innerhalb einer Transaktion
|
||||||
|
tx.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
tx.rollback();
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Dies ermöglicht es, mehrere Methodenaufrufe – auch über mehrere Server hinweg – in einer einzigen Transaktion zu bündeln. Der Jakarta EE Standard empfiehlt Serverherstellern, diese Möglichkeit bereitzustellen, schreibt sie jedoch nicht verbindlich vor.
|
||||||
|
|
||||||
|
\item \textbf{Betrachten Sie das Programm in den Projekten \texttt{Componentware\_Kapitel6\_Transaktionen\_Uebung} und \texttt{Componentware\_Kapitel6\_Transaktionen\_Uebung\_TestClient}. Wo finden Transaktionsaufrufe statt? An welcher Stelle findet ein Rollback statt und wo endet eine Transaktion mit einem commit?}
|
||||||
|
|
||||||
|
Die Bean \texttt{HelloWorld} ist eine Stateful Session Bean mit CMT. Da kein \texttt{@TransactionAttribute} angegeben ist, gilt die Voreinstellung \texttt{REQUIRED}: Der Container startet bei jedem Methodenaufruf vom Client aus eine eigene Transaktion. Es finden somit \textbf{vier Transaktionsaufrufe} statt – je einer pro Methode in \texttt{HelloClient}.
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{\texttt{sayHello1()}} wirft \texttt{HelloException1}, eine checked Exception ohne jede \texttt{@ApplicationException}-Annotation. Sie gilt als Application-Exception und führt standardmäßig \emph{nicht} zu einem Rollback → die Transaktion endet mit \textbf{commit}.
|
||||||
|
|
||||||
|
\item \textbf{\texttt{sayHello2()}} wirft \texttt{HelloException2}, eine checked Exception mit \texttt{@ApplicationException}, aber ohne das Attribut \texttt{rollback=true} (Standardwert ist \texttt{false}). Auch hier kein Rollback → die Transaktion endet mit \textbf{commit}.
|
||||||
|
|
||||||
|
\item \textbf{\texttt{sayHello3()}} ruft \texttt{Integer.parseInt("Einhundertdreiundzwanzig")} auf, was eine \texttt{NumberFormatException} auslöst. Diese leitet von \texttt{RuntimeException} ab und ist damit eine System-Exception → der Container führt einen \textbf{Rollback} durch. Da es sich um eine Stateful Session Bean handelt, wird die Bean-Instanz nach dieser System-Exception \textbf{zerstört}. Die Exception wird vom Container in eine \texttt{EJBException} verpackt und an den Client weitergegeben.
|
||||||
|
|
||||||
|
\item \textbf{\texttt{sayHello4()}} wird im Client nach dem Rollback auf derselben Bean-Referenz aufgerufen. Da die Stateful Session Bean durch die System-Exception in \texttt{sayHello3()} bereits zerstört wurde, schlägt dieser Aufruf mit einer Exception fehl (z.\,B. \texttt{NoSuchEJBException}); \texttt{sayHello4()} wird nie ausgeführt.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Beschreiben Sie den Aufbau der Startklasse einer Spring Boot Applikation, also die Klasse, die die \texttt{main}-Methode enthält, für den einfachsten Fall.}
|
||||||
|
|
||||||
|
Die Startklasse wird mit \texttt{@SpringBootApplication} annotiert. In der \texttt{main}-Methode wird die statische Methode \texttt{SpringApplication.run()} aufgerufen, der die eigene Klasse als \texttt{Class}-Objekt sowie das \texttt{args}-Array übergeben werden:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@SpringBootApplication
|
||||||
|
public class MeineApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(MeineApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Die Annotation \texttt{@SpringBootApplication} fasst \texttt{@SpringBootConfiguration}, \texttt{@EnableAutoConfiguration} und \texttt{@ComponentScan} zusammen und aktiviert damit die Autokonfiguration sowie das Component Scanning im eigenen Paket und dessen Unterpaketen.
|
||||||
|
|
||||||
|
\item \textbf{Wie kann in Spring Boot eine Shell-Applikation erstellt werden?}
|
||||||
|
|
||||||
|
Es wird der Starter \texttt{spring-shell-starter} als Maven-Abhängigkeit eingetragen:
|
||||||
|
\begin{minted}[breaklines]{xml}
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.shell</groupId>
|
||||||
|
<artifactId>spring-shell-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
\end{minted}
|
||||||
|
Anschließend werden Methoden in einer \texttt{@Component}-Klasse mit \texttt{@Command} annotiert:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Component
|
||||||
|
public class HelloWorld {
|
||||||
|
@Command(description = "hello: Gibt Hello World aus")
|
||||||
|
public String hello() {
|
||||||
|
return "Hello World!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Nach dem Start der Anwendung (empfohlen: \texttt{./mvnw spring-boot:run}) steht ein interaktiver Prompt zur Verfügung, über den die Methoden im kebab-case-Format aufgerufen werden können (\texttt{\$> hello}).
|
||||||
|
|
||||||
|
\item \textbf{Gegeben Sie die folgende Klasse. Wie kann ein Objekt der Klasse \texttt{Hello} in ein Attribut einer anderen Klasse injiziert werden?}
|
||||||
|
|
||||||
|
Da \texttt{Hello} mit \texttt{@Component} annotiert ist, wird sie vom Spring-Container als Spring-managed Bean verwaltet. In einer anderen Klasse kann das Objekt über Konstruktor-Injection mit \texttt{@Autowired} injiziert werden:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
@Component
|
||||||
|
public class Greeter {
|
||||||
|
private final Hello hello;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public Greeter(Hello hello) {
|
||||||
|
this.hello = hello;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void greet() {
|
||||||
|
System.out.println(hello.sayHello());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Alternativ ist auch Feld-Injection mit \texttt{@Autowired private Hello hello;} möglich, jedoch ist Konstruktor-Injection vorzuziehen, da die Abhängigkeit dann \texttt{final} sein kann und die Klasse außerhalb des Spring-Kontexts einfacher testbar ist. Statt \texttt{@Autowired} kann auch das Jakarta-EE-Standard-Äquivalent \texttt{@Inject} verwendet werden.
|
||||||
|
|
||||||
|
\item \textbf{Welchen Vorteil bieten Spring Repositories gegenüber der Verwendung von JPA?}
|
||||||
|
|
||||||
|
Bei direkter JPA-Nutzung muss der Entwickler den \texttt{EntityManager} selbst injizieren und alle CRUD-Operationen (persist, find, remove, createQuery usw.) manuell implementieren. Spring Repositories (z.\,B. \texttt{CrudRepository}, \texttt{ListCrudRepository}, \texttt{JpaRepository}) generieren diese Standardmethoden automatisch auf Basis des Entitätstyps und des ID-Typs:
|
||||||
|
\begin{minted}[breaklines]{java}
|
||||||
|
public interface BuchRepository extends JpaRepository<Buch, Long> {
|
||||||
|
// save, findAll, findById, delete, ... werden automatisch bereitgestellt
|
||||||
|
}
|
||||||
|
\end{minted}
|
||||||
|
Der Entwickler muss lediglich ein Interface definieren, das das gewünschte Repository-Interface erweitert. Spring erstellt zur Laufzeit automatisch eine Implementierung. Dies reduziert Boilerplate-Code erheblich und vereinfacht den Datenbankzugriff.
|
||||||
|
|
||||||
|
\item \textbf{Erstellen Sie mit Spring Boot einen Web Service, der eine Methode bereitstellt, die zwei Zahlen als Path-Parameter in der URL \texttt{localhost:8080/math/sum/<zahl1>/<zahl2>} entgegennimmt. Die Methode soll diese beiden Zahlen addieren und die Summe als Ergebnis zurückliefern. Testen Sie den Service über einen Web Browser.}
|
||||||
|
|
||||||
|
\noindent\textbf{SpringDemoApplication.java}
|
||||||
|
\inputminted[breaklines]{java}{../../spring/src/main/java/org/example/demo/uebung6/SpringDemoApplication.java}
|
||||||
|
|
||||||
|
\noindent\textbf{MathWebService.java}
|
||||||
|
\inputminted[breaklines]{java}{../../spring/src/main/java/org/example/demo/uebung6/MathWebService.java}
|
||||||
|
|
||||||
|
\end{exercises}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{uebung}[Sem3 Web Engineering Exercise Sheet Class]
|
\ProvidesClass{uebung}[Sem4 Componentware Exercise Sheet Class]
|
||||||
|
|
||||||
% Base class with options
|
% Base class with options
|
||||||
\LoadClass[11pt,a4paper]{article}
|
\LoadClass[11pt,a4paper]{article}
|
||||||
@@ -60,14 +60,14 @@
|
|||||||
% Header and footer setup
|
% Header and footer setup
|
||||||
\pagestyle{fancy}
|
\pagestyle{fancy}
|
||||||
\fancyhf{}
|
\fancyhf{}
|
||||||
\fancyhead[L]{\textbf{Übung Web-Engineering}}
|
\fancyhead[L]{\textbf{Übung Componentware}}
|
||||||
\fancyhead[R]{\textbf{Aufgabenblatt zu Kapitel \thechapter}}
|
\fancyhead[R]{\textbf{Aufgabenblatt zu Kapitel \thechapter}}
|
||||||
\fancyfoot[C]{\thepage}
|
\fancyfoot[C]{\thepage}
|
||||||
|
|
||||||
% Title format
|
% Title format
|
||||||
\renewcommand{\maketitle}{
|
\renewcommand{\maketitle}{
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\LARGE\textbf{Übung Web-Engineering}\\
|
\LARGE\textbf{Übung Componentware}\\
|
||||||
\Large\textbf{Aufgabenblatt zu Kapitel \thechapter}
|
\Large\textbf{Aufgabenblatt zu Kapitel \thechapter}
|
||||||
\vspace{1cm}
|
\vspace{1cm}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
linkcolor=blue,
|
linkcolor=blue,
|
||||||
filecolor=magenta,
|
filecolor=magenta,
|
||||||
urlcolor=cyan,
|
urlcolor=cyan,
|
||||||
pdftitle={Web Engineering Übungen},
|
pdftitle={Componentware Übungen},
|
||||||
pdfauthor={Linus Nagel}
|
pdfauthor={Linus Nagel}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,578 @@
|
|||||||
|
# Componentware – Transaktionen, Packaging, Architektur und Spring Boot
|
||||||
|
|
||||||
|
## Inhalt
|
||||||
|
|
||||||
|
**Teil 1: Transaktionen & Packaging**
|
||||||
|
- Transaktionen: Einführung, CMT, BMT, Client Managed
|
||||||
|
- Packaging
|
||||||
|
- Architektur
|
||||||
|
- Abschließendes Beispiel
|
||||||
|
|
||||||
|
**Teil 2: Spring Boot**
|
||||||
|
- Überblick über Spring
|
||||||
|
- Starter
|
||||||
|
- Anlegen eines Spring-Boot Projekts
|
||||||
|
- Spring Shell
|
||||||
|
- Komponenten, CDI
|
||||||
|
- Zugriff auf Datenbanken / Spring Data
|
||||||
|
- Messaging
|
||||||
|
- Spring Web MVC / RESTful Web Services
|
||||||
|
- Transaktionen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Einführung
|
||||||
|
|
||||||
|
- Eine der wichtigsten Aufgaben des Entwicklers von Enterprise Systemen stellt die Aufrechterhaltung der Systemkonsistenz dar.
|
||||||
|
- Falls von einem Geschäftsprozess mehr als eine Aktion durchgeführt wird, muss sichergestellt sein, dass entweder alle Einzelschritte oder gar keiner der Schritte durchgeführt wird.
|
||||||
|
- Beispiel: Bestellung → Bestand reduzieren + Spediteur benachrichtigen. Beide Schritte müssen zusammen ablaufen.
|
||||||
|
- Das Jakarta Transactions API (JTA) stellt diverse Möglichkeiten der Transaktionsverwaltung bereit.
|
||||||
|
|
||||||
|
### Ablauf einer Transaktion
|
||||||
|
|
||||||
|
1. Vor der ersten Ausführung wird eine Transaktion eröffnet.
|
||||||
|
2. Der Zustand vor dem Start wird zwischengespeichert.
|
||||||
|
3. Falls ein Fehler auftritt, markiert der Server die Transaktion als fehlerhaft.
|
||||||
|
4. Falls alle Aktionen fehlerfrei durchlaufen → **commit** (zwischengespeicherte Zustände werden gelöscht).
|
||||||
|
5. Falls die Transaktion als ungültig markiert wurde → **rollback** (Zustand vor der Transaktion wird wiederhergestellt).
|
||||||
|
|
||||||
|
Der Transaktionskontext wird entlang der Aufrufkette propagiert (bei Lookups, Injections oder Proxy-Objekten).
|
||||||
|
|
||||||
|
### ACID-Prinzip
|
||||||
|
|
||||||
|
| Eigenschaft | Bedeutung |
|
||||||
|
|-------------|-----------|
|
||||||
|
| **Atomicity** | Alle Teilschritte oder keiner wird ausgeführt. |
|
||||||
|
| **Consistency** | Nach der Ausführung ist der Datenbestand konsistent. |
|
||||||
|
| **Isolation** | Mehrere Transaktionen beeinflussen sich nicht gegenseitig. |
|
||||||
|
| **Durability** | Ergebnisse sind dauerhaft (überstehen z.B. Server-Neustart). |
|
||||||
|
|
||||||
|
### 2-Phase-Commit
|
||||||
|
|
||||||
|
Bei verteilten Systemen erfolgt die Transaktion per 2-Phase-Commit:
|
||||||
|
1. **Phase 1**: Transaktionskoordinator veranlasst Ausführung bei allen beteiligten Systemen.
|
||||||
|
2. **Phase 2**: Bei Erfolg → finales Commit; bei Fehler → Rollback.
|
||||||
|
|
||||||
|
### Transaktionsarten
|
||||||
|
|
||||||
|
- **CMT (Container Managed Transactions)**: Voreinstellung bei EJBs – der Container übernimmt die Steuerung.
|
||||||
|
- **BMT (Bean Managed Transactions)**: Der Entwickler steuert die Transaktionen selbst.
|
||||||
|
- **Client Managed Transactions**: Der Client startet die Transaktion.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Container Managed Transactions (CMT)
|
||||||
|
|
||||||
|
- Annotierung der Klasse mit `@TransactionManagement(TransactionManagementType.CONTAINER)` (ist Voreinstellung).
|
||||||
|
- Transaktionen starten beim Client-Aufruf einer Methode und enden i.d.R. mit der Methode.
|
||||||
|
- JMS-Nachrichten oder Datenbankstatements werden erst am Ende der Transaktion versendet.
|
||||||
|
|
||||||
|
### Rollback-Auslöser
|
||||||
|
|
||||||
|
1. **System-Exception** (von `RuntimeException` oder `java.rmi.RemoteException` abgeleitet):
|
||||||
|
- Wird vom Server in eine Application-Exception verpackt und an den Client geleitet.
|
||||||
|
- Rollback kann verhindert werden mit `@ApplicationException` an der Exception-Klasse.
|
||||||
|
- Nach einer System-Exception in einer Stateful/Stateless Session Bean wird die Bean zerstört.
|
||||||
|
|
||||||
|
2. **Application-Exception mit `@ApplicationException(rollback=true)`**:
|
||||||
|
- Application-Exceptions sind checked Exceptions (von `Exception`, aber nicht von `RuntimeException` abgeleitet).
|
||||||
|
- Werden direkt an den Client weitergeleitet (kein Verpacken).
|
||||||
|
- Checked Exceptions führen standardmäßig **nicht** zum Rollback.
|
||||||
|
|
||||||
|
3. **Manuell**: `sessionContext.setRollbackOnly()` (SessionContext per `@Resource` injizieren).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CMT – `@TransactionAttribute`
|
||||||
|
|
||||||
|
```java
|
||||||
|
@TransactionAttribute(TransactionAttributeType.<VALUE>)
|
||||||
|
```
|
||||||
|
|
||||||
|
| Wert | Bedeutung |
|
||||||
|
|------|-----------|
|
||||||
|
| **REQUIRED** | (Standard) Vorhandenen Kontext verwenden oder neuen anlegen. |
|
||||||
|
| **REQUIRES_NEW** | Immer neuen Kontext anlegen; vorhandener wird pausiert. |
|
||||||
|
| **MANDATORY** | Vorhandener Kontext erforderlich; sonst `TransactionRequiredException`. |
|
||||||
|
| **SUPPORTS** | Kontext wird übernommen, wenn vorhanden; sonst ohne Transaktion. |
|
||||||
|
| **NOT_SUPPORTED** | Keinen Kontext verwenden; vorhandener wird unterbrochen. |
|
||||||
|
| **NEVER** | Keinen Kontext akzeptieren; bei vorhandenem Kontext → `EJBException`. |
|
||||||
|
|
||||||
|
> **Hinweis**: Bei Message Driven Beans sind nur `REQUIRED`, `REQUIRES_NEW` und `SUPPORTS` möglich.
|
||||||
|
|
||||||
|
### `this`-Aufrufproblem
|
||||||
|
|
||||||
|
Ruft eine EJB-Methode eine andere Methode der **gleichen Klasse** über `this` auf, registriert der Container diesen Aufruf nicht → das Transaktionsattribut der aufgerufenen Methode wird ignoriert.
|
||||||
|
|
||||||
|
**Lösung**: Aufruf über eine andere Bean (per `@EJB` injiziert) oder über `sessionContext.getBusinessObject(KlassenName.class)`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CMT – Container Callback Methoden (Session Synchronisierung)
|
||||||
|
|
||||||
|
Für Stateful Session Beans, die länger als eine Transaktion leben. Interface: `SessionSynchronization` (oder Annotationen):
|
||||||
|
|
||||||
|
| Methode / Annotation | Zeitpunkt |
|
||||||
|
|----------------------|-----------|
|
||||||
|
| `afterBegin()` / `@AfterBegin` | Nach Beginn der Transaktion |
|
||||||
|
| `beforeCompletion()` / `@BeforeCompletion` | In Phase 1 des 2-Phase-Commits |
|
||||||
|
| `afterCompletion(boolean commit)` / `@AfterCompletion` | In Phase 2 (`true` = commit, `false` = rollback) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Bean Managed Transactions (BMT)
|
||||||
|
|
||||||
|
```java
|
||||||
|
@TransactionManagement(TransactionManagementType.BEAN)
|
||||||
|
```
|
||||||
|
|
||||||
|
Zugriff auf `UserTransaction` über `sessionContext.getUserTransaction()`.
|
||||||
|
|
||||||
|
### UserTransaction-Methoden
|
||||||
|
|
||||||
|
| Methode | Beschreibung |
|
||||||
|
|---------|-------------|
|
||||||
|
| `begin()` | Startet eine neue Transaktion. BMT kann nicht an propagierten Transaktionen teilnehmen. |
|
||||||
|
| `commit()` | Beendet und bestätigt die Transaktion. |
|
||||||
|
| `rollback()` | Beendet und verwirft die Transaktion. |
|
||||||
|
|
||||||
|
> **Achtung**: In Stateful Session Beans können Transaktionen über mehrere Methoden geöffnet bleiben – Transaktion muss in jedem Fall beendet werden.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Client Managed Transactions
|
||||||
|
|
||||||
|
```java
|
||||||
|
InitialContext ctx = new InitialContext(..);
|
||||||
|
UserTransaction tx = (UserTransaction) ctx.lookup("UserTransaction");
|
||||||
|
```
|
||||||
|
|
||||||
|
Steuerung über dieselben Methoden wie bei BMT: `begin()`, `commit()`, `rollback()`.
|
||||||
|
|
||||||
|
> Der Jakarta EE Standard empfiehlt Serverherstellern, Client-Transaktionen zu unterstützen – es ist jedoch keine Pflicht.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
| Archivtyp | Inhalt | Verwendung |
|
||||||
|
|-----------|--------|------------|
|
||||||
|
| `.jar` | EJB-Projekt | EJB Application Archive |
|
||||||
|
| `.war` | Web-Projekt | Web Application Archive |
|
||||||
|
| `.ear` | jar + war + Deployment-Deskriptor | Enterprise Archive |
|
||||||
|
|
||||||
|
### EAR mit IntelliJ erstellen
|
||||||
|
|
||||||
|
1. Projekt gemäß Anleitung anlegen (ejb- und war-Module im Temp-Ordner belassen).
|
||||||
|
2. Unter Artifacts → „Java EE Application: Archive" erstellen:
|
||||||
|
- Output Directory = WildFly Deploy-Verzeichnis
|
||||||
|
- „Include in project build" anhaken
|
||||||
|
- EJB- und WAR-Artifact per Drag & Drop hinzufügen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Architektur
|
||||||
|
|
||||||
|
### Klassische 3-Schichten-Architektur
|
||||||
|
|
||||||
|
```
|
||||||
|
Bedieneroberfläche → Fachkonzept → Datenhaltung
|
||||||
|
```
|
||||||
|
|
||||||
|
Mit Web-Controller (MVC):
|
||||||
|
```
|
||||||
|
Bedieneroberfläche → Controller → Fachkonzept → Datenhaltung
|
||||||
|
```
|
||||||
|
|
||||||
|
Mit Jakarta EE Middleware:
|
||||||
|
```
|
||||||
|
Bedieneroberfläche → Controller → Middleware (EJBs / DAOs) → Datenhaltung
|
||||||
|
```
|
||||||
|
|
||||||
|
### Data Transfer Objects (DTOs)
|
||||||
|
|
||||||
|
- **Ohne DTOs**: Entities werden direkt zum Client transportiert.
|
||||||
|
- **Mit DTOs**: Auf den Client angepasste Klassen → bessere Sicherheit und Performance.
|
||||||
|
|
||||||
|
### Monolithische Applikationen vs. Microservices
|
||||||
|
|
||||||
|
#### Monolithen
|
||||||
|
| Vorteile | Nachteile |
|
||||||
|
|----------|-----------|
|
||||||
|
| Einfache Entwicklung, IDE-Unterstützung | Schwer verständlich bei großer Codebasis |
|
||||||
|
| Einfaches Deployment (eine Datei) | Skalierung nur für das Gesamtsystem |
|
||||||
|
| Einfache End-to-End-Tests | Hohe Compilezeit |
|
||||||
|
| Leicht mit Load Balancer skalierbar | Lange Start- und Testzeiten |
|
||||||
|
|
||||||
|
#### Microservices
|
||||||
|
| Vorteile | Nachteile |
|
||||||
|
|----------|-----------|
|
||||||
|
| Kleinere, besser verständliche Codebasis | Schwierige Trennungsfindung |
|
||||||
|
| Einzeln deploybar und skalierbar | Netzwerkkomplexität |
|
||||||
|
| Teams können autonom arbeiten | Übergreifende Transaktionen schwierig |
|
||||||
|
| Verschiedene Technologien möglich | Höherer Administrationsaufwand |
|
||||||
|
| Schnellere Tests pro Service | Manche Aufgaben je Service implementieren |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Das Spring Boot Framework
|
||||||
|
|
||||||
|
### Überblick
|
||||||
|
|
||||||
|
- Spring ist ein Entwicklungsframework für Enterprise Applikationen auf Java-Basis (Alternative zu Jakarta EE).
|
||||||
|
- Erste Version: 2004; seit 2009 durch VMware entwickelt.
|
||||||
|
- **Spring Boot** (ab 2014): deutlich vereinfachte Konfiguration durch Autokonfiguration.
|
||||||
|
- Projekte anlegen über [https://start.spring.io](https://start.spring.io) oder IntelliJ.
|
||||||
|
|
||||||
|
### Spring vs. Spring Boot
|
||||||
|
|
||||||
|
| Spring | Spring Boot |
|
||||||
|
|--------|-------------|
|
||||||
|
| Container muss selbst konfiguriert werden | Sinnvolle Voreinstellungen |
|
||||||
|
| Kein embedded Server | Embedded Apache Tomcat |
|
||||||
|
|
||||||
|
### Typische Module
|
||||||
|
|
||||||
|
- **Spring Data** – Datenbankzugriff
|
||||||
|
- **Spring Web** – Webapplikationen inkl. RESTful Web Services
|
||||||
|
- **Spring Security** – Authentifizierung und Autorisierung
|
||||||
|
- **Spring Messaging** – Messaging
|
||||||
|
- **Spring Cloud** – Cloud-Technologien (AWS, Azure, ...)
|
||||||
|
|
||||||
|
### Starter
|
||||||
|
|
||||||
|
Ein Starter ist eine Maven-Dependency, die alle für eine Technologie notwendigen Libraries lädt und eine Autokonfiguration vornimmt.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Anlegen eines Spring-Boot-Projekts
|
||||||
|
|
||||||
|
### Hauptklasse
|
||||||
|
|
||||||
|
```java
|
||||||
|
@SpringBootApplication
|
||||||
|
public class SpringDemoApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(SpringDemoApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Interaktive Anwendungen mit der Spring Shell
|
||||||
|
|
||||||
|
Starter:
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.shell</groupId>
|
||||||
|
<artifactId>spring-shell-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
Shell-Methode erstellen:
|
||||||
|
```java
|
||||||
|
@Component
|
||||||
|
public class HelloWorld {
|
||||||
|
@Command(description = "hello: Says Hello World!")
|
||||||
|
public String hello() {
|
||||||
|
return "Hello World!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Aufruf im Prompt (Methodenname in kebab-case):
|
||||||
|
```
|
||||||
|
$> hello
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
|
||||||
|
Mit Parameter:
|
||||||
|
```java
|
||||||
|
@Command(description="hello-to --name <name>: ...")
|
||||||
|
public String helloTo(@Option(required = true) String name) {
|
||||||
|
return "Hello " + name;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
```
|
||||||
|
$> hello-to --name Petra
|
||||||
|
Hello Petra
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Hinweis**: In neueren IntelliJ-Versionen muss die App über Maven gestartet werden (`./mvnw spring-boot:run`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Komponenten
|
||||||
|
|
||||||
|
- POJOs werden mit `@Component` zu Spring-managed Beans.
|
||||||
|
- Müssen in einem Unterpaket der Klasse mit `@SpringBootApplication` liegen.
|
||||||
|
|
||||||
|
### Dependency Injection
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Autowired
|
||||||
|
private SomeManagedBean bean; // Attribut-Injection
|
||||||
|
```
|
||||||
|
|
||||||
|
Besser: **Konstruktor-Injection** (final-Attribute möglich, testbar ohne Spring-Kontext):
|
||||||
|
```java
|
||||||
|
@Autowired
|
||||||
|
public HelloWorld(HelloWorldComponent helloWorldComponent) {
|
||||||
|
this.helloWorldComponent = helloWorldComponent;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Semantische Annotationen
|
||||||
|
|
||||||
|
| Annotation | Verwendung |
|
||||||
|
|------------|-----------|
|
||||||
|
| `@Component` | Allgemeine Spring-managed Bean |
|
||||||
|
| `@Service` | Service-Klassen (Fachlogik) |
|
||||||
|
| `@Repository` | Data Access Objects |
|
||||||
|
| `@Controller` / `@RestController` | Web-Controller |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CDI in Spring
|
||||||
|
|
||||||
|
- **Component Scanning**: Spring sucht nach `@Component`, `@Repository`, `@Service`, `@Controller` im Paket der Hauptklasse und Unterpaketen.
|
||||||
|
- **`@Bean`**: Entspricht CDI-Producern – macht Werte aus Methoden injizierbar.
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Bean
|
||||||
|
public String name() {
|
||||||
|
return "Max Mustermann";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- **`@ComponentScan`**: Erweitert den Suchpfad.
|
||||||
|
- **Interceptoren**: `@PostConstruct` etc. wie in Jakarta EE. Alternativ AOP.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Zugriff auf Datenbanken
|
||||||
|
|
||||||
|
### Spring Data JPA
|
||||||
|
|
||||||
|
Starter:
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
`application.properties`:
|
||||||
|
```properties
|
||||||
|
spring.datasource.url=jdbc:mysql://localhost:3306/dbname
|
||||||
|
spring.datasource.username=<username>
|
||||||
|
spring.datasource.password=<password>
|
||||||
|
spring.jpa.hibernate.ddl-auto=create-drop
|
||||||
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||||
|
```
|
||||||
|
|
||||||
|
> In Spring laufen Methoden **nicht automatisch transaktional** → `@Transactional` an Methoden oder Klassen notwendig.
|
||||||
|
|
||||||
|
### SimpleJpaRepository
|
||||||
|
|
||||||
|
```java
|
||||||
|
SimpleJpaRepository<Book, Long> repository = new SimpleJpaRepository<>(Book.class, em);
|
||||||
|
List<Book> books = repository.findAll();
|
||||||
|
```
|
||||||
|
|
||||||
|
### CrudRepository / ListCrudRepository / JpaRepository
|
||||||
|
|
||||||
|
```java
|
||||||
|
public interface BookJpaRepository extends JpaRepository<Book, Long> {
|
||||||
|
// Methoden werden automatisch generiert
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Kein `@Autowired` nötig – Spring erkennt das Interface und erstellt automatisch eine Implementierung.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Messaging
|
||||||
|
|
||||||
|
Starter (ActiveMQ):
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-activemq</artifactId>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
ActiveMQ als Docker Container starten:
|
||||||
|
```bash
|
||||||
|
docker run -d --name activemq -p 61616:61616 -p 8161:8161 rmohr/activemq
|
||||||
|
```
|
||||||
|
|
||||||
|
`application.properties`:
|
||||||
|
```properties
|
||||||
|
spring.activemq.broker-url=tcp://localhost:61616
|
||||||
|
spring.activemq.user=admin
|
||||||
|
spring.activemq.password=admin
|
||||||
|
app.queue.name=buch.queue
|
||||||
|
spring.jms.pub-sub-domain=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Hauptklasse:
|
||||||
|
```java
|
||||||
|
@SpringBootApplication
|
||||||
|
@EnableJms
|
||||||
|
public class MyApp { ... }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Receiver
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Component
|
||||||
|
public class MessageReceiver {
|
||||||
|
@JmsListener(destination = "springQueue")
|
||||||
|
public void receiveMessage(Book receivedBook, Message message) {
|
||||||
|
// Verarbeitung
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Sender
|
||||||
|
|
||||||
|
```java
|
||||||
|
JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
|
||||||
|
jmsTemplate.convertAndSend("queueName", new Book("Buch", 42.99));
|
||||||
|
```
|
||||||
|
|
||||||
|
### MessageConverter (für benutzerdefinierte Typen via JSON/Jackson)
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Bean
|
||||||
|
public MessageConverter jacksonJmsMessageConverter() {
|
||||||
|
JacksonJsonMessageConverter converter = new JacksonJsonMessageConverter();
|
||||||
|
converter.setTypeIdPropertyName("_type");
|
||||||
|
Map<String, Class<?>> typeIdMappings = new HashMap<>();
|
||||||
|
typeIdMappings.put("buch", Buch.class);
|
||||||
|
converter.setTypeIdMappings(typeIdMappings);
|
||||||
|
return converter;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Spring Web MVC – RESTful Web Services
|
||||||
|
|
||||||
|
Starter:
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Controller
|
||||||
|
|
||||||
|
```java
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/hello")
|
||||||
|
public class HelloWebService {
|
||||||
|
@GetMapping
|
||||||
|
public String sayHello() {
|
||||||
|
return "Hello from Web Service";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mapping-Annotationen
|
||||||
|
|
||||||
|
| Annotation | HTTP-Methode |
|
||||||
|
|------------|-------------|
|
||||||
|
| `@GetMapping` | GET |
|
||||||
|
| `@PostMapping` | POST |
|
||||||
|
| `@PutMapping` | PUT |
|
||||||
|
| `@DeleteMapping` | DELETE |
|
||||||
|
|
||||||
|
### Parameter
|
||||||
|
|
||||||
|
**Query-Parameter**:
|
||||||
|
```java
|
||||||
|
@GetMapping("/to")
|
||||||
|
public String sayHelloTo(@RequestParam(value = "name", defaultValue = "World") String name) {
|
||||||
|
return "Hello to " + name;
|
||||||
|
}
|
||||||
|
// Aufruf: http://localhost:8080/hello/to?name=Peter
|
||||||
|
```
|
||||||
|
|
||||||
|
**Path-Parameter**:
|
||||||
|
```java
|
||||||
|
@GetMapping("/to/{name}")
|
||||||
|
public String sayHelloToParam(@PathVariable String name) {
|
||||||
|
return "Hello to " + name;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rückgabe von Objekten
|
||||||
|
|
||||||
|
```java
|
||||||
|
@GetMapping("/book/{id}")
|
||||||
|
public ResponseEntity<?> getBookById(@PathVariable long id) {
|
||||||
|
Book book = bookJpaRepository.getReferenceById(id);
|
||||||
|
return ResponseEntity.ok(book); // automatisch via JSON
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Empfang von Objekten
|
||||||
|
|
||||||
|
```java
|
||||||
|
@PostMapping(path = "/book")
|
||||||
|
public ResponseEntity<?> saveBook(@RequestBody Book book) {
|
||||||
|
Book b = bookJpaRepository.save(book);
|
||||||
|
return ResponseEntity.ok(b);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Transaktionen in Spring
|
||||||
|
|
||||||
|
### Deklarativ (`@Transactional`)
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Transactional
|
||||||
|
public void doSomething() {
|
||||||
|
// läuft in einem Transaktionskontext ab
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Bei `RuntimeException` → automatischer Rollback.
|
||||||
|
- Konfigurierbar: `readOnly`, Isolation (`REQUIRED`, `REQUIRES_NEW`), welche Exceptions zum Rollback führen.
|
||||||
|
- Neuer Thread erhält keinen propagierten Transaktionskontext.
|
||||||
|
|
||||||
|
### Programmgesteuert
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Service
|
||||||
|
public class DoSomethingService {
|
||||||
|
@Autowired
|
||||||
|
private PlatformTransactionManager transactionManager;
|
||||||
|
|
||||||
|
public void doSomething() {
|
||||||
|
TransactionDefinition definition = new DefaultTransactionDefinition();
|
||||||
|
TransactionStatus status = transactionManager.getTransaction(definition);
|
||||||
|
try {
|
||||||
|
// ... Datenbankoperationen ...
|
||||||
|
transactionManager.commit(status);
|
||||||
|
} catch (Exception e) {
|
||||||
|
transactionManager.rollback(status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Kernklassen
|
||||||
|
|
||||||
|
| Klasse | Rolle |
|
||||||
|
|--------|-------|
|
||||||
|
| `PlatformTransactionManager` | Führt Transaktionen technisch aus (begin, commit, rollback) |
|
||||||
|
| `TransactionDefinition` | Beschreibt Eigenschaften (Propagation, Timeout, ReadOnly, Name) |
|
||||||
|
| `TransactionStatus` | Repräsentiert die laufende Transaktion (Status abfragbar) |
|
||||||
Binary file not shown.
Generated
+52
-15
@@ -18,35 +18,36 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762844143,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "NixOS",
|
"owner": "hercules-ci",
|
||||||
"repo": "nixpkgs",
|
"repo": "flake-parts",
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "hercules-ci",
|
||||||
"repo": "nixpkgs",
|
"repo": "flake-parts",
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-angular-cli": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764947035,
|
"lastModified": 1776705249,
|
||||||
"narHash": "sha256-EYHSjVM4Ox4lvCXUMiKKs2vETUSL5mx+J2FfutM7T9w=",
|
"narHash": "sha256-3cg0CfzLLq2ay8SzAoNbI2OJkWY1H3kudrzA6hL14FM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a672be65651c80d3f592a89b3945466584a22069",
|
"rev": "cc3f2ee0b3909e42334f34720ccac109a7e67068",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a672be65651c80d3f592a89b3945466584a22069",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -65,11 +66,47 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1774748309,
|
||||||
|
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-angular-cli": "nixpkgs-angular-cli"
|
"wildfly": "wildfly"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wildfly": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778205353,
|
||||||
|
"narHash": "sha256-jVgEEjxFXapHfdpr5RuhnWsFds5k4BxLAwRaV0IoV78=",
|
||||||
|
"owner": "0qln",
|
||||||
|
"repo": "wildfly",
|
||||||
|
"rev": "e36d74b059ad18e7e429bb2ea02368cf3da5f390",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "0qln",
|
||||||
|
"repo": "wildfly",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
{
|
{
|
||||||
description = "Web Engineering";
|
description = "Componentware";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4";
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
nixpkgs-angular-cli.url = "github:NixOS/nixpkgs/a672be65651c80d3f592a89b3945466584a22069";
|
wildfly = {
|
||||||
|
url = "github:0qln/wildfly";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs = inputs @ {flake-parts, ...}:
|
||||||
flake-parts,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
imports = [];
|
imports = [];
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||||
perSystem = {
|
perSystem = {
|
||||||
config,
|
|
||||||
self',
|
|
||||||
inputs',
|
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
@@ -51,40 +47,7 @@
|
|||||||
]))
|
]))
|
||||||
];
|
];
|
||||||
|
|
||||||
wildfly = pkgs.stdenvNoCC.mkDerivation {
|
wildfly-fhs = inputs.wildfly.packages.${system}.wildfly-fhs;
|
||||||
name = "wildfly-39.0.0.Final";
|
|
||||||
src = pkgs.fetchzip {
|
|
||||||
url = "https://github.com/wildfly/wildfly/releases/download/39.0.0.Final/wildfly-39.0.0.Final.zip";
|
|
||||||
hash = "sha256-nfdb4doRRn4AwMQZkNYwIDBKIq4iY6diFX/WlPFQqZI=";
|
|
||||||
};
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r $src/* $out/
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
wildfly-fhs = pkgs.buildFHSEnv {
|
|
||||||
name = "wildfly-fhs";
|
|
||||||
targetPkgs = pkgs:
|
|
||||||
with pkgs; [
|
|
||||||
openjdk21
|
|
||||||
bash
|
|
||||||
coreutils
|
|
||||||
];
|
|
||||||
runScript = "${wildfly}/bin/standalone.sh";
|
|
||||||
profile =
|
|
||||||
# bash
|
|
||||||
''
|
|
||||||
export WILDFLY_BASE_DIR="$HOME/.wildfly-fhs-base"
|
|
||||||
mkdir -p "$WILDFLY_BASE_DIR"/{log,data,deployments,tmp,configuration}
|
|
||||||
if [ ! -f "$WILDFLY_BASE_DIR/configuration/standalone.xml" ]; then
|
|
||||||
cp -r ${wildfly}/standalone/configuration/* "$WILDFLY_BASE_DIR/configuration/"
|
|
||||||
chmod -R u+w "$WILDFLY_BASE_DIR/configuration/"
|
|
||||||
fi
|
|
||||||
export JBOSS_HOME=${wildfly}
|
|
||||||
export JBOSS_BASE_DIR="$WILDFLY_BASE_DIR"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
# Per-system attributes can be defined here. The self' and inputs'
|
# Per-system attributes can be defined here. The self' and inputs'
|
||||||
# module parameters provide easy access to attributes of the same
|
# module parameters provide easy access to attributes of the same
|
||||||
@@ -92,7 +55,7 @@
|
|||||||
packages = with pkgs; let
|
packages = with pkgs; let
|
||||||
fmtNum = strings.fixedWidthNumber 2;
|
fmtNum = strings.fixedWidthNumber 2;
|
||||||
fmtReleaseName = sem: author: chap: "${fmtNum sem} - ${fmtNum chap} - ${author.lastName}, ${author.firstName}.pdf";
|
fmtReleaseName = sem: author: chap: "${fmtNum sem} - ${fmtNum chap} - ${author.lastName}, ${author.firstName}.pdf";
|
||||||
fmtRelease = fmtReleaseName 3 {
|
fmtRelease = fmtReleaseName 4 {
|
||||||
firstName = "Linus";
|
firstName = "Linus";
|
||||||
lastName = "Nagel";
|
lastName = "Nagel";
|
||||||
};
|
};
|
||||||
@@ -125,39 +88,31 @@
|
|||||||
// args;
|
// args;
|
||||||
in {
|
in {
|
||||||
"uebung-1" = mkUebungPdf 1 {};
|
"uebung-1" = mkUebungPdf 1 {};
|
||||||
|
"uebung-2" = mkUebungPdf 2 {};
|
||||||
|
"uebung-3" = mkUebungPdf 3 {};
|
||||||
|
"uebung-4" = mkUebungPdf 4 {};
|
||||||
|
"uebung-5" = mkUebungPdf 5 {};
|
||||||
|
"uebung-6" = mkUebungPdf 6 {};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = with pkgs;
|
devShells.default = with pkgs;
|
||||||
mkShell {
|
mkShell {
|
||||||
buildInputs = [wildfly-fhs pkgs.openjdk21];
|
buildInputs = [wildfly-fhs pkgs.openjdk21 maven];
|
||||||
nativeBuildInputs = [];
|
nativeBuildInputs = [];
|
||||||
packages =
|
packages =
|
||||||
[
|
[
|
||||||
mermaid-cli
|
mermaid-cli
|
||||||
openjdk
|
openjdk
|
||||||
jetty
|
|
||||||
maven
|
maven
|
||||||
|
lombok
|
||||||
]
|
]
|
||||||
++ latexPackages;
|
++ latexPackages;
|
||||||
|
|
||||||
shellHook =
|
shellHook =
|
||||||
# bash
|
# bash
|
||||||
''
|
''
|
||||||
export WILDFLY_BASE_DIR="$HOME/.wildfly-fhs-base"
|
export PATH="bin/:$PATH"
|
||||||
|
export WILDFLY_BASE_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.wildfly-base"
|
||||||
build() {
|
|
||||||
# builds target/demo.war
|
|
||||||
mvn clean package
|
|
||||||
}
|
|
||||||
|
|
||||||
# e.g. 'deploy target/demo.war'
|
|
||||||
deploy() {
|
|
||||||
cp -v "$1" "$WILDFLY_BASE_DIR/deployments/"
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
wildfly-fhs
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Generated
+2
-4033
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"@angular/cli": "^21.0.2",
|
|
||||||
"@angular/core": "^21.0.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,76 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.example</groupId>
|
<groupId>de.componentware</groupId>
|
||||||
<artifactId>demo</artifactId>
|
<artifactId>componentware-parent</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<name>demo</name>
|
<packaging>pom</packaging>
|
||||||
<packaging>war</packaging>
|
<modules>
|
||||||
|
<module>server</module>
|
||||||
|
<module>client</module>
|
||||||
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.report.sourceEncoding>UTF-8</project.report.sourceEncoding>
|
|
||||||
<maven.compiler.release>21</maven.compiler.release>
|
|
||||||
<junit.version>5.11.0-M2</junit.version>
|
|
||||||
<compiler-plugin.version>3.13.0</compiler-plugin.version>
|
|
||||||
<war-plugin.version>3.4.0</war-plugin.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.platform</groupId>
|
|
||||||
<artifactId>jakarta.jakartaee-web-api</artifactId>
|
|
||||||
<version>11.0.0</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.glassfish</groupId>
|
|
||||||
<artifactId>jakarta.faces</artifactId>
|
|
||||||
<version>4.1.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.enterprise</groupId>
|
|
||||||
<artifactId>jakarta.enterprise.cdi-api</artifactId>
|
|
||||||
<version>4.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.enterprise</groupId>
|
|
||||||
<artifactId>jakarta.enterprise.cdi-el-api</artifactId>
|
|
||||||
<version>4.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.weld.servlet</groupId>
|
|
||||||
<artifactId>weld-servlet-core</artifactId>
|
|
||||||
<version>5.1.2.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
|
||||||
<version>${junit.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.18.30</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.primefaces</groupId>
|
|
||||||
<artifactId>primefaces</artifactId>
|
|
||||||
<version>15.0.3</version>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<finalName>demo</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${compiler-plugin.version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>${war-plugin.version}</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Executable
+80
@@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>de.componentware</groupId>
|
||||||
|
<artifactId>componentware-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<artifactId>ejb-server</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.enterprise</groupId>
|
||||||
|
<artifactId>jakarta.enterprise.cdi-api</artifactId>
|
||||||
|
<version>4.1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.platform</groupId>
|
||||||
|
<artifactId>jakarta.jakartaee-api</artifactId>
|
||||||
|
<version>10.0.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.ejb</groupId>
|
||||||
|
<artifactId>jakarta.ejb-api</artifactId>
|
||||||
|
<version>4.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
<version>4.0.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.orm</groupId>
|
||||||
|
<artifactId>hibernate-core</artifactId>
|
||||||
|
<version>7.0.4.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.46</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Source: https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.logging</groupId>
|
||||||
|
<artifactId>jboss-logging</artifactId>
|
||||||
|
<version>3.6.3.Final</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.46</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-ejb-plugin</artifactId>
|
||||||
|
<version>3.2.1</version>
|
||||||
|
<configuration>
|
||||||
|
<ejbVersion>4.0</ejbVersion>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe1;
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class Calculator implements CalculatorRemote {
|
||||||
|
public double addiere(float zahl1, float zahl2) {
|
||||||
|
return zahl1 + zahl2;
|
||||||
|
}
|
||||||
|
public double subtrahiere(float zahl1, float zahl2) {
|
||||||
|
return zahl1 - zahl2;
|
||||||
|
}
|
||||||
|
public double multipliziere(float zahl1, float zahl2) {
|
||||||
|
return zahl1 * zahl2;
|
||||||
|
}
|
||||||
|
public double dividiere(float zahl1, float zahl2) {
|
||||||
|
// todo: division by 0 exception?
|
||||||
|
return zahl1 / zahl2;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe1;
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface CalculatorRemote {
|
||||||
|
double addiere(float zahl1, float zahl2);
|
||||||
|
double subtrahiere(float zahl1, float zahl2);
|
||||||
|
double multipliziere(float zahl1, float zahl2);
|
||||||
|
double dividiere(float zahl1, float zahl2);
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe2;
|
||||||
|
import org.example.demo.praktikum1.aufgabe1.Calculator;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateful;
|
||||||
|
|
||||||
|
@Stateful
|
||||||
|
public class StatefulCalculator implements StatefulCalculatorRemote {
|
||||||
|
private double state;
|
||||||
|
|
||||||
|
public double addiere(float zahl1, float zahl2) {
|
||||||
|
return state = new Calculator().addiere(zahl1, zahl2);
|
||||||
|
}
|
||||||
|
public double subtrahiere(float zahl1, float zahl2) {
|
||||||
|
return state = new Calculator().subtrahiere(zahl1, zahl2);
|
||||||
|
}
|
||||||
|
public double multipliziere(float zahl1, float zahl2) {
|
||||||
|
return state = new Calculator().multipliziere(zahl1, zahl2);
|
||||||
|
}
|
||||||
|
public double dividiere(float zahl1, float zahl2) {
|
||||||
|
return state = new Calculator().dividiere(zahl1, zahl2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double addiere(float zahl) {
|
||||||
|
return state = new Calculator().addiere((float)state, zahl);
|
||||||
|
}
|
||||||
|
public double subtrahiere(float zahl) {
|
||||||
|
return state = new Calculator().subtrahiere((float)state, zahl);
|
||||||
|
}
|
||||||
|
public double multipliziere(float zahl) {
|
||||||
|
return state = new Calculator().multipliziere((float)state, zahl);
|
||||||
|
}
|
||||||
|
public double dividiere(float zahl) {
|
||||||
|
return state = new Calculator().dividiere((float)state, zahl);
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe2;
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface StatefulCalculatorRemote {
|
||||||
|
double addiere(float zahl1, float zahl2);
|
||||||
|
double subtrahiere(float zahl1, float zahl2);
|
||||||
|
double multipliziere(float zahl1, float zahl2);
|
||||||
|
double dividiere(float zahl1, float zahl2);
|
||||||
|
|
||||||
|
double addiere(float zahl);
|
||||||
|
double subtrahiere(float zahl);
|
||||||
|
double multipliziere(float zahl);
|
||||||
|
double dividiere(float zahl);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe3;
|
||||||
|
|
||||||
|
public enum GuessResult {
|
||||||
|
TooSmall,
|
||||||
|
TooBig,
|
||||||
|
Success,
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe3;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateful;
|
||||||
|
|
||||||
|
@Stateful
|
||||||
|
public class GuessingGame implements GuessingGameRemote {
|
||||||
|
private int num;
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
var rng = new Random();
|
||||||
|
num = 1 + rng.nextInt(0, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuessResult testGuess(int guess) {
|
||||||
|
if (guess < num) {
|
||||||
|
return GuessResult.TooSmall;
|
||||||
|
}
|
||||||
|
if (guess > num) {
|
||||||
|
return GuessResult.TooBig;
|
||||||
|
}
|
||||||
|
return GuessResult.Success;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.example.demo.praktikum1.aufgabe3;
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface GuessingGameRemote {
|
||||||
|
// start ein spiel, generiere ein zufallszahl.
|
||||||
|
void init();
|
||||||
|
|
||||||
|
// test whether the guess is correct.
|
||||||
|
GuessResult testGuess(int guess);
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@ToString
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class Adresse implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String strasse;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String plz;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String ort;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
private Person person;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.persistence.EntityManager;
|
||||||
|
import jakarta.persistence.PersistenceContext;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class AdresseService implements AdresseServiceRemote {
|
||||||
|
|
||||||
|
@PersistenceContext
|
||||||
|
private EntityManager em;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int speichereAdresse(Adresse m) {
|
||||||
|
em.persist(m);
|
||||||
|
return m.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface AdresseServiceRemote {
|
||||||
|
int speichereAdresse(Adresse m);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@ToString
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class Firma implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Singular("adresse")
|
||||||
|
@OneToMany(mappedBy="firma")
|
||||||
|
private List<Person> person;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.persistence.EntityManager;
|
||||||
|
import jakarta.persistence.PersistenceContext;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class FirmaService implements FirmaServiceRemote {
|
||||||
|
|
||||||
|
@PersistenceContext
|
||||||
|
private EntityManager em;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int speichereFirma(Firma m) {
|
||||||
|
em.persist(m);
|
||||||
|
return m.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface FirmaServiceRemote {
|
||||||
|
int speichereFirma(Firma m);
|
||||||
|
// List<Firma> listFirmen();
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@ToString
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class Person implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
private Firma firma;
|
||||||
|
|
||||||
|
@Singular("adresse")
|
||||||
|
@OneToMany(mappedBy="person")
|
||||||
|
private List<Adresse> adresse;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.persistence.EntityManager;
|
||||||
|
import jakarta.persistence.PersistenceContext;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class PersonService implements PersonServiceRemote {
|
||||||
|
|
||||||
|
@PersistenceContext
|
||||||
|
private EntityManager em;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int speicherePerson(Person m) {
|
||||||
|
em.persist(m);
|
||||||
|
return m.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.example.demo.praktikum2;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface PersonServiceRemote {
|
||||||
|
int speicherePerson(Person m);
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.example.webservice;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.ApplicationPath;
|
||||||
|
import jakarta.ws.rs.core.Application;
|
||||||
|
|
||||||
|
@ApplicationPath("/")
|
||||||
|
public class ApplicationConfig extends Application {
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
@Path("/time")
|
||||||
|
public class TimeService {
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String getTime() {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss");
|
||||||
|
return "Aktuelle Serverzeit: " + now.format(formatter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package org.example.demo.uebung2.aufgabe21;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
public class Mitarbeiter implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int personalnummer;
|
||||||
|
|
||||||
|
public Mitarbeiter() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mitarbeiter(String name, int personalnummer) {
|
||||||
|
this.name = name;
|
||||||
|
this.personalnummer = personalnummer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPersonalnummer() {
|
||||||
|
return personalnummer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersonalnummer(int personalnummer) {
|
||||||
|
this.personalnummer = personalnummer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Mitarbeiter{" +
|
||||||
|
"id=" + id +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", personalnummer=" + personalnummer +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package org.example.demo.uebung2.aufgabe22;
|
||||||
|
|
||||||
|
import org.example.demo.uebung2.aufgabe21.Mitarbeiter;
|
||||||
|
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.persistence.EntityManager;
|
||||||
|
import jakarta.persistence.PersistenceContext;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class MitarbeiterService implements MitarbeiterServiceRemote {
|
||||||
|
|
||||||
|
@PersistenceContext
|
||||||
|
private EntityManager em;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int speichereMitarbeiter(Mitarbeiter m) {
|
||||||
|
em.persist(m);
|
||||||
|
return m.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package org.example.demo.uebung2.aufgabe22;
|
||||||
|
|
||||||
|
import org.example.demo.uebung2.aufgabe21.Mitarbeiter;
|
||||||
|
|
||||||
|
import jakarta.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
|
public interface MitarbeiterServiceRemote {
|
||||||
|
int speichereMitarbeiter(Mitarbeiter m);
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package org.example.demo.uebung3.aufgabe13;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.mail.MessagingException;
|
||||||
|
import jakarta.mail.Session;
|
||||||
|
import jakarta.mail.Transport;
|
||||||
|
import jakarta.mail.internet.InternetAddress;
|
||||||
|
import jakarta.mail.internet.MimeMessage;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class Mailsender implements MailsenderLocal {
|
||||||
|
|
||||||
|
private static final Logger LOG = Logger.getLogger(Mailsender.class.getName());
|
||||||
|
|
||||||
|
@Resource(mappedName="java:/jboss/mail/uebung3")
|
||||||
|
private Session mailSession;
|
||||||
|
|
||||||
|
public Mailsender() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendMail(String recipient, String subject, String text) {
|
||||||
|
try {
|
||||||
|
jakarta.mail.Message message = new MimeMessage(mailSession);
|
||||||
|
message.setSentDate(new Date());
|
||||||
|
message.addRecipient(jakarta.mail.Message.RecipientType.TO, new InternetAddress(recipient));
|
||||||
|
message.setSubject(subject);
|
||||||
|
message.setText(text);
|
||||||
|
Transport.send(message);
|
||||||
|
}
|
||||||
|
catch (MessagingException e) {
|
||||||
|
LOG.log(Level.SEVERE, "Fehler beim Senden der E-Mail an " + recipient, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.example.demo.uebung3.aufgabe13;
|
||||||
|
|
||||||
|
import jakarta.ejb.Local;
|
||||||
|
|
||||||
|
@Local
|
||||||
|
public interface MailsenderLocal {
|
||||||
|
void sendMail(String to, String subject, String text);
|
||||||
|
}
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package org.example.demo.uebung3.aufgabe13;
|
||||||
|
|
||||||
|
import jakarta.ejb.ActivationConfigProperty;
|
||||||
|
import jakarta.ejb.EJB;
|
||||||
|
import jakarta.ejb.MessageDriven;
|
||||||
|
import jakarta.jms.JMSException;
|
||||||
|
import jakarta.jms.Message;
|
||||||
|
import jakarta.jms.MessageListener;
|
||||||
|
import jakarta.jms.TextMessage;
|
||||||
|
|
||||||
|
@MessageDriven(
|
||||||
|
activationConfig = {
|
||||||
|
@ActivationConfigProperty(
|
||||||
|
propertyName = "destinationType",
|
||||||
|
propertyValue = "jakarta.jms.Queue"
|
||||||
|
),
|
||||||
|
@ActivationConfigProperty(
|
||||||
|
propertyName = "destination",
|
||||||
|
propertyValue = "java:/jms/queue/MyQueue"
|
||||||
|
),
|
||||||
|
@ActivationConfigProperty(
|
||||||
|
propertyName = "acknowledgeMode",
|
||||||
|
propertyValue = "Auto-acknowledge"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public class ReceiveQueueMessageAndSendAsMail implements MessageListener {
|
||||||
|
|
||||||
|
@EJB
|
||||||
|
private MailsenderLocal mail;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMessage(Message message) {
|
||||||
|
try {
|
||||||
|
if (message instanceof TextMessage) {
|
||||||
|
String text = ((TextMessage) message).getText();
|
||||||
|
System.out.printf("=== Empfangene Nachricht: %s ===", text);
|
||||||
|
|
||||||
|
// Konfiguration für E-Mail
|
||||||
|
String empfaenger = "linus.nagel@itc-studenten.de";
|
||||||
|
String betreff = "JMS-Nachricht empfangen";
|
||||||
|
mail.sendMail(empfaenger, betreff, text);
|
||||||
|
|
||||||
|
System.out.printf("E-Mail an %s versendet: %s", empfaenger, text);
|
||||||
|
} else {
|
||||||
|
System.out.printf("Unerwarteter Nachrichtentyp: %s", message.getClass().getName());
|
||||||
|
}
|
||||||
|
} catch (JMSException e) {
|
||||||
|
System.out.println("Fehler beim Verarbeiten der Nachricht " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.example.webservice;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.ApplicationPath;
|
||||||
|
import jakarta.ws.rs.core.Application;
|
||||||
|
|
||||||
|
@ApplicationPath("/")
|
||||||
|
public class ApplicationConfig extends Application {
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
@Path("/time")
|
||||||
|
public class TimeService {
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String getTime() {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss");
|
||||||
|
return "Aktuelle Serverzeit: " + now.format(formatter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.example.demo.uebung5.aufgabe21;
|
||||||
|
|
||||||
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
|
import jakarta.enterprise.inject.Produces;
|
||||||
|
import jakarta.enterprise.inject.spi.InjectionPoint;
|
||||||
|
import jakarta.inject.Singleton;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
|
@ApplicationScoped
|
||||||
|
public class LoggerProducer {
|
||||||
|
|
||||||
|
@Produces
|
||||||
|
public Logger produceLogger(InjectionPoint ip) {
|
||||||
|
// Ermittelt die Klasse, in die der Logger injiziert wird
|
||||||
|
Class<?> targetClass = ip.getMember().getDeclaringClass();
|
||||||
|
return Logger.getLogger(targetClass);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package org.example.demo.uebung5.aufgabe21;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import jakarta.ejb.Stateless;
|
||||||
|
import jakarta.inject.Inject;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class TestLoggerService {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Logger logger;
|
||||||
|
|
||||||
|
public void logBeispiel() {
|
||||||
|
logger.info("CDI-Logger funktioniert! Diese Nachricht kommt vom injizierten Logger.");
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_1.xsd" bean-discovery-mode="annotated">
|
||||||
|
|
||||||
|
</beans>
|
||||||
|
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd" version="3.2">
|
||||||
|
<persistence-unit name="default">
|
||||||
|
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
||||||
|
<properties>
|
||||||
|
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create"/>
|
||||||
|
</properties>
|
||||||
|
</persistence-unit>
|
||||||
|
</persistence>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd" version="4.0" bean-discovery-mode="annotated">
|
||||||
|
</beans>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user