| Line 9... |
Line 9... |
| 9 |
import java.util.Hashtable;
|
9 |
import java.util.Hashtable;
|
| 10 |
import java.util.Properties;
|
10 |
import java.util.Properties;
|
| 11 |
<XDtEjbIntf:ifRemoteEjb>
|
11 |
<XDtEjbIntf:ifRemoteEjb>
|
| 12 |
import java.util.Date;
|
12 |
import java.util.Date;
|
| 13 |
import javax.rmi.PortableRemoteObject;
|
13 |
import javax.rmi.PortableRemoteObject;
|
| 14 |
import org.jboss.security.SecurityContextAssociation;
|
- |
|
| - |
|
14 |
|
| 15 |
</XDtEjbIntf:ifRemoteEjb>
|
15 |
</XDtEjbIntf:ifRemoteEjb>
|
| 16 |
|
16 |
|
| 17 |
<XDtConfig:ifConfigParamEquals paramName="includeGUID" value="true">
|
17 |
<XDtConfig:ifConfigParamEquals paramName="includeGUID" value="true">
|
| 18 |
import java.net.InetAddress;
|
18 |
import java.net.InetAddress;
|
| 19 |
import java.security.SecureRandom;
|
19 |
import java.security.SecureRandom;
|
| Line 104... |
Line 104... |
| 104 |
|
104 |
|
| 105 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
105 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
| 106 |
// <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_obtain_ic"/>
|
106 |
// <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_obtain_ic"/>
|
| 107 |
Properties properties = new Properties();
|
107 |
Properties properties = new Properties();
|
| 108 |
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
|
108 |
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
|
| 109 |
if (SecurityContextAssociation.getPrincipal() != null)
|
- |
|
| 110 |
{
|
- |
|
| 111 |
properties.put("remote.connection.default.username", SecurityContextAssociation.getPrincipal().toString());
|
- |
|
| 112 |
properties.put("remote.connection.default.password", SecurityContextAssociation.getCredential().toString());
|
- |
|
| 113 |
}
|
- |
|
| 114 |
else
|
- |
|
| 115 |
{
|
- |
|
| 116 |
properties.put("remote.connection.default.username", "anonymous");
|
- |
|
| 117 |
properties.put("remote.connection.default.password", "");
|
- |
|
| 118 |
}
|
- |
|
| 119 |
|
- |
|
| 120 |
InitialContext initialContext = new InitialContext(properties);
|
109 |
InitialContext initialContext = new InitialContext(properties);
|
| 121 |
try {
|
110 |
try {
|
| 122 |
java.lang.Object objRef = initialContext.lookup(<XDtEjbHome:homeInterface type="remote"/>.JNDI_NAME);
|
111 |
java.lang.Object objRef = initialContext.lookup(<XDtEjbHome:homeInterface type="remote"/>.JNDI_NAME);
|
| 123 |
cachedRemoteHome = (<XDtEjbHome:homeInterface type="remote"/>) PortableRemoteObject.narrow(objRef, <XDtEjbHome:homeInterface type="remote"/>.class);
|
112 |
cachedRemoteHome = (<XDtEjbHome:homeInterface type="remote"/>) PortableRemoteObject.narrow(objRef, <XDtEjbHome:homeInterface type="remote"/>.class);
|
| 124 |
} finally {
|
113 |
} finally {
|