Access.log to std.out in JBoss EAP 6 - jboss

I am trying to write the output of the access.log to standard out in EAP 6.4. I've seen an article to do this in EAP 7 where the web subsystem is replaced by Undertow. Is there a way to modify the syntax under the subsystem in the standalone.xml so that this can be redirected to standard.out?

This is not possible out of the box. You're right, in EAP 7 / Wildfly it is possible.
But with little development environment, it should also be possible with EAP 6.x. All you need to do is to either extend the class org.apache.catalina.valves.AccessLogValve in the deployed application, modify its behavior to log to a JUL logger and define it as a valve in jboss-web.xml or you can create a JBoss module out of it and add this behavior from outside the app using the module in standalone.xml.

Related

WildFly: missing org.jboss.security-module in version 26.0.0

I am trying to get singe sign-on to work with WildFly-prevew 26.0.1. I found a tutorial WildFly Elytron - Add Kerberos Authentication To Existing Web Application by Darran Lofthouse.
After it did not work I searched for further resources and found How to Set Up SSO for JBoss EAP with Kerberos. There is a JBoss Negotiation Toolkit mentioned. It is said that yout should use the same version of the toolkit as the JBoss Negotiation included in JBoss EAP (EAP_HOME/modules/system/layers/base/org/jboss/security/negotiation/main/module.xml).
Sadly I did not find the folder EAP_HOME/modules/system/layers/base/org/jboss/security/negotiation in the Wildfly 26.0.1-preview. At first I thought that it may be an JBoss EAP feature not included in WildFly. But actually the folder is included in WildFly 24.0.1. Starting with version 25.0.0, the folder is missing. And starting with version 26.0.0.Beta, the whole EAP_HOME/modules/system/layers/base/org/jboss/security folder is missing.
So my question is weather this is a bug or a feature (maybe it migrated to another module). And if it is a bug, may it be a reason my single sign-on is not working?
In a WildFly 25 release post (https://www.wildfly.org/news/2021/10/05/WildFly25-Final-Released/) it is said that
We deprecated the use of legacy security long ago and in the WildFly 25 release we have removed support for it.
Most probably that is the reason these packages are missing.

Confused by wildfly versions used in EAP 7.2

I would have added this to another thread, but I am unable to comment on other's posts. And what I read did not answer my question. I just installed EAP 7.2.0.GA. In the console log, it says:
JBoss EAP 7.2.0.GA (WildFly Core 6.0.11.Final-redhat-00001)
However, others think it is around version 13. And when I look at the releases of wildfly ( http://wildfly.org/downloads/ ) a version 6 is so old it does not even show up and would have been prior to 2014...
So, how can it be 6.0.11.Final?
WildFly core is just a component in WildFly application server.
As such is also used in JBoss EAP which is a downstream product based on WildFly AS.
WildFly core is standalone project which provides most of core capabilities (management, cli, administration, subsystem infrastructure...) of the application server without any Java EE support, that is added to it by WildFly project.
you can see the sources for both at
https://github.com/wildfly/wildfly-core/
https://github.com/wildfly/wildfly/
as for your confusion.
WildFly core 6.0.x is used in EAP 7.1 as well as in WildFly 14
which you an see also in the sources https://github.com/wildfly/wildfly/blob/14.0.0.Final/pom.xml#L375
micro version is not always exactly the same, as in the process of building downstream product of EAP, extra patches can be added.
WildFly Core is a component in JBoss Enterprise Application Platform 7 (EAP 7). So, this log means:
JBoss EAP 7.2 - JBoss EAP in version 7.2
GA - General availability
WildFly Core 6.0.11.Final - component WildFly Core in version 6.0.11.Final.
See also:
JBoss Enterprise Application Platform Component Details
Software release life cycle

migrate from JBOSS AS6 to wild fly

I know its a very high level question, but it will be very much help full if somebody can help me to kick start the migration.
So please provide some links or use full hints to start with it.
Also if somebody knows about delta changes between JBOSS AS 6 to Wild fly.
Major change which i know that our application uses-
JBOSS AOP
JBOSS Interceptors
and binds it in jboss-aop.xml
like below
<bind pointcut="execution(public * *.DBDAO >updateBO(com.test.model.TestClass, com.test.model.TestClass2))">
<interceptor-ref name="TestInterceptor"/>
</bind>
which is not supported by wild fly now.
And so there must be other thing s which might not be supported by wild fly.
Thanks.
According documentation:
Replace JBoss AOP Interceptors
JBoss AOP (Aspect Oriented Programming) is no longer included in JBoss AS 7. In previous releases, JBoss AOP was used by the EJB container. However, in AS 7, the EJB container uses a new mechanism. If your application uses JBoss AOP, you need modify your application code as follows.
Standard EJB3 configurations that were made in the ejb3-interceptors-aop.xml file are now done in the server configuration file. For a standalone server, this is the standalone/configuration/standalone.xml file. If you are running your server in a managed domain, this is the domain/configuration/domain.xml file.
Applications that integrate AOP interceptors into the EJB layer must be redesigned to use EJB3 interceptors and CDI. Server side interceptors can be changed to EJB3 interceptors, but there is no client side interceptor in AS 7.
Like AOP exist other changes you can see in: How do I migrate my application from AS5 or AS6 to WildFly and Experiences with migrating from JBoss AS 7 to WildFly 8.1
The last link refers to some changes that are not in the official documentation.
Here is whole migration guide from Red Hat. JBoss EAP 6.2 has similar architecture to WildFly so you can use it:
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.2/html-single/Migration_Guide/index.html

Enable twiddle on jboss 7.1.1

I am using windows 7 and i want to enable twiddle on jboss 7.1.1. Which are the steps to do that?
Thanks.
Twiddle was a tool/script included in previous versions of JBoss, up to community version 6, to access to the JMX Services of JBoss (MBeans) through command line. Since JBoss 7 is not based any more on Managed Beans, it doesn't include this tool nor the JMX Console. That said, the management operations exposed through Managed Beans in JBoss 7 can be, of course, accessed with the JConsole tool, included with the JDK.
So don't expect there will be an official twiddle command for JBoss 7, though some independent developers have created their own versions.
You have to navigate to the platform-mbean and read the memory-attributes:
/core-service=platform-mbean/type=memory:read-attribute(name=heap-memory-usage)
You can find the full resource description by using that expression:
/core-service=platform-mbean/type=memory:read-resource-description

How to jun a jar file in Application Client Container in Jboss 7?

I need to run my jar file which contains some session beans. In EJB 3 book I saw we can run a main class using glassfish as follows.
appclient -client example-client.jar
How can I do this is JBoss 7 ?
It's very similar in JBoss AS 7. Should be something like appclient.sh example-client.jar. The appclient documentation doesn't look real complete, but there is some information specific to JBoss AS 7.