本文整理了Java中com.sun.enterprise.deployment.Application.getRegistrationName()
方法的一些代码示例,展示了Application.getRegistrationName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getRegistrationName()
方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称:Application
方法名:getRegistrationName
[英]Returns the registration name of this application.
[中]返回此应用程序的注册名称。
代码示例来源:origin: org.glassfish.ejb/ejb-container
/**
* return the name of the application to which the bean belongs
* it will be the j2ee app name if the bean is part of a j2ee app
* it will be the ejb module name if the bean is a stand-alone ejb module
*/
private String getApplicationName() {
Application application = _ejbDescriptor.getApplication();
return application.getRegistrationName();
}
代码示例来源:origin: org.glassfish.security/security
private String getAppId() {
return wbd.getApplication().getRegistrationName();
}
代码示例来源:origin: org.glassfish.main.security/security-ee
private String getAppId() {
return wbd.getApplication().getRegistrationName();
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Return the resource object corresponding to the supplied name or throw an illegal argument exception.
*/
public ResourceReferenceDescriptor getResourceReferenceByName(String name) {
for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next();
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoresourcerefbyname",
"This app {0} has no resource reference by the name of {1}",
new Object[]{getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Return the resource object corresponding to the supplied name or throw an illegal argument exception.
*/
public ResourceReferenceDescriptor getResourceReferenceByName(String name) {
for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next();
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoresourcerefbyname",
"This app {0} has no resource reference by the name of {1}",
new Object[]{getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Returns the environment property object searching on the supplied key.
* throws an illegal argument exception if no such environment property exists.
*/
public EnvironmentProperty getEnvironmentPropertyByName(String name) {
for (Iterator itr = this.getEnvironmentProperties().iterator(); itr.hasNext();) {
EnvironmentProperty ev = (EnvironmentProperty) itr.next();
if (ev.getName().equals(name)) {
return ev;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoenvpropertybyname",
"This app {0} has no environment property by the name of {1}",
new Object[]{getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.deployment/dol
/**
* Return a reference to another ejb by the same name or throw an IllegalArgumentException.
*/
public JmsDestinationReferenceDescriptor getJmsDestinationReferenceByName(String name) {
for (Iterator itr = this.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
JmsDestinationReferenceDescriptor jdr = (JmsDestinationReferenceDescriptor) itr.next();
if (jdr.getName().equals(name)) {
return jdr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnojmsdestrefbyname",
"This app {0} has no resource environment reference by the name of {1}",
new Object[] {getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Returns the environment property object searching on the supplied key.
* throws an illegal argument exception if no such environment property exists.
*/
public EnvironmentProperty getEnvironmentPropertyByName(String name) {
for (Iterator itr = this.getEnvironmentProperties().iterator(); itr.hasNext();) {
EnvironmentProperty ev = (EnvironmentProperty) itr.next();
if (ev.getName().equals(name)) {
return ev;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoenvpropertybyname",
"This app {0} has no environment property by the name of {1}",
new Object[]{getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.main.deployment/dol
/**
* Return a reference to another ejb by the same name or throw an IllegalArgumentException.
*/
public ResourceEnvReferenceDescriptor getResourceEnvReferenceByName(String name) {
for (Iterator itr = this.getResourceEnvReferenceDescriptors().iterator(); itr.hasNext();) {
ResourceEnvReferenceDescriptor jdr = (ResourceEnvReferenceDescriptor) itr.next();
if (jdr.getName().equals(name)) {
return jdr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionapphasnoresourceenvrefbyname",
"This app {0} has no resource environment reference by the name of {1}",
new Object[] {getRegistrationName(), name}));
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
String getTimedObjectApplicationName() {
EjbDescriptor ejbDesc = container_.getEjbDescriptor();
Application app = ejbDesc.getApplication();
return (app != null) ? app.getRegistrationName() : "";
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
String getTimedObjectApplicationName() {
EjbDescriptor ejbDesc = container_.getEjbDescriptor();
Application app = ejbDesc.getApplication();
return (app != null) ? app.getRegistrationName() : "";
}
代码示例来源:origin: org.glassfish.security/security
public static String getContextID(WebBundleDescriptor wbd) {
String cid = null;
if (wbd != null ) {
//String moduleId = wbd.getUniqueFriendlyId();
cid = VersioningUtils.getRepositoryName(wbd.getApplication().getRegistrationName()) +
'/' + wbd.getUniqueFriendlyId();
}
return cid;
}
代码示例来源:origin: org.glassfish.main.security/security-ee
public static String getContextID(WebBundleDescriptor wbd) {
String cid = null;
if (wbd != null ) {
//String moduleId = wbd.getUniqueFriendlyId();
cid = VersioningUtils.getRepositoryName(wbd.getApplication().getRegistrationName()) +
'/' + wbd.getUniqueFriendlyId();
}
return cid;
}
代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-support-ejb
/**
* Create GeneratorException for this message key.
* @param key the message key in the bundle.
* @param bundle the ejb bundle.
* @param e the Exception to use for the message.
* @return GeneratorException.
*/
public static GeneratorException createGeneratorException(
String key, EjbBundleDescriptor bundle, Exception e) {
return new GeneratorException(I18NHelper.getMessage(
messages, key,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle),
e.getMessage()));
}
代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-support-ejb
/**
* Create GeneratorException for this message key and bean name.
* @param key the message key in the bundle.
* @param bundle the ejb bundle.
* @return GeneratorException.
*/
public static GeneratorException createGeneratorException(
String key, String beanName, EjbBundleDescriptor bundle) {
return new GeneratorException(I18NHelper.getMessage(
messages, key, beanName,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle)));
}
代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-support-ejb
/**
* Create GeneratorException for this message key.
* @param key the message key in the bundle.
* @param bundle the ejb bundle.
* @return GeneratorException.
*/
public static GeneratorException createGeneratorException(
String key, EjbBundleDescriptor bundle) {
return new GeneratorException(I18NHelper.getMessage(
messages, key,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle)));
}
代码示例来源:origin: org.glassfish.deployment/dol
public String getModuleName() {
String moduleName = null;
// for standalone jars, return its registration name
// for applications, return the module uri
if (getApplication().isVirtual()) {
moduleName = getApplication().getRegistrationName();
} else {
moduleName = getModuleDescriptor().getArchiveUri();
}
return moduleName;
}
代码示例来源:origin: org.glassfish.main.deployment/dol
public String getModuleName() {
String moduleName = null;
// for standalone jars, return its registration name
// for applications, return the module uri
if (getApplication().isVirtual()) {
moduleName = getApplication().getRegistrationName();
} else {
moduleName = getModuleDescriptor().getArchiveUri();
}
return moduleName;
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor,
ComponentType compType) {
this.container = container;
this.ejbDescriptor = descriptor;
this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null
: ejbDescriptor.getApplication().getRegistrationName();
String archiveuri = ejbDescriptor.getEjbBundleDescriptor()
.getModuleDescriptor().getArchiveUri();
this.modName = com.sun.enterprise.util.io.FileUtils
.makeFriendlyFilename(archiveuri);
this.ejbName = ejbDescriptor.getName();
this.componentType = compType;
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor,
ComponentType compType) {
this.container = container;
this.ejbDescriptor = descriptor;
this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null
: ejbDescriptor.getApplication().getRegistrationName();
String archiveuri = ejbDescriptor.getEjbBundleDescriptor()
.getModuleDescriptor().getArchiveUri();
this.modName = com.sun.enterprise.util.io.FileUtils
.makeFriendlyFilename(archiveuri);
this.ejbName = ejbDescriptor.getName();
this.componentType = compType;
}
内容来源于网络,如有侵权,请联系作者删除!