Lookup Jboss EJB deployed into ear

When you deploy as an ear, in JBoss the JNDI name of EJBs becomes:

earname/EjbBeanName/local

When you deploy outside an ear, the 'earname' part obviously is not there.

Lookup a Oracle Ias 10.1.3.1 Remote EJB

First of all:
1) Get the OC4J client!!!! It's the only way to get a lookup of an ejb deployed remotely in oracle ias 10.1.3.1!!!
2) set it in the lib of your application
3) Now you can  start combating against oracle ias ejb lookup
3.1) put the following properties in the InitialContext

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
props.put(Context.PROVIDER_URL, "ormi://iasServerName:rmiPort/ejbApplicationName");
props.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
props.put(Context.SECURITY_CREDENTIALS, "manager");

Context contesto=new InitialContext(props);

ITestRemote testRemote=(ITestRemote)contesto.lookup("SessionBeanProva");

OK! You get it!

Lookup a JBoss Remote Ejb

Properties environment = new Properties();
    environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
    environment.put(Context.URL_PKG_PREFIXES, "org.jboss.namingrg.jnp.interfaces");
    environment.put(Context.PROVIDER_URL, "jnp://remoteServerName:1099");
    try{
         InitialContext contesto=new InitialContext(environment);
         ejbTest=(ITestRemote)contesto.lookup("RemoteEJBName/remote");
     }
    catch(NamingException e){
...
}

Dependency Injection on ejbclient

Only one sentence:
"DI can only be used by classes which are managed by containers: other EJB and servlet"!!!

JasperReport: Subreport overflowed

Oooops: JRRuntimeException: Subreport overflowed on a band that does not support overflow

 The problem was in the band that include the suberport: tha band was static (footer page) and, also, it was too small for the report rows! I resolved enlarging tha band and the subreport height. Oh Yeah!

Increase Memory Space for Tomcat

"Uston, i've a problem: MemoryError: PermGen space; java.lang.OutOfMemoryError: PermGen space"

On Tomcat on Windows (started manually)

If you run Tomcat (eg. from JIRA Standalone) on Windows, and are starting it manually by running bin\startup.bat, edit bin\setenv.bat and add the line:

set JAVA_OPTS=-Xms256m -Xmx256m -XX:MaxPermSize=512m 
and then restart. Adjust 256 to the maximum memory you want to allocate.


If bin\setenv.bat does not exist, create it or edit directly tha catalina.bat

fix eclipse error: "resource is out of sync with the file system: ..."

To fix this problem, right click on the project and select "Refresh"!