[Beginners Corner] - design simple jboss application
by iscsi
Hi
I ve got a task, which connected to JBOSS, but i haven't make any J2ee application yet.
So the skeleton of the problem i've got an database, and i will got a text
(i have to generate from this text an sql query this text will go to the where clause)
so i will got some row from the database.
i' ve got an java function which ordering this resultset or rows, so every row will get a rank, after that i will have to write this to the web site, or to the file.
So the sketch
SQL-QUEURY -> result set -> java function -> result set -> print
so i don't know about to much jsp, servlet, etc
So my questions:
how should i realize the userinterface? it should be jsp page or other?
but the most important question is what should i do with the java function. this should be a session bean?
so i would like to this function run on the jboss, but i don't know the concept
so i really sorry for this simple questions, and thank you for your answers..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192852#4192852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192852
17 years, 4 months
[Installation, Configuration & DEPLOYMENT] - Re: connect over internet to jms queue
by jlashmet
Thanks for the response.
So the current issue is this. If I connect to my queue remotely, it works. This is because I used the following configuration which tells jboss to send clients the WAN ip instead of the internal ip to use for connecting.
-Djava.rmi.server.hostname=<external_host_name>
-Djava.rmi.server.useLocalHostname=true
So now, when I connect from a machine inside the network, the connection starts, but the server is still telling the client to connect through the WAN ip, even though the client is on the internal network. When the client tries to do this, it eventually gets a connection reset by the server. So there are two ways I can see to fix this, but I don't know if either are possible.
1. Somehow specify the "java.rmi.server.hostname" per client. If the client is remote, it should connect through the internet. Otherwise it should connect throught he servers local IP.
2. When an internal client is trying to connect to the servers WAN IP, RMI chooses a random port for the communication. Since I don't have all ports forwarded to my server, this could be the issue. Can I specify a range of ports for RMI to work with?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192846#4192846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192846
17 years, 4 months
[Security & JAAS/JBoss] - Security roles in jboss-web.xml and web.xml
by altes-kind
Hi,
when trying to deploy my EAR file at JBoss 4.2.1 (Java 1.6) I'm getting following exception:
Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: Security role 'userpreferencesservicerole' defined in jboss-web.xml is not defined in web.xml)
However, the security role "userpreferencesservicerole" is defined in both jboss-web.xml AND web.xml, so what is going wrong here?
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
|
| <jboss-web>
| <security-role>
| <role-name>userpreferencesservicerole</role-name>
| <principal-name>UserPreferencesServiceUsers</principal-name>
| </security-role>
|
| <context-root></context-root>
| <security-domain>java:/jaas/postboxjaas</security-domain>
| </jboss-web>
web.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
| <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
| <web-app>
| <display-name>UserPreferencesService</display-name>
| <session-config>
| <session-timeout>60</session-timeout>
| </session-config>
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>UserPreferencesService</web-resource-name>
| <url-pattern>/UserPreferencesService/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| </web-resource-collection>
| <auth-constraint>
| <role-name>userpreferencesservicerole</role-name>
| </auth-constraint>
| <user-data-constraint>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| </login-config>
| <security-role>
| <role-name>userpreferencesservicerole</role-name>
| </security-role>
| </web-app>
Exception stacktrace
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: Security role 'userpreferencesservicerole' defined in jboss-web.xml is not defined in web.xml)
| at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:768)
| at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:356)
| at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.deployment.SubDeployerInterceptorSupport.init(SubDeployerInterceptorSupport.java:119)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.init(SubDeployerInterceptorSupport.java:172)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:87)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.init(Unknown Source)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: org.jboss.deployment.DeploymentException: Security role 'userpreferencesservicerole' defined in jboss-web.xml is not defined in web.xml
| at org.jboss.metadata.WebMetaData.importJBossWebXml(WebMetaData.java:1091)
| at org.jboss.metadata.WebMetaData.importXml(WebMetaData.java:770)
| at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:763)
| ... 41 more
Thank you very much!!!!
altes-kind
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192840#4192840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192840
17 years, 4 months