Skip to content

Commit

Permalink
Removed EJB tests using @ManagedBean
Browse files Browse the repository at this point in the history
This had been removed from the platform.

Signed-off-by: Arjan Tijms <arjan.tijms@omnifish.ee>
  • Loading branch information
arjantijms committed Jan 3, 2024
1 parent 9580427 commit 31ebd8e
Show file tree
Hide file tree
Showing 87 changed files with 104 additions and 3,590 deletions.
81 changes: 27 additions & 54 deletions appserver/tests/appserv-tests/config.properties
Original file line number Diff line number Diff line change
@@ -1,55 +1,28 @@
#
# Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#

gf.version=${env.GF_VERSION}
bundles.dir=${env.WORKSPACE}/bundles

admin.domain=domain1
admin.domain.dir=${env.S1AS_HOME}/domains
admin.port=${env.PORT_ADMIN}
admin.user=admin
admin.host=localhost
http.port=${env.PORT_HTTP}
https.port=${env.PORT_HTTPS}
http.alternate.port=12345
http.host=localhost
http.address=127.0.0.1
http.alternate.port=7777
https.alternate.port=8888
orb.port=3700
admin.password=
ssl.password=changeit
master.password=changeit
admin.password.file=${env.APS_HOME}/config/adminpassword.txt
appserver.instance.name=server
config.dottedname.prefix=server
resources.dottedname.prefix=domain.resources
results.mailhost=localhost
results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
results.mailee=yourname@sun.com
autodeploy.dir=${env.S1AS_HOME}/domains/${admin.domain}/autodeploy
precompilejsp=true
#jvm.maxpermsize=192m
appserver.instance.dir=${admin.domain.dir}/${admin.domain}
cluster.name=clusterA
instance.name=inst1
instance.name.2=inst2
instance.name.3=inst3
instance.http.port=18080
instance.https.port=18181
instance.http.port.2=28080
instance.http.port.3=38080
nodeagent.name=localhost-domain1
gf.version=${env.GF_VERSION}
bundles.dir=${env.WORKSPACE}/bundles
admin.domain=domain1
admin.domain.dir=${env.S1AS_HOME}/domains
admin.port=45707
admin.user=anonymous
admin.host=localhost
http.port=45712
https.port=45711
http.host=localhost
http.address=127.0.0.1
http.alternate.port=45713
orb.port=45710
admin.password=
ssl.password=changeit
master.password=changeit
admin.password.file=${env.APS_HOME}/config/adminpassword.txt
appserver.instance.name=server
config.dottedname.prefix=server
resources.dottedname.prefix=domain.resources
results.mailhost=localhost
results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
results.mailee=yourname@sun.com
autodeploy.dir=${env.S1AS_HOME}/domains/${admin.domain}/autodeploy
precompilejsp=true
jvm.maxpermsize=192m
appserver.instance.dir=${admin.domain.dir}/${admin.domain}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
import jakarta.annotation.Resource;
import javax.naming.*;

@WebServlet(urlPatterns="/HelloServlet", loadOnStartup=1)
@EJB(name="java:module/ES1", beanName="SingletonBean", beanInterface=SingletonBean.class)
@WebServlet(urlPatterns = "/HelloServlet", loadOnStartup = 1)
@EJB(name = "java:module/ES1", beanName = "SingletonBean", beanInterface = SingletonBean.class)
public class HelloServlet extends HttpServlet {

@EJB(name="java:module/env/ES2")
@EJB(name = "java:module/env/ES2")
private SingletonBean simpleSingleton;

@EJB(name="java:app/EL1")
@EJB(name = "java:app/EL1")
private StatelessBean simpleStateless;

@EJB(name="java:app/env/EL2")
@EJB(name = "java:app/env/EL2")
private StatelessBean simpleStateless2;

private SingletonBean sb2;
Expand All @@ -56,19 +56,6 @@ public class HelloServlet extends HttpServlet {
private StatelessBean slsb4;
private StatelessBean slsb5;

@Resource
private FooManagedBean foo;

@Resource(name="foo2ref", mappedName="java:module/foomanagedbean")
private FooManagedBean foo2;

@Resource(mappedName="java:app/ejb-ejb31-ejblite-javamodule-web/foomanagedbean")
private FooManagedBean foo3;

private FooManagedBean foo4;
private FooManagedBean foo5;
private FooManagedBean foo6;

@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
Expand All @@ -90,38 +77,24 @@ public void init(ServletConfig config) throws ServletException {
slsb4 = (StatelessBean) ic.lookup("java:app/EL1");
slsb5 = (StatelessBean) ic.lookup("java:app/env/EL2");

foo4 = (FooManagedBean)
ic.lookup("java:module/foomanagedbean");

foo5 = (FooManagedBean)
ic.lookup("java:app/ejb-ejb31-ejblite-javamodule-web/foomanagedbean");
System.out.println("My AppName = " + ic.lookup("java:app/AppName"));

foo6 = (FooManagedBean)
ic.lookup("java:comp/env/foo2ref");
System.out.println("My ModuleName = " + ic.lookup("java:module/ModuleName"));

System.out.println("My AppName = " +
ic.lookup("java:app/AppName"));

System.out.println("My ModuleName = " +
ic.lookup("java:module/ModuleName"));

} catch(Exception e) {
} catch (Exception e) {
e.printStackTrace();
throw new ServletException(e);
}
}

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

resp.setContentType("text/html");
PrintWriter out = resp.getWriter();

System.out.println("In HelloServlet::doGet");

foo.foobar("foobar");

simpleSingleton.hello();

simpleStateless.hello();
Expand All @@ -145,22 +118,13 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)

slsb5.hello();

foo.foo();
foo.foobar("foobar");
foo2.foo();
foo3.foo();
foo4.foo();
foo5.foo();
foo6.foo();

out.println("<HTML> <HEAD> <TITLE> JMS Servlet Output </TITLE> </HEAD> <BODY BGCOLOR=white>");
out.println("<CENTER> <FONT size=+1 COLOR=blue>DatabaseServelt :: All information I can give </FONT> </CENTER> <p> " );
out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>" );
out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>" );
out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>" );
out.println("</BODY> </HTML> ");
out.println("<CENTER> <FONT size=+1 COLOR=blue>DatabaseServelt :: All information I can give </FONT> </CENTER> <p> ");
out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>");
out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>");
out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>");
out.println("</BODY> </HTML> ");

}


}

This file was deleted.

Loading

0 comments on commit 31ebd8e

Please sign in to comment.