[JBoss Seam] - Having problems looking up a Seam component in the JNDI ENC
by zzzz8
I'm running Seam in Tomcat (EJB 3 embedded) and my client program cannot perform the lookup. I'm not sure if I'm missing something in my configuration files. My jndi.properties has the following (which is the default content in the jndi.properties file given in the Seam examples):
java.naming.factory.initial org.jnp.interfaces.LocalOnlyContextFactory
| java.naming.factory.url.pkgs org.jboss.naming:org.jnp.interfaces
My stateless session bean is defined like this:
@Name("TestConnection")
| @Stateless
| public final class TestConnectionBean implements TestConnectionLocal {
| ...
| }
In my client code which is used to lookup the Seam component, I have the following:
TestConnectionLocal connection = null;
| try {
| InitialContext ctx = new InitialContext();
| connection = (TestConnectionLocal) ctx.lookup("java:comp/env/ejb/TestConnectionBean/local");
| ....
| }
When I try invoking it from my client code, I get the typical NameNotFoundException error:
javax.naming.NameNotFoundException: Name TestConnectionBean is not bound in this Context
I've noticed the following on startup on the Tomcat console:
INFO 30-09 18:54:08,523 (Component.java:<init>:217) -Component: TestConnection, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: test.TestConnectionBean, JNDI: TestConnectionBean/local
I've tried a couple of different contexts without success:
java:comp/env/TestConnectionBean/local
TestConnectionBean/local
etc...
The Tomcat JMX console (and I'm also using MC4J) don't seem to show the Seam components anywhere... What am I doing wrong? Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975318#3975318
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975318
18 years, 5 months
[JBoss AOP] - Re: howto hotswap ?
by waffels
i'm still having troubles getting this to work,
if i add the -javaagent:jboss-aop-jdk50.jar=-hotSwap argument,
the program often crashes saying it can't find the main class,
this crashing depends on the things that are contained in the jboss-aop.xml file
i often get this error:
java.lang.ExceptionInInitializerError
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.jboss.aop.HotSwapStrategy$JoinpointStatusUpdater.initialInterceptorChains(HotSwapStrategy.java:259)
at org.jboss.aop.ClassAdvisor.setInterceptorChainObserver(ClassAdvisor.java:1681)
at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:443)
at src.Server.(Server.java)
could it be possible that hotswapping doesn't work using the eclipse IDE ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975317#3975317
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975317
18 years, 5 months
[JCA/JBoss] - get connection took up to 67 seconds
by vulee
Jboss app server: 4.0.3
I have a stateless session bean (SLSB) which contains a finder method. In this method, a connection is gotten from an oracle data source. To run a performace benchmark for 100 concurrent requests, I have set the max number of SLSB to 80, and the max number of connections to 100. To initialize jboss resources, I first ran 100 concurrent abitrary requests. JMX-console displayed the number of connection created was 90 and the number of available connections was 100. Then I ran another 100 concurrent requests and logged the time to get connection. What I saw was the time to get connection kept increasing from 3 seconds to 67 seconds. I don't know why it took too long to get a connection from the pool.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975316#3975316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975316
18 years, 5 months
[Security & JAAS/JBoss] - Re: Rich Client Authorisation and JAAS
by info@connext.co.za
Good Day,
It is possible for rich clients to make use of JAAS on the client and on the server side to perform authentication and authorization.
Client
-------
1. Use the JBoss client login module (org.jboss.security.ClientLoginModule) to collect the user name and password and to associate them with the caller.
2. Perform a normal JAAS login
3. Make a call to a server side EJB session bean to retrieve the roles that the current user has.
4. Use the roles returned to enable menu items.
Server
--------
1. Configure a JAAS configuration for you J2EE application and assign the login modules that will authenticate and authorize.
2. Program the security permissions required by the session bean methods either programmatically or declaritively.
3. Provide a method on one of the session bean methods to get the caller principal from the caller. Using this principal, retrieve the roles that the user has and return them to the client.
CallerPrincipal
----------------
There are posts (made by me) on this forum concerning how to get the CallerPrincipal to contain a principal object that can be used in the session bean for just this type of scenario.
Acegi
------
Acegi is a framework that makes security easier in SpringFramework applications. If you are using this framework then consider using the AuthorityGranter for the portion in the client that retrieves roles from the server.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975315#3975315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975315
18 years, 5 months