本文整理了Java中com.sun.enterprise.deployment.Application.getName()
方法的一些代码示例,展示了Application.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getName()
方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称:Application
方法名:getName
暂无
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Returns the registration name of this application.
*
* @return the registration name of this application
*/
public String getRegistrationName() {
if (registrationName != null) {
return registrationName;
} else {
return getName();
}
}
// END OF IASRI 4648645
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Returns the registration name of this application.
*
* @return the registration name of this application
*/
public String getRegistrationName() {
if (registrationName != null) {
return registrationName;
} else {
return getName();
}
}
// END OF IASRI 4648645
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Return my mapping of rolename to users and groups on a particular
* server.
*/
public SecurityRoleMapper getRoleMapper() {
if (this.roleMapper == null) {
if (securityRoleMapperFactory == null) {
_logger.log(Level.FINE, "SecurityRoleMapperFactory NOT set.");
} else {
this.roleMapper = securityRoleMapperFactory.getRoleMapper(this.getName());
}
}
return this.roleMapper;
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Return my mapping of rolename to users and groups on a particular
* server.
*/
public SecurityRoleMapper getRoleMapper() {
if (this.roleMapper == null) {
SecurityRoleMapperFactory factory = habitat.getComponent(SecurityRoleMapperFactory.class);
if (factory == null) {
_logger.log(Level.FINE, "SecurityRoleMapperFactory NOT set.");
} else {
this.roleMapper = factory.getRoleMapper(this.getName());
}
}
return this.roleMapper;
}
代码示例来源:origin: org.glassfish.deployment/dol
public EjbReference getEjbReference(String name) {
for (EjbReference er : getEjbReferenceDescriptors()) {
if (er.getName().equals(name)) {
return er;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoejbrefbyname",
"This app [{0}] has no ejb reference by the name of [{1}] ", new Object[]{getName(), name}));
}
代码示例来源:origin: org.glassfish.main.deployment/dol
public EjbReference getEjbReference(String name) {
for (EjbReference er : getEjbReferenceDescriptors()) {
if (er.getName().equals(name)) {
return er;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoejbrefbyname",
"This app [{0}] has no ejb reference by the name of [{1}] ", new Object[]{getName(), name}));
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* visit an application object
* @param the application descriptor
*/
@Override
public void accept(Application application) {
DOLUtils.getDefaultLogger().info("Application");
DOLUtils.getDefaultLogger().info("name " + application.getName());
DOLUtils.getDefaultLogger().info("smallIcon " + application.getSmallIconUri());
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* visit an application object
* @param the application descriptor
*/
public void accept(Application application) {
DOLUtils.getDefaultLogger().info("Application");
DOLUtils.getDefaultLogger().info("name " + application.getName());
DOLUtils.getDefaultLogger().info("smallIcon " + application.getSmallIconUri());
}
代码示例来源:origin: org.glassfish.deployment/dol
public void addDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference) {
for(Iterator itr = this.getDataSourceDefinitionDescriptors().iterator(); itr.hasNext();){
DataSourceDefinitionDescriptor desc = (DataSourceDefinitionDescriptor)itr.next();
if(desc.getName().equals(reference.getName())){
throw new IllegalStateException(
localStrings.getLocalString("exceptionapplicationduplicatedatasourcedefinition",
"This application [{0}] cannot have datasource definitions of same name : [{1}]",
getName(), reference.getName()));
}
}
getDataSourceDefinitionDescriptors().add(reference);
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Sets the unique id for this application. It traverses through all
* the ejbs in the application and sets the unique id for each of them.
* The traversal is done in ascending element order.
*
* NOTE : assumption is that the id has already been left shifted 16
* bits to allow space for the component ids.
*
* @param id unique id for this application
*/
public void setUniqueId(long id) {
_logger.log(Level.FINE, "[Application] " + getName() + " , uid: " + id);
this.uniqueId = id;
EjbDescriptor[] descs = getSortedEjbDescriptors();
for (int i = 0; i < descs.length; i++) {
// Maximum of 2^16 beans max per application
descs[i].setUniqueId((id | i));
if (_logger.isLoggable(Level.FINE)) {
String module = descs[i].getEjbBundleDescriptor().getModuleDescriptor().getArchiveUri();
_logger.log(Level.FINE, "Ejb " + module + ":" + descs[i].getName() + " id = " +
descs[i].getUniqueId());
}
}
uniqueIdSet = true;
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Sets the unique id for this application. It traverses through all
* the ejbs in the application and sets the unique id for each of them.
* The traversal is done in ascending element order.
*
* NOTE : assumption is that the id has already been left shifted 16
* bits to allow space for the component ids.
*
* @param id unique id for this application
*/
public void setUniqueId(long id) {
_logger.log(Level.FINE, "[Application] " + getName() + " , uid: " + id);
this.uniqueId = id;
EjbDescriptor[] descs = getSortedEjbDescriptors();
for (int i = 0; i < descs.length; i++) {
// Maximum of 2^16 beans max per application
descs[i].setUniqueId((id | i));
if (_logger.isLoggable(Level.FINE)) {
String module = descs[i].getEjbBundleDescriptor().getModuleDescriptor().getArchiveUri();
_logger.log(Level.FINE, "Ejb " + module + ":" + descs[i].getName() + " id = " +
descs[i].getUniqueId());
}
}
uniqueIdSet = true;
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Sets the registration name for this application. This name is used
* while deploying the application. The deployment process gurantees
* that this name is unique.
*
* @param appId the registration name used for this application
*/
public void setRegistrationName(String appId) {
// at his point we need to swap our RoleMapper, if we have one...
SecurityRoleMapper roleMapper = null;
try {
roleMapper = getRoleMapper();
} catch (IllegalArgumentException ignore) {
}
if (roleMapper != null) {
if (securityRoleMapperFactory == null) {
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.norolemapperfactorydefine",
"This application has no role mapper factory defined"));
}
securityRoleMapperFactory.removeRoleMapper(getName());
roleMapper.setName(appId);
securityRoleMapperFactory.setRoleMapper(appId, roleMapper);
}
this.registrationName = appId;
}
代码示例来源:origin: org.glassfish.web/web-glue
classpath.append(ASClassLoaderUtil.getModuleClassPath(
sc.getDefaultHabitat(),
wbd.getApplication().getName(),
dc.getCommandParameters(
DeployCommandParameters.class).libraries));
} catch (DeploymentException de) {
String msg = rb.getString("webdeployer.jspc");
msg = MessageFormat.format(msg, wbd.getApplication().getName());
logger.log(Level.SEVERE, msg, de);
throw de;
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Sets the registration name for this application. This name is used
* while deploying the application. The deployment process gurantees
* that this name is unique.
*
* @param appId the registration name used for this application
*/
public void setRegistrationName(String appId) {
// at his point we need to swap our RoleMapper, if we have one...
SecurityRoleMapper roleMapper = null;
try {
roleMapper = getRoleMapper();
} catch (IllegalArgumentException ignore) {
}
if (roleMapper != null) {
SecurityRoleMapperFactory factory = habitat.getComponent(SecurityRoleMapperFactory.class);
if (factory == null) {
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.norolemapperfactorydefine",
"This application has no role mapper factory defined"));
}
factory.removeRoleMapper(getName());
roleMapper.setName(appId);
factory.setRoleMapper(appId, roleMapper);
}
this.registrationName = appId;
}
代码示例来源:origin: org.glassfish.common/container-common
id = webEnv.getApplication().getName() + ID_SEPARATOR +
webEnv.getContextRoot();
_logger.finer("ComponentEnvManagerImpl: " +
"converting EJB to web bundle id " + id);
} else {
id = ejbEnv.getApplication().getName() + ID_SEPARATOR +
ejbBundle.getModuleDescriptor().getArchiveUri()
+ ID_SEPARATOR +
id = webEnv.getApplication().getName() + ID_SEPARATOR +
webEnv.getContextRoot();
} else if (env instanceof ApplicationClientDescriptor) {
} else if( env instanceof EjbBundleDescriptor ) {
EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env;
id = "__ejbBundle__" + ID_SEPARATOR + ejbBundle.getApplication().getName() +
ID_SEPARATOR + ejbBundle.getModuleName();
代码示例来源:origin: org.glassfish.main.connectors/connectors-inbound-runtime
/**
* Creates an instance of <code>ConnectorMessageBeanClient</code>
*
* @param descriptor <code>EjbMessageBeanDescriptor</code> object.
*/
public ConnectorMessageBeanClient(EjbMessageBeanDescriptor descriptor) {
this.descriptor_ = descriptor;
allocator_ = new BasicResourceAllocator();
String appName = descriptor.getApplication().getName();
String moduleID = descriptor.getEjbBundleDescriptor().getModuleID();
String beanName = descriptor.getName();
activationName = null;
beanID_ = appName + ":" + moduleID + ":" + beanName;
registry_ = ConnectorRegistry.getInstance();
}
代码示例来源:origin: org.glassfish.main.deployment/dol
id = webEnv.getApplication().getName() + ID_SEPARATOR
+ webEnv.getContextRoot();
if (deplLogger.isLoggable(Level.FINER)) {
id = ejbEnv.getApplication().getName() + ID_SEPARATOR
+ ejbBundle.getModuleDescriptor().getArchiveUri() + ID_SEPARATOR
+ ejbEnv.getName() + ID_SEPARATOR + flattedJndiName
id = webEnv.getApplication().getName() + ID_SEPARATOR
+ webEnv.getContextRoot();
} else if (env instanceof ApplicationClientDescriptor) {
EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env;
id = "__ejbBundle__" + ID_SEPARATOR
+ ejbBundle.getApplication().getName() + ID_SEPARATOR
+ ejbBundle.getModuleName();
代码示例来源:origin: org.glassfish.web/web-glue
String appName = wbd.getApplication().getName();
boolean delegate = true;
com.sun.enterprise.deployment.runtime.web.ClassLoader clBean =
代码示例来源:origin: org.glassfish.main.connectors/connectors-inbound-runtime
if(activationName == null){
String appName = descriptor_.getApplication().getName();
String moduleID = descriptor_.getEjbBundleDescriptor().getModuleID();
int pound = moduleID.indexOf("#");
代码示例来源:origin: org.glassfish.main.common/amx-javaee
parentMBean = registerJ2EEChild(mJ2EEServer.objectName(), meta, J2EEApplication.class, J2EEApplicationImpl.class, application.getName());
top = parentMBean;
内容来源于网络,如有侵权,请联系作者删除!