本文整理汇总了Java中javax.resource.spi.AuthenticationMechanism类的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationMechanism类的具体用法?Java AuthenticationMechanism怎么用?Java AuthenticationMechanism使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AuthenticationMechanism类属于javax.resource.spi包,在下文中一共展示了AuthenticationMechanism类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testResourceAdapter
import javax.resource.spi.AuthenticationMechanism; //导入依赖的package包/类
@Test
public void testResourceAdapter() throws Exception {
final ConnectorModule connectorModule = testConnectorModule();
final AnnotationDeployer.DiscoverAnnotatedBeans discvrAnnBeans = new AnnotationDeployer.DiscoverAnnotatedBeans();
discvrAnnBeans.deploy(connectorModule);
final Connector connector = connectorModule.getConnector();
Assert.assertEquals("displayName", connector.getDisplayName());
Assert.assertEquals("description", connector.getDescription());
Assert.assertEquals("eisType", connector.getEisType());
Assert.assertEquals("vendorName", connector.getVendorName());
Assert.assertEquals("version", connector.getResourceAdapterVersion());
Assert.assertEquals("smallIcon", connector.getIcon().getSmallIcon());
Assert.assertEquals("largeIcon", connector.getIcon().getLargeIcon());
Assert.assertEquals("licenseDescription", connector.getLicense().getDescription());
Assert.assertEquals(true, connector.getLicense().isLicenseRequired());
final List<org.apache.openejb.jee.SecurityPermission> securityPermission = connector.getResourceAdapter().getSecurityPermission();
Assert.assertEquals("description", securityPermission.get(0).getDescription());
Assert.assertEquals("permissionSpec", securityPermission.get(0).getSecurityPermissionSpec());
final List<String> requiredWorkContext = connector.getRequiredWorkContext();
Assert.assertEquals(TestWorkContext.class.getName(), requiredWorkContext.get(0));
final List<org.apache.openejb.jee.AuthenticationMechanism> authenticationMechanism = connector.getResourceAdapter().getOutboundResourceAdapter().getAuthenticationMechanism();
Assert.assertEquals("authMechanism", authenticationMechanism.get(0).getAuthenticationMechanismType());
Assert.assertEquals(CredentialInterface.GenericCredential.toString(), authenticationMechanism.get(0).getCredentialInterface());
Assert.assertEquals("description", authenticationMechanism.get(0).getDescription());
Assert.assertEquals(TransactionSupportType.NO_TRANSACTION, connector.getResourceAdapter().getOutboundResourceAdapter().getTransactionSupport());
Assert.assertEquals(true, connector.getResourceAdapter().getOutboundResourceAdapter().isReauthenticationSupport());
Assert.assertEquals(Connection.class.getName(), connector.getResourceAdapter().getOutboundResourceAdapter().getConnectionDefinition().get(0).getConnectionInterface());
Assert.assertEquals(ConnectionImpl.class.getName(), connector.getResourceAdapter().getOutboundResourceAdapter().getConnectionDefinition().get(0).getConnectionImplClass());
Assert.assertEquals(ConnectionFactory.class.getName(), connector.getResourceAdapter().getOutboundResourceAdapter().getConnectionDefinition().get(0).getConnectionFactoryInterface());
Assert.assertEquals(ConnectionFactoryImpl.class.getName(), connector.getResourceAdapter().getOutboundResourceAdapter().getConnectionDefinition().get(0).getConnectionFactoryImplClass());
Assert.assertEquals(TestActivation.class.getName(), connector.getResourceAdapter().getInboundResourceAdapter().getMessageAdapter().getMessageListener().get(0).getActivationSpec().getActivationSpecClass());
Assert.assertEquals(TestMessageListener.class.getName(), connector.getResourceAdapter().getInboundResourceAdapter().getMessageAdapter().getMessageListener().get(0).getMessageListenerType());
Assert.assertEquals(TestAdminObject.class.getName(), connector.getResourceAdapter().getAdminObject().get(0).getAdminObjectClass());
Assert.assertEquals(TestAdminObjectInterface.class.getName(), connector.getResourceAdapter().getAdminObject().get(0).getAdminObjectInterface());
}