[Clustering/JBoss] - Re: Remote cluster ejb access
by mancinis
Hi,
I've changed the partitions names and now it's working fine, thanks for your help.
Sorry for the delay in my feedback but I tested the solution only yesterday.
I've only another doubt, as I told before in my configuration I've a jboss cluster composed by two nodes (node1 and node2) and
a remote jboss client.
In the jboss.xml of the ejbs deployed on the client node I've the following reference:
<ejb-name>ABean</ejb-name>
<jndi-name>ejb/ABean</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/LucyServicesBeanRemote</ejb-ref-name>
<jndi-name>jnp://node1:1100/ejb/LucyServicesBean</jndi-name>
</ejb-ref>
I've verified that the load balancing is working and that failover is working if node1 or node2 stops.
But if 'node1' is stopped when the client is doing the first lookup (for example the jboss client starts with node1 stopped), obviously
I receive an exception.
Is there a way to list all the remote cluster nodes in the jboss.xml of the client ?
for example something like
<jndi-name>jnp://node1:1100/ejb/LucyServicesBean, jnp://node2:1100/ejb/LucyServicesBean</jndi-name>
(as I can do when I write a standalone client jndiProps.setProperty(Context.PROVIDER_URL, "jnp://node1:1100, jnp://node2:1100") )
Regards
Stefano Mancini
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160246#4160246
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160246
17 years, 10 months
[EJB 3.0] - multiple clientConnectAddresses?
by robert.geisler
hello und sorry for my poor english...
i have got some questions concerning EJB3 and Remoting. i am using JBoss 4.2.2.GA and i am trying to access EJB3s through HTTP.
the use case:
i have my application deployed on JBoss and my application should get accessed by clients from LAN and over the internet. lets say, JBoss is running on machine A, then there is a machine B within the LAN which knows machine A as 192.168.1.58, and there is a machine C which connects over the internet and knows machine A as 217.18.182.49.
additionally i am not allowed to open too much ports, so i want to use just port 8080 and access my EJBs through servlets. machine B than could use 192.168.1.58:8080 to communicate to jboss, machine C could use 217.18.182.49:28086 and would get redirected to the internal address of machine A (192.168.1.58:8080).
the solution:
i started with http://wiki.jboss.org/wiki/Accessing_EJB3s_over_HTTP_HTTPS that told me to* configure web containers (deploy/jboss-web.deployer/server.xml),
| * configure servlets (deploy/servlet-invoker.war/WEB-INF/web.xml),
| * configure EJB 3.0 connector (deploy/ejb3.deployer/META-INF/jboss-service.xml). and
| * add @RemoteBinding(clientBindUrl="servlet://host:port//servlet-invoker/ServerInvokerServlet") to all of my beans i want to access remotely.i followed the instructions and yes, it seems to work: after i deployed the ServerInvokerServlet and i configured the EJB 3.0 Connector, especially the "Configuration"-attribute including clientConnectAddress and clientConnectPort, my client tried to connect to the external address (217.18.182.49:28086) and threw some ConnectionException (org.jboss.remoting.transport.http.WebServerError, "Connection refused"). so my configuration is correct, i guess.
the question(s):
there still is a problem with the clientConnectAddress. for sure, external clients could be able to communicate with my application (machine A), because JBoss tells the clients (machine C) to connect to the external address. but what about machine B? machine B gets told from JBoss to connect to the external address, too. but machine B does not even know this address.
some weeks ago i got this all working for EJB 2.1. i deployed and configured some servlets (JMXInvokerServlet, EJBInvokerServlet, HTTPServerILServlet) and the EJBContainer. there was a similar problem: i had to static declare the URLs for the servlet invokers.
i then found a solution in not declaring static URLs, but using system properties for the InvokerURLs. i now can set the system properties in my client application to switch between external and internal address (i just try to connect to the external address and use the internal in case of an error).
i understand that JBoss has to tell the clients where to connect to. but in some cases JBoss does not know this address, because there are at least two possibilities: one internal (LAN) and one external (redirected). so what is the solution in this situation?
i could imagine to solve my issue if* it is possible to avoid the static declaration of clientConnectAddress of the EJB 3.0 Connector and to modify the declaration before the client uses the wrong address. but am i able to set the clientConnectAddress within the client by myself?
| * i could configure two invokers (EJB 3.0 Connector), one for transport="socket" and one for transport="servlet", using sockets for internal clients and servlets for external clients. but how can i tell the client which invoker to use if i neither do want to develop different EJBs nore do want to use different JNDI-names for different Invokers?
| * i would know about any another solutions for my problem...
thanks in advance for your ideas, hints and information.
robert
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160241#4160241
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160241
17 years, 10 months
[JBoss Portal] - Problem : Configure Portal For Microsof tActiveDirectory
by khadijbal
I followed steps of the wiki http://wiki.jboss.org/wiki/ConfigurePortalForMicrosoftActiveDirectory: step by step but i can't connect me with the accounts of the active directory.
and in the CMS page i have the error:
Cause: java.lang.RuntimeException: org.jboss.portal.identity.IdentityException: User search failed.
Message: org.jboss.portal.identity.IdentityException: User search failed.
StackTrace:
java.lang.RuntimeException: org.jboss.portal.identity.IdentityException: User search failed.
at org.jboss.portal.cms.security.AuthorizationProviderImpl.getRoot(AuthorizationProviderImpl.java:227)
at org.jboss.portal.cms.impl.jcr.command.ACLEnforcer.computeAccess(ACLEnforcer.java:319)
at org.jboss.portal.cms.impl.jcr.command.ACLEnforcer.hasReadAccess(ACLEnforcer.java:204)
at org.jboss.portal.cms.impl.jcr.command.ACLEnforcer.hasAccess(ACLEnforcer.java:116)
at org.jboss.portal.cms.security.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:114)
at org.jboss.portal.cms.impl.interceptors.ACLInterceptor.invoke(ACLInterceptor.java:190)
at org.jboss.portal.cms.CMSInterceptor.invoke(CMSInterceptor.java:36)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.cms.impl.jcr.JCRCMS.execute(JCRCMS.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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 $Proxy223.execute(Unknown Source)
at org.jboss.portal.core.cms.ui.CMSPortlet.doView(CMSPortlet.java:220)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160237#4160237
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160237
17 years, 10 months