Q:

EntityManager not injected in Stateless Session Bean

I have been looking through a lot of similar questions which did not reflect my exact problem. If i overlooked that someone already had this problem solved, please let me know.
I am currently migrating an old EJB 2.1 application on JBoss 3.x to EJB 3.x on JBoss 7.x. Due to the changes in communication between the application client and the server, i created a small testclient to check for pitfalls.
One of these is that the entitymanager in my stateless session beans is not injected, leaving the EntityManager NULL. I tried working around this using the EntityManagerFactory, but neither is injected.
The datasource referenced is available and the connection has been tested against the database.
I hope that some of you have come across this problem, can think of where i can look next or what i might do to track this issue down.
Enclosed are the persistence.xml, RemoteInterface and Bean code from server side as well as my test client code.
Please let me know if i can provide more information.
(The classes have mostly retained their name from the EJB 2 application in case you are wondering).
Stateless Session Bean (GUITabUsersDao):
@Stateless
@Remote(GUITabUsersDaoRemote.class)
public class GUITabUsersDao implements GUITabUsersDaoRemote {
    Logger logger = Logger.getLogger(GUITabUsersDao.class.getName());

    @PersistenceContext(name = "OracleGUIDS", type =   PersistenceContextType.TRANSACTION)
    EntityManager entityManager;

    @Override
    public List<GUITabUsers> findAll() throws FinderException {
         List<GUITabUsers> resultList = null;
         TypedQuery<GUITabUsers> namedQuery;
         if (entityManager == null) {
             logger.severe("**** CKU: This is not going to end well. entitymanager is null. :( ****");
         } else {
            namedQuery = entityManager.createNamedQuery(GUITabUsers.FIND_ALL, GUITabUsers.class);
            resultList = namedQuery.getResultList();
        }
        return resultList;
    }
}

The Remote Interface
public interface GUITabUsersDaoRemote {
    List<GUITabUsers> findAll() throws FinderException;
}

The persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="OracleGUIDS" transaction-type="JTA">
        <jta-data-source>java:jboss/datasources/OracleGUIDS</jta-data-source>
        <class>de.printcom.loginmodule.GUITabUsers</class>
        <properties>
            <!-- Properties for Hibernate  -->
            <property name="hibernate.hbm2ddl.auto" value="verify"/>
            <property name="hibernate.show_sql" value="false"/>
        </properties>
    </persistence-unit>
</persistence>

The client code 
package de.my.test;

public class TestClient {
    public static final String URL = "localhost";
    public static final String PORT = "4447";

    private static final Logger LOGGER = Logger.getLogger(TestClient.class.getName());

    public static void main(String[] args) {
        IDPLookupRemote bean;
        LAEC_MachineControlSES bean2;
        GUITabUsersDaoRemote guiTabUsersDao;
        try {
            EJBHomeFactory factory = EJBHomeFactory.getInstance(URL, PORT);
            guiTabUsersDao = (GUITabUsersDaoRemote) lookup("GUITabUsersDao", GUITabUsersDaoRemote.class);
            LOGGER.info("Bean '" + guiTabUsersDao.toString() + "' received.");
            List<GUITabUsers> col = null;
            try {
                col = guiTabUsersDao.findAll();
            } catch (FinderException | NullPointerException e) {
                e.printStackTrace();
            }
            if (null != col) {
                LOGGER.info(col.get(0).toString());
            } else {
                LOGGER.info("Col is empty!");
            }
        } catch (NamingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public static Object lookup(String jndiName, Class<?> remoteInterfaceClass) throws NamingException {
        Object object = new Object();
        try {
            Properties properties = new Properties();
            properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
            properties.put("jboss.naming.client.ejb.context", true);
            properties.put(Context.PROVIDER_URL, "remote://" + URL + ":" + PORT);
            Context context = new InitialContext(properties);
            final String appName = "appName";
            final String moduleName = "moduleName";
            final String distinctName = "";
            final String beanName = jndiName;
            final String viewClassName = remoteInterfaceClass.getName();
            LOGGER.info("Looking EJB via JNDI ");
            String jndiLookupName = appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName;
            LOGGER.info(jndiLookupName);
            object = context.lookup(jndiLookupName);
            LOGGER.info("Calling 'context.lookup(" + jndiLookupName + ")'");
            // object = context.lookup(jndiName);
        } catch (NamingException e) {
            e.printStackTrace();
        }
        return object;
    }
}

A:

As suggested by BalusC and jgitter, here is my previous edit as an answer:
If you come across a similar problem feel free to bathe in my stupidity for the problem mentioned below. 
In the application i needed to migrate from JBoss 3.x to 7.x a number of projects were thrown together. One of these projects had two persistence units declared in the persistence.xml while the Stateless Session Beans all were declared similar to this:
@Stateless
@Remote(SomeStatelessRemote.class)
public class SomeStatelessBean implements SomeStatelessRemote {

    @PersistenceContext(name = "OracleGUIDS")
    EntityManager entitymanager;
    ...
}

Now if you deploy this, you will get the error message
JBAS011470: Persistence unitName was not specified

In some forums someone suggested to disable a specific subsystem in the standalone 
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
   <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
</subsystem>

as you can see this will disable ANY possibility of using JPA at all.
Now i enabled the subsystem and used the correct syntax to inject the entitymanager:
@Stateless
@Remote(SomeStatelessRemote.class)
public class SomeStatelessBean implements SomeStatelessRemote {

    @PersistenceContext(unitName= "OracleGUIDS")
    EntityManager entitymanager;
    ...
}

and, oh wonder, i am able to access the entitymanager and have at it.
Thanks to everyone working their brains to help me. 
Hopefully this entry will help you AVOID this error.

