-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JDF-841 - Synchronize Wildfly and EAP Quickstarts
EAP Commit: jboss-developer/jboss-eap-quickstarts@ed09e9f
- Loading branch information
Showing
1,554 changed files
with
123,398 additions
and
28,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
template | ||
jdg-quickstarts | ||
jpp-quickstarts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual | ||
* contributors by the @authors tag. See the copyright.txt in the | ||
* Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual | ||
* contributors by the @authors tag. See the copyright.txt in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* Licensed 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 | ||
* http://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, | ||
* 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. | ||
|
@@ -18,10 +18,7 @@ | |
|
||
import java.util.Arrays; | ||
|
||
import javax.annotation.Resource; | ||
import javax.ejb.EJB; | ||
import javax.naming.InitialContext; | ||
import javax.naming.NamingException; | ||
|
||
import org.jboss.as.quickstarts.appclient.acc.client.interceptor.ClientInterceptor; | ||
import org.jboss.as.quickstarts.appclient.server.ejb.StatelessSession; | ||
|
@@ -31,43 +28,33 @@ | |
/** | ||
* A simple EJB client to demonstrate the use of the JBoss application container | ||
* to show that the injection will work for server EJB-beans. | ||
* | ||
* | ||
* @author <a href="mailto:[email protected]">Wolf-Dieter Fink</a> | ||
*/ | ||
public class Main { | ||
private static final Logger LOG = Logger.getLogger(Main.class); | ||
|
||
/** | ||
* <p>According to the JavaEE Platform specification (EE7 JSR342 - chapter EE5.16) | ||
* the container must provide the following boolean property as <code>TRUE</code> | ||
* if this client runs in an ApplicationClientContainer.<br/> | ||
* If running in a Web or EJB container the property is <code>FALSE</code>.</p> | ||
* <p>Can be used to ensure that the Injection works</p> | ||
* Use field injection for the EJB reference.<br/> | ||
* <b>Notice that the application-container injection only works for | ||
* static fields within the main class of the application</b><br/> | ||
* See JSR 342 (EE7 platform spec) chapter 5.2.5 . | ||
*/ | ||
@Resource(lookup = "java:comp/InAppClientContainer") | ||
private static boolean isInAppclient; | ||
@EJB | ||
private static StatelessSession slsb; | ||
|
||
|
||
/** no instance necessary */ | ||
private Main() { | ||
} | ||
|
||
/** | ||
* @param args the command line arguments | ||
* @throws NamingException | ||
*/ | ||
public static void main(String args[]) throws NamingException { | ||
public static void main(String args[]) { | ||
// Show that the client is started with arguments at command line | ||
LOG.info("Main started " + ( args.length != 0 ? "with" : "without") + " arguments"); | ||
if(args.length > 0) LOG.info(" " + Arrays.asList(args)); | ||
|
||
// ensure that the program is running in an AppClientContainer | ||
// the value might be NULL if we are running as a simple Java program | ||
if(!Boolean.TRUE.equals(isInAppclient)) { | ||
throw new RuntimeException("Not running in an Application Client Container"); | ||
} | ||
LOG.info("Main started " + (args.length != 0 ? "with" : "without") + " arguments"); | ||
if (args.length > 0) | ||
LOG.info(" " + Arrays.asList(args)); | ||
|
||
// add an client side interceptor to provide the client machine name to the server application | ||
EJBClientContext.getCurrent().registerInterceptor(0, new ClientInterceptor()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual | ||
* contributors by the @authors tag. See the copyright.txt in the | ||
* Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual | ||
* contributors by the @authors tag. See the copyright.txt in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* Licensed 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 | ||
* http://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, | ||
* 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. | ||
|
@@ -24,7 +24,7 @@ | |
/** | ||
* Example of an interceptor at client side which can be configures with the {@link EJBClientContext#registerInterceptor(int | ||
* priority, new ClientInterceptor())}. | ||
* | ||
* | ||
* @author <a href="mailto:[email protected]">Wolf-Dieter Fink</a> | ||
*/ | ||
public class ClientInterceptor implements EJBClientInterceptor { | ||
|
6 changes: 0 additions & 6 deletions
6
app-client/client-simple/src/main/resources/META-INF/application-client.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.