FileDocCategorySizeDatePackage
Ejb3DeploymentInfo.javaAPI DocJBoss 4.2.13240Fri Jul 13 20:53:50 BST 2007org.jboss.ejb3.embedded.resource

Ejb3DeploymentInfo

public class Ejb3DeploymentInfo extends org.jboss.deployment.DeploymentInfo
version
$Revision: 60233 $
author
William DeCoste

Fields Summary
private static final Logger
log
protected String
rarName
protected String
listenerType
protected String
activationSpecType
Constructors Summary
public Ejb3DeploymentInfo(String rarName, String listenerType, String activationSpecType)

  
           
   
      super(Thread.currentThread().getContextClassLoader().getResource(rarName), null, null);
      
      this.rarName = rarName;
      this.listenerType = listenerType;
      this.activationSpecType = activationSpecType;
        
      MessageListenerMetaData listener = new MessageListenerMetaData();
      listener.setType(listenerType);
      listener.setActivationSpecType(activationSpecType);
      ConnectorMetaData metaData = getConnectorMetaData();
      this.metaData = metaData;
   
Methods Summary
protected org.jboss.resource.metadata.ConnectorMetaDatagetConnectorMetaData()

  
      ObjectModelFactory factory = new ResourceAdapterObjectModelFactory();
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      
      URL rar = Thread.currentThread().getContextClassLoader().getResource(rarName);
      JarFile rarFile = new JarFile(rar.getFile());
      ZipEntry entry = rarFile.getEntry("META-INF/ra.xml");
      
      ConnectorMetaData metaData = (ConnectorMetaData) unmarshaller.unmarshal(rarFile.getInputStream(entry),
               factory, null);
      
      return metaData;