Deploy ear with war on jboss eap 6.1 - deployment

I'm trying deploy an ear into JBoss eap 6.1. The structure of the ear is the following:
myEar.ear
|
|__
| lib
| |
| |__
| ALL LIBRARIES
|__
| META-INF
| |
| |__
| | maven
| | |
| | |__
| | com.test.testEar
| | |
| | |__
| | testEar
| | |
| | |__
| | pom.properties
| | pom.xml
| |
| |__
| application.xml
|
|__
myWar1.war
myWar2.war
ALL EJBS
This ear deploys on Glassfish 2.1 and I don't know why it doesn't deploy on JBoss EAP 6.1.
How to deploy this ear on JBoss6.1?

Related

Can I use variables in the PowerShell Replace method?

My goal is to run a PowerShell command that will update the text in a markdown table.
My project structure looks like:
/root  
dashboardTable.md  
replace.ps1
dashboardTable.md:
App Name | Build Version | QA Version | Prod Version
------ | ------ | ------ | ------ |
ProjectName |0.0.0 | 0.0.0 | 0.0.0
replace.ps1
(Get-Content ./dashboardTable.md).replace('0.0.0', '0.0.1') | Set-Content './dashboardTable.md'
Running this command works and will change the markdown file to:
App Name | Build Version | QA Version | Prod Version
------ | ------ | ------ | ------ |
ProjectName |0.0.1 | 0.0.1 | 0.0.1
I am trying to set a variable that can be used in place of the hardcoded values in the replace method, for example:
$MyVariable = '0.0.0'
(Get-Content ./dashboardTable.md).replace($MyVariable, '0.0.1') | Set-Content './dashboardTable.md'
But this changes my markdown file to:
App Name | Build Version | QA Version | Prod Version
------ | ------ | ------ | ------ |
0.0.1 |0.0.0 | 0.0.0 | 0.0.0
I even tried to switch the replace values around and run the PowerShell command like:
$MyVariable = '0.0.1'
(Get-Content ./dashboardTable.md).replace('0.0.0', $MyVariable) | Set-Content './dashboardTable.md'
And it changes the markdown to:
App Name | Build Version | QA Version | Prod Version
------ | ------ | ------ | ------ |
ProjectName |ProjectName | ProjectName | ProjectName
Is it possible to use a variable like this?
I'm not sure why I was getting the results I was getting however, I do know there was an issue when I was calling the PowerShell script.
To fix the issue, when I want to run the script, I run this command in the PowerShell Integrated Terminal:
powershell -executionpolicy bypass ".\replace.ps1" and was able to get the expected results.

Powershell scripts to get the FIPS algorithm status

I am looking for the powershell scripts/commands to get the details of below points
| Key | OutPut |
| ------------------------------ | ---------------- |
| Seurity [FIPS Alogithm Policy] | Enabled/Disabled |
| Is Client SSL 2.0 Enabled? | Enabled/Disabled |
| Is Server SSL 2.0 Enabled? | Enabled/Disabled |
| Is Client SSL 3.0 Enabled? | Enabled/Disabled |
| Is Server SSL 3.0 Enabled? | Enabled/Disabled |
| Is Client TLS 1.1 Enabled? | Enabled/Disabled |
| Is Server TLS 1.1 Enabled? | Enabled/Disabled |
| Is Client TLS 1.2 Enabled? | Enabled/Disabled |
| Is Server TLS 1.2 Enabled? | Enabled/Disabled |
I have tried the below code but getting different different errors.
$Socket = New-Object System.Net.Sockets.Socket([System.Net.Sockets.SocketType]::Stream, [System.Net.Sockets.ProtocolType]::Tcp)
$Socket.Connect($ComputerName, $Port)
$NetStream = New-Object System.Net.Sockets.NetworkStream($Socket, $true)
$SslStream = New-Object System.Net.Security.SslStream($NetStream, $true)
$SslStream.AuthenticateAsClient($ComputerName, $null, $ProtocolName, $false)
I have Sql Server 2014 installed with the latest updates.
I am looking for the Correct Powershell scripts to get the details for the FIPS Algorithm status and the status of protocol (SSL and TLS) for client/server.
I tried the above code but its not working.

What is the conventional structure of a modular Java 9 (Eclipse) project?

As an example, say I have a program named Abc containing one class named Xyz. The code is located in a Git repository containing a single Eclipse project. I've adopted the Maven source directory layout. Before Java 9 the project structure might have looked like this (simplified):
Abc.git
|
+---.git
|
+---Abc
|
+---.settings
|
+---.project
|
+---.classpath
|
+---src
|
+---main
| |
| +---java (source folder)
| |
| +---com
| |
| +---abc
| |
| +---Xyz.java
+---test
|
+---java (source folder)
|
+---com
|
+---abc
|
+---XyzTest.java
The JUnit tests were typically in the same packages as the production code, but in a different source folder. But now the production code is in a module. A package being tested can't be split into separate modules. Furthermore, some classes under test may reside in packages not exported by their module.
What is the correct practice in terms of code organization to address these issues?
This question is not about Maven. What I meant was: Is this the recommended way to do it?
Abc.git
|
+---.git
|
+---Abc
|
+---.settings
|
+---.project
|
+---.classpath
|
+---src
|
+---main
| |
| +---java
| |
| +---com.abc (source folder?)
| |
| +---module-info.java (exports com.abc)
| |
| +---com
| |
| +---abc
| |
| +---Xyz.java
+---test
|
+---java
|
What goes here?

