我在网上做了一些现代容器少Java堆栈的分析,我发现的两个主要有希望的事情是:
是的,两者都有自己的功能,但我无法找到两者的良好比较,因为这两件事情在我看来比较好,但我还是要决定实施的好处,
谢谢你的想法
查希尔
我在WildFly 9.0.2服务器上运行Web应用程序,该服务器具有自定义登录领域(需要以递归方式查询为组织单位B查询的组织单位B的多个组织单位A,该组织单位为独立配置).像这样的xml:
<security-realm name="LoginRealm">
<authentication>
<ldap connection="EC2" base-dn="ou=users,dc=test,dc=de">
<username-filter attribute="uid"/>
</ldap>
</authentication>
</security-realm>
...
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="de.test.LoginModule" flag="required">
<module-option name="principalDNPrefix" value="uid="/>
<module-option name="principalDNSuffix" value=",ou=users,dc=test,dc=de"/>
<module-option name="rolesCtxDN" value="ou=groups,dc=test,dc=de"/>
<module-option name="roleAttributeID" value="cn"/>
<module-option name="roleAttributeIsDN" value="false"/>
...
Run Code Online (Sandbox Code Playgroud)
用户通过提供他的用户名(例如testA),密码(例如,无论如何)并从下拉菜单(例如UserGroupA)中选择UserGroup来登录网站.然后,扩展LdapLoginModule的自定义登录模块(de.test.LoginModule.class)通过从独立xml中获取前缀并在之后添加后缀来构建主体字符串来执行角色查找,
例如前缀:uid=
Build by LoginModule:testA,ou=UserGroupA
后缀:,ou=users,dc=test,dc=de
导致:uid=testA,ou=UserGroupA,ou=users,dc=test,dc=de
现在完美无缺.从角色ou=groups,dc=test,dc=de中检索在web.xml定义与根据角色和安全性约束被执行.
<security-constraint>
<display-name>Test-Service</display-name>
<web-resource-collection>
<web-resource-name>Test</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>Only Project Processors may see this</description>
<role-name>Project Processor</role-name>
</auth-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)
现在,组织单元"ProjectControlCenter"已添加到LDAP树结构中,如下所示:
dc=test,dc=de
|-- ou=applications
| |-- ou=ProjectControlCenter
| | |-- …Run Code Online (Sandbox Code Playgroud) 昨天我们的Web应用程序在WildFly 9上正常运行.从今天早上开始,我在Web浏览器中只获得了"Forbidden".我们不使用JAAS.也没有区别,如果我下面的值设置为false在standalone.xml:
...
<subsystem xmlns="urn:jboss:domain:ejb3:3.0">
...
<default-missing-method-permissions-deny-access value="true"/>
...
</subsystem>
...
Run Code Online (Sandbox Code Playgroud)
WildFly只显示"禁止"页面的原因是什么?
编辑
如果我将包的日志级别设置org.jboss.security为TRACE我在调用页面时在日志文件中收到以下消息:
2016-01-27 12:58:15,354 TRACE [org.jboss.security] (default task-5) PBOX00354: Setting security roles ThreadLocal: null
Run Code Online (Sandbox Code Playgroud)
不知道这意味着什么......
我试图在节点node1和node2的集群的每个节点上调用远程ejb,但我总是得到node1.在两个节点中将EJB和客户端代码部署为EAR文件.应用程序在Wildfly 9 ApplicationServer上运行.从node1调用客户端代码.
EJB代码:
@Remote
public interface SLSBRemote {
public void test();
}
@Stateless(mappedName="SLSBEJB")
public class SLSBEJB implements SLSBRemote {
@Override
public void test()
{
try {
String nodeName = System.getProperty("jboss.node.name");
if(nodeName == null) {
nodeName = InetAddress.getLocalHost().getHostName();
}
log.debug("nodename: "+nodeName);
} catch (Exception e) {
log.error("Error",e);
}
}
}
Run Code Online (Sandbox Code Playgroud)
客户代码:
public class testEjb
{
//invoking this method from other class. Able to pass node address
public void testBean(List<String> nodes)
{
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
Context …Run Code Online (Sandbox Code Playgroud) 我 javax.mail用来调用邮件服务器并将文件作为邮件附件发送,编码文件名,如下所示:MimeUtility.encodeText(filename,"UTF-8",null)
虽然这已经正常工作WildFly 8,但它WildFly 9.x使用相同的 邮件服务器失败.我的意思是以这种格式收到附件说明:=UTF-8BzrTOv866zrnOvM63IM68zrUgzrXOu867zrfOvc65zrrOsS5wZGY==
我一直在努力:
1)在应用程序服务器上找到相对设置 - 没有运气.
2)编码ISO-8859-7只能偶尔使用,因为它似乎取决于文件名长度和某些字符的存在.
3)在客户端(微软展望)上找到一个相对设置,我想错过了一些信息才能成功解码.
有任何想法吗?
提前致谢!!
在设置集群期间,我遇到了WildFly/Infinispan的问题,试图序列化一些可以在每个实例上重新创建的类 - 尽管无论出于什么原因它们似乎决定在集群中分发.
最初我认为@Stateless注释会产生我想要的效果,虽然它会因为没有正确的构造函数而引发问题,所以我不相信这是我们正在寻找的.
在每个类的基础上禁用此方法或覆盖序列化方法的正确方法是什么?
我正在尝试使用扩展BaseAuthenticator的@PicketLinked类.
我的设置是一个关于野生动物9.0.2.Final的耳朵项目.
我在我的jboss-deployment-structure.xml中使用它
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<!-- This will enable PicketLink Authentication/Authorization and IDM dependencies to your deployment. -->
<module name="org.picketlink.core.api" meta-inf="import" annotations="true"/>
<module name="org.picketlink.core" meta-inf="import" annotations="true"/>
<module name="org.picketlink.idm.api" meta-inf="import" annotations="true"/>
<module name="org.picketlink.idm" meta-inf="import" annotations="true"/>
<module name="org.picketlink.common" meta-inf="import" annotations="true"/>
<module name="org.picketlink.idm.schema" meta-inf="import" annotations="true"/>
</dependencies>
</deployment>
<sub-deployment name="prestiz-web.war">
<dependencies>
<!-- This will enable PicketLink Authentication/Authorization and IDM dependencies to your deployment. -->
<module name="org.picketlink.core.api" meta-inf="import" annotations="true"/>
<module name="org.picketlink.core" meta-inf="import" annotations="true"/>
<module name="org.picketlink.idm.api" meta-inf="import" annotations="true"/>
<module name="org.picketlink.idm" meta-inf="import" annotations="true"/> …Run Code Online (Sandbox Code Playgroud) 我正在遇到地图中带有空值的杰克逊序列化问题.显然,这是Wildfly 9使用的Jackson版本中的已知错误(https://issues.jboss.org/browse/WFLY-4906).我想使用当前版本的杰克逊; 但是,我在排除Wildfly使用的版本时遇到了麻烦.我尝试排除模块,jboss-deployment-structure.xml但排除不起作用.
知道我怎么能让这个工作吗?
我正在将我的应用程序从JBoss 7迁移到WildFly(v9.0.1),并且由于bean事务管理错误而未部署它.
Caused by: javax.naming.NamingException: WFLYNAM0062: Failed to lookup env/com.component.eventmgt.EventServiceImpl/transaction [Root exception is java.lang.RuntimeException: WFLYNAM0059: Resource lookup for injection failed: java:jboss/UserTransaction]
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:157)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)
at org.jboss.as.naming.deployment.ContextNames$BindInfo$1$1.getReference(ContextNames.java:316)
... 90 more
Caused by: java.lang.RuntimeException: WFLYNAM0059: Resource lookup for injection failed: java:jboss/UserTransaction
at org.jboss.as.naming.deployment.ContextNames$BindInfo$1$1.getReference(ContextNames.java:319)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:143)
... 95 more
Caused by: javax.naming.NameNotFoundException: UserTransaction [Root exception is java.lang.IllegalStateException: WFLYEJB0137: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:153)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83) …Run Code Online (Sandbox Code Playgroud) 当我使用wildfly 9.0.0.Final在eclipse中运行我的应用程序时遇到错误,但是使用wildfly 8.0.0.Final它工作正常,它是相同的代码和配置.
我正在使用hibernate.
我复制我的服务器日志
11:16:01,536 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 64) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./ws: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ws: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cFilter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.service.ResidentService com.security.CustomFilter.residentService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'residentService' defined in "/C:/Program Files/WildFly/wildfly-9.0.0.Final/standalone/deployments/ws.war/WEB-INF/classes/com/service/ResidentServiceImpl.class": Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.service.ResidentServiceImpl]; nested exception is java.beans.IntrospectionException: type …Run Code Online (Sandbox Code Playgroud) wildfly-9 ×10
java ×8
wildfly ×4
annotations ×1
deployment ×1
ejb-3.0 ×1
ejb-3.1 ×1
encoding ×1
hibernate ×1
infinispan ×1
jackson ×1
java-ee ×1
java-ee-6 ×1
jboss ×1
jboss7.x ×1
ldap ×1
ldap-query ×1
picketlink ×1
spring-boot ×1
spring-mvc ×1
transactions ×1
utf-8 ×1