org.jboss.jpa.resolvers.strategy
Class JBossSearchStrategy

java.lang.Object
  extended by org.jboss.jpa.resolvers.strategy.BaseSearchStrategy
      extended by org.jboss.jpa.resolvers.strategy.JBossSearchStrategy
All Implemented Interfaces:
SearchStrategy

public class JBossSearchStrategy
extends BaseSearchStrategy

A search strategy which allows for persistence units in other (unrelated) deployments. Note that this violates spec EJB 3.0 6.2.2.

Version:
$Revision: $
Author:
Carlo de Wolf

Constructor Summary
JBossSearchStrategy()
           
 
Method Summary
 String findPersistenceUnitSupplier(PersistenceUnitDependencyResolver resolver, org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit, String persistenceUnitName)
          Find the persistence unit supplier bean given a persistence unit name.
protected  String findWithinMainDeployer(PersistenceUnitDependencyResolver resolver, String persistenceUnitName)
           
 void setMainDeployer(org.jboss.deployers.client.spi.main.MainDeployer mainDeployer)
           
 void setMainDeployerStructure(org.jboss.deployers.structure.spi.main.MainDeployerStructure mainDeployerStructure)
           
 
Methods inherited from class org.jboss.jpa.resolvers.strategy.BaseSearchStrategy
findWithinApplication, findWithinModule, getDeploymentUnit, setJavaEEModuleInformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossSearchStrategy

public JBossSearchStrategy()
Method Detail

findPersistenceUnitSupplier

public String findPersistenceUnitSupplier(PersistenceUnitDependencyResolver resolver,
                                          org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit,
                                          String persistenceUnitName)
Description copied from interface: SearchStrategy
Find the persistence unit supplier bean given a persistence unit name.

Specified by:
findPersistenceUnitSupplier in interface SearchStrategy
Overrides:
findPersistenceUnitSupplier in class BaseSearchStrategy
Parameters:
resolver - the resolver which we're working on behalf of
deploymentUnit - the deployment unit that has a persistence unit reference
persistenceUnitName - the (relative) name of a persistence unit or null for the default persistence unit
Returns:
the bean name of the persistence unit or null if not found

findWithinMainDeployer

protected String findWithinMainDeployer(PersistenceUnitDependencyResolver resolver,
                                        String persistenceUnitName)

setMainDeployer

public void setMainDeployer(org.jboss.deployers.client.spi.main.MainDeployer mainDeployer)

setMainDeployerStructure

public void setMainDeployerStructure(org.jboss.deployers.structure.spi.main.MainDeployerStructure mainDeployerStructure)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.