| 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 java.util.*;
|
| - |
|
15 |
import org.apache.log4j.*;
|
| 14 |
|
16 |
|
| 15 |
</XDtEjbIntf:ifRemoteEjb>
|
17 |
</XDtEjbIntf:ifRemoteEjb>
|
| 16 |
|
18 |
|
| 17 |
<XDtConfig:ifConfigParamEquals paramName="includeGUID" value="true">
|
19 |
<XDtConfig:ifConfigParamEquals paramName="includeGUID" value="true">
|
| 18 |
import java.net.InetAddress;
|
20 |
import java.net.InetAddress;
|
| Line 22... |
Line 24... |
| 22 |
/**
|
24 |
/**
|
| 23 |
* <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="utility_class_for" arguments="<XDtEjb:ejbName/>"/>
|
25 |
* <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="utility_class_for" arguments="<XDtEjb:ejbName/>"/>
|
| 24 |
<XDtClass:classCommentTags indent="0"/> */
|
26 |
<XDtClass:classCommentTags indent="0"/> */
|
| 25 |
public class <XDtClass:classOf><XDtEjbUtilObj:utilClass/></XDtClass:classOf>
|
27 |
public class <XDtClass:classOf><XDtEjbUtilObj:utilClass/></XDtClass:classOf>
|
| 26 |
{
|
28 |
{
|
| - |
|
29 |
private static Logger log = Logger.getLogger( <XDtClass:classOf><XDtEjbUtilObj:utilClass/></XDtClass:classOf>.class );
|
| 27 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
30 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
| 28 |
<XDtEjbIntf:ifRemoteEjb>
|
31 |
<XDtEjbIntf:ifRemoteEjb>
|
| 29 |
/** Date threshold - when seeking a remote access control server, fail immediately if this value is set and is in the future */
|
32 |
/** Date threshold - when seeking a remote access control server, fail immediately if this value is set and is in the future */
|
| 30 |
private static Date seekThreshold = null;
|
33 |
private static Date seekThreshold = null;
|
| 31 |
/** <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_cached_remote"/> */
|
34 |
/** <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_cached_remote"/> */
|
| Line 83... |
Line 86... |
| 83 |
jndiProperties = jp;
|
86 |
jndiProperties = jp;
|
| 84 |
}
|
87 |
}
|
| 85 |
catch ( java.io.IOException x )
|
88 |
catch ( java.io.IOException x )
|
| 86 |
{
|
89 |
{
|
| 87 |
// fail
|
90 |
// fail
|
| - |
|
91 |
log.error("ERROR:",x);
|
| 88 |
}
|
92 |
}
|
| 89 |
}
|
93 |
}
|
| 90 |
}
|
94 |
}
|
| 91 |
|
95 |
|
| 92 |
if ( jndiProperties != null )
|
96 |
if ( jndiProperties != null )
|
| 93 |
{
|
97 |
{
|
| - |
|
98 |
log.error(" -- jndiProperties is not null---");
|
| 94 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
99 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
| 95 |
cachedRemoteHome = getHome( jndiProperties );
|
100 |
cachedRemoteHome = getHome( jndiProperties );
|
| 96 |
</XDtConfig:ifConfigParamEquals>
|
101 |
</XDtConfig:ifConfigParamEquals>
|
| 97 |
<XDtConfig:ifConfigParamNotEquals paramName="cacheHomes" value="true">
|
102 |
<XDtConfig:ifConfigParamNotEquals paramName="cacheHomes" value="true">
|
| 98 |
return getHome( jndiProperties );
|
103 |
return getHome( jndiProperties );
|
| 99 |
</XDtConfig:ifConfigParamNotEquals>
|
104 |
</XDtConfig:ifConfigParamNotEquals>
|
| 100 |
}
|
105 |
}
|
| 101 |
else
|
106 |
else
|
| 102 |
{
|
107 |
{
|
| - |
|
108 |
log.error(" -- jndiProperties is null---");
|
| 103 |
</XDtClass:ifHasClassTag>
|
109 |
</XDtClass:ifHasClassTag>
|
| 104 |
|
110 |
|
| 105 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
111 |
<XDtConfig:ifConfigParamEquals paramName="cacheHomes" value="true">
|
| 106 |
// <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_obtain_ic"/>
|
112 |
// <XDtI18n:getString bundle="xdoclet.modules.ejb.XDocletModulesEjbMessages" resource="util_obtain_ic"/>
|
| 107 |
Properties properties = new Properties();
|
113 |
Properties properties = new Properties();
|
| Line 343... |
Line 349... |
| 343 |
InitialContext initialContext =null;
|
349 |
InitialContext initialContext =null;
|
| 344 |
try
|
350 |
try
|
| 345 |
{
|
351 |
{
|
| 346 |
Properties properties = new Properties();
|
352 |
Properties properties = new Properties();
|
| 347 |
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
|
353 |
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
|
| - |
|
354 |
properties.putAll(this.environment);
|
| 348 |
initialContext = new InitialContext(properties);
|
355 |
initialContext = new InitialContext(properties);
|
| 349 |
java.lang.Object objRef = initialContext.lookup(<XDtEjbHome:homeInterface type="remote"/>.JNDI_NAME);
|
356 |
java.lang.Object objRef = initialContext.lookup(<XDtEjbHome:homeInterface type="remote"/>.JNDI_NAME);
|
| 350 |
home = (<XDtEjbHome:homeInterface type="remote"/>) PortableRemoteObject.narrow(objRef, <XDtEjbHome:homeInterface type="remote"/>.class);
|
357 |
home = (<XDtEjbHome:homeInterface type="remote"/>) PortableRemoteObject.narrow(objRef, <XDtEjbHome:homeInterface type="remote"/>.class);
|
| 351 |
|
358 |
|
| 352 |
synchronized( this )
|
359 |
synchronized( this )
|
| 353 |
{
|
360 |
{
|