Access a mesos-master behind a domain name (not an IP)

Is it possible to run and access a mesos master on a machine that is placed behind a proxy?
I have successfully succeeded to deployed a MesosMaster/Marathon/MesosSalve on my local infrastructure.
The problem arises when I want to put the MesosSlave somewhere in the internet, so that MesosSlave and MesosMaster shall communicate through public IPs
My conf is the following:
Internet My Infra
.----------------------. .-----------------. .-----------------. .-------------------------------------------------.
| Mesos Slave VM | | Front Machine | | Proxy | | Tool-VM |
| 178.22.17.248 | | 39.224.147.94 | | 10.2.0.57 | | 10.1.10.176 |
|----------------------| | my.domain.com | |-----------------| | 192.168.5.1 (docker bridge) |
| | |-----------------| | | |-------------------------------------------------|
| | | | | | | |
| __________ | | __________ | | __________ | | .-----------------------------. |
| [_...__..5051.°]| |[_..5050.__...°] |<---|[_..5050.__...°] |<------------^| | Mesos-Master Container | |
| | | | | | \ __________ | 192.168.5.4 (docker bridge) | |
| | | __________ | | __________ | |[_..5050.__...°]^|-----------------------------| |
| | |[_..2181.__...°] |<---|[_..2181.__...°] |<------------^| \ __________ | |
| | | | | | \ __________ |[_..5050.__...°] | |
| | | | | | |[_..2181.__...°]^| __________ | |
| | | | | | | \[_..2181.__...°] | |
| | | | | | | '-----------------------------' |
'----------------------' '-----------------' '-----------------' '-------------------------------------------------'
However:
My domain infra redirect everthing that arrives from outside on ports 5050 (for Mesos) and port 2181 (zookeeper) ONLY for requests that are addressed to the domain 'my.domain.com' (which is a virtualhost of 39.224.147.94). But not for the other requests (that are arriving on 39.224.147.94).
So I try to execute the service through CLI for the moment:
Execute Mesos Master(in Mesos Master Container)
/usr/sbin/mesos-master --ip=192.168.5.4 --work_dir=~/Mesos/mesos-0.23.0/workdir/ --zk=zk://192.168.5.4:2181/mesos --quorum=1 --log_dir=/var/log/mesos --external_log_file=/dev/stdout
Execute Marathon (in Mesos Master Container)
/usr/bin/marathon --zk zk://192.168.5.4:2181/marathon --master zk://my.domain.com:2181/mesos
Execute Mesos Slave (in Mesos Slave VM)
/usr/sbin/mesos-slave --master=my.domain.com:5050 --work_dir=/var/lib/mesos/agent --port=8009 --containerizers=docker --executor_registration_timeout=3mins --log_dir=/var/log/mesos
The Mesos Master can see the Slave resources.
However, when I send a Job through Marathon, this job stay in a waiting state.
It seems that the slave is not able to communicate on the hostname of the Master, but only using it's public IP:
I have this in the Slave logs:
New master detected at master#39.224.147.94:5050
However incoming traffic on 39.224.147.94:5050 is blocked by my infra (only my.domain.com:5050 is accepted)
So, is it possible to create a connection between Master and Slaves, using domain names, but not IPs?
It's a bit confusing to bee honest. What I don't understand is that you seem to use the 192.168.5.4 ip for the Master process, but it's nowhere to be found in your diagram. I'd expect to use 39.224.147.94 instead.
Furthermore, I'd recommend to use the ip addresses instead of hostname in all connection strings, you're using a mixture...
Additionally, you can try to set the LIBPROCESS_IP environment variable to the respective ip addresses for the agent and Marathon processes.
Another question would be why you use such an old version of Mesos... Mesos 1.1.0 is out already!

Eclipse: Multiple monitors and Quick Switch Editor dialog position (Ctrl-E)

I'm using Eclipse Luna on multiple monitors setup as one single desktop. I resize the Eclipse window to fill the primary monitor (in the center, secondary on the right). When I type Ctrl-E to get the "Quick Switch Editor", the dialog spans over the gap between the monitors and shows up on both (1/2 on each monitor). That is really annoying, but I can't see how to move the dialog position.
How can the dialog position be changed? I don't see any handles on the dialog.
A screenshot doesn't really show the problem, it looks OK there. However, some ascii art may help to show what is really happening:
+-----------------------------+ +-----------------------------+
| +-------------------------+ | | |
| | +---| | |--+ |
| | | | | | | <- popup dialog spans |
| | +---| | |--+ both monitors |
| | | | | |
| | | | | |
| | Eclipse window | | | |
| +-------------------------+ | | |
| Primary monitor | | Secondary monitor |
+-----------------------------+ +-----------------------------+
This is on Red Hat Enterprise Linux 5, with Nvidia "TwinView".
The Quick Switch Editor popup (invoked with Ctrl+E) isn't movable or resizable. What you're seeing doesn't happen on Windows, so it's likely a platform-specific bug.
As an alternative, you can use the Swtich to Editor dialog (invoked with Ctrl+Shift+E).