What is Jboss standalone.xml? what is the purpose of it? - jboss

I know to run the JBoss we need the standalone.xml, but I do not understand the content in the standalone.xml file.
Can someone explain to me what is defined in it with an example?
Thanks

If you look in the $JBOSS_HOME/docs/schema there are several schemas that make up the standalone.xml file.
standalone.xml file contains all the information regarding modules used by the JBOSS or wildfly. If you want to know about each and every module then read this http://wildscribe.github.io/WildFly/15.0/index.html.
In addditon to this, if you want to learn about the attributes of the sub-systems then access https://developer.jboss.org/wiki/JBossDTDs

Related

In Wildfly, what is the /subsystem?

I have been reviewing documentation for Wildfly with the intention of adding LDAP security for a Drools Workbench application, more on that much later, and a notation that I see in many places is something like ...
/subsystem=elytron/security-domain=jdbcdomain:add(default-realm=jdbcRealm,realms=[{realm="jdbcRealm"}])
What is this?
Is this a command to be entered at the command line in Linux or Windows?
Maybe an entry in a config file?
Perhaps something entered after starting the jboss-cli?
Many thanks in advance for your help.
That's a WildFly configuration operation on jboss-cli.

What is the use of org.apache.struts.chain.ComposableRequestProcessor in struts and java.nio.charset.IllegalCharsetNameException

We ran into a migration issue where in we are migrating an application from JBoss 4.2.1.GA to JBoss EAP 7.0.0.GA. The exception encountered is as below.
java.lang.RuntimeException: java.nio.charset.IllegalCharsetNameException:
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:226)
So we have a fix for the same which involves
Adding the below in the struts config.xml file.
this line in config
<controller processorClass="org.apache.struts.chain.ComposableRequestProcessor"
locale="true" nocache="false" contentType="text/html; charset= UTF8">
<set-property property="maxFileSize" value="7M"/>
</controller>
has been changes to
tag from charset= UTF8 to charset= ISO-8859-1"
and an additional property
This has resolved the issue but wants to know what is the proper use of class ComposableRequestProcessor. And why it is helping our solution here.
We don't see a proper document or blog on the net explaining why and when we need to add this configration. What is the advantage of doing so?
Also, we want to know JBoss 4.2.1.GA the page-context encoding was not enforced but in JBoss EAP 7.0.0.GA we need to define it as ISO else it won't work in windows server environment.
We know it has to do with some Undertow implementation over the earlier Apache Tomcat HTTPs implementation framework used by JBoss.
Any help by pointing to right document or information is widely appreciated.

Jboss load system properties from file

Can I make jboss load system properties from a file without writing any explicit code for it?
Yes you can.
In JbossAS versions prior to 7.x there is PropertiesService. It's dead simple to use. I am using it with JBoss 5.1.0.GA, and it works like a charm.
Unfortunatelly PropertiesService mbean is absent in JBossAS 7.x, but there are other ways as described in official admin guide.
Here is another solution. Post author claims it's possible to list your properties files in command line while starting server instance:
./standalone.sh --properties=1.properties --properties=2.properties
and their contents should be added to System Properties.

Getting error Named query not found: UnescalatedDeadlines

I'm trying to create a jbpm human task web application and deployed it in jboss as 7.
Adhering to the deployment structure i have placed the orm.xml in resources META-INF folder along with persistent.xml and it's having the required unescalateddealines named query. But still im getting the exception
Caused by: java.lang.IllegalArgumentException: Named query not found: UnescalatedDeadlines
at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:108) [hibernate-entitymanager-3.4.0.GA.jar:]
at org.jbpm.task.service.TaskService.<init>(TaskService.java:109) [jbpm-human-task-5.1.0.Final.jar:]
at org.jbpm.task.service.TaskService.<init>(TaskService.java:92) [jbpm-human-task-5.1.0.Final.jar:]
at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:52) [classes:]
In nutshell, the orm.xml file is not being identified by hibernate.
what's the configuration that im missing or what could be the problem.
kindly help me in this regard.
It's probably best to add direct references to the orm files you're using, to make sure they are being picked up. For example, in your persistence.xml you could add the following:
<mapping-file>META-INF/Taskorm.xml</mapping-file>
Do you have multiple orm.xml files inside your application? Probably JBoss AS is just picking one. Usually if you merge those files it will work.
Cheers
I had the same problem, but I solved it.
My jbpm version is 5.3.
I deployed and set it up according to the guide.
I used two persistent-unit, one for jbpm/process and one for task.
I have this taskorm.xml, but in some situation jbpm will only search jbpm persistent-unit.
but taskorm.xml is defined in task unit.
You need to combine it into one.
For me I am using jbpm 5.4.0.FINAL but referred to the example with bundled presistence.xml having only orm.xml
Added Taskorm.xml resovled the problem

Declaring a JNDI variable in JBoss 4.0.5

I want to declare a new JNDI variable in the JBoss 4.0.5 server. Can someone please explain how this can be done?
waiting for your replies.
Thanks.
Found these two links that can help...
create a file called filename-service.xml under $CATALINA_BASE$/deploy directory with contents as indicated in these links
http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/Server_Configuration_Guide/Additional_Naming_MBeans-JNDI_Binding_Manager.html
check a jboss jira, JBPAPP-2809 for correction in xmlns:jndi
Have a look here and specifically here. You need to add an entry in the ejb-jar.xml file of your application.
I am facing this probelm too today. Looks like to add a simple jndi entry on the app server, in JBoss one will have to create a new file $CATALINA_BASE/conf/context.xml and invoke a MBean to add the variable and its value.
In server like websphere you can pass new values in jndi.properties, which jboss 5.0.0 upwards does not like.
Very Bad that there is absolutely NO DOCUMENTATION in jboss/docs that indicate anything on this topic.