JClient accessing remote AppModule via EJB Session Fascade (BMT)?
Would appreciate some "how-to" advice on bootstrapping a remote JClient like the one in the VSM example,
such that: the JClient remotely accesses OC4J-pooled AppModule instances,
rather than creating a new AppModule instance on the client side.
In the OTN VSM-JClient example code, the Bootstrap is done in
AdministrativeServiceForm::main() as follows:
JUApplication app =
JUMetaObjectManager.createApplicationObject(
"VSMJClient.AdministrativeService",
null,
new JUEnvInfoProvider() );
String appModule =
System.getProperty("jclient.service",
"VSMJClient.AdministrativeService" );
The problem with this is -
JUMetaObjectManager.createApplicationObject() is undocumented, hence may or may not facilitate remote
App-Module access?
If anyone can share a working example of JClient remote AppModule access over ORMI (talking to modules deployed on JBuilder-embedded-OC4J), or can modify the VSM-JClient to do the same - it would be greatly appreciated!
Many thanks,
Lee.
JUMetaObjectManager.createApplicationObject("VSMJClient.AdministrativeService",null,new JUEnvInfoProvider());
looks for the Session AdministrativeService in VSMJClient.cpx:
<Session
Name="AdministrativeService"
Package="oracle.otnsamples.vsm.services"
Configuration="AdministrativeServiceLocal" >
</Session>
<Session
Name="RemoteAdministrativeService"
Package="oracle.otnsamples.vsm.services"
Configuration="AdministrativeService9iAS" >
</Session>
Just call
JUMetaObjectManager.createApplicationObject("VSMJClient.RemoteAdministrativeService",null,new JUEnvInfoProvider() );
to access the deployed Beans with configuration AdministrativeService9iAS.
Similar Messages
-
Accessing a subnet via VPN session
Hi everybody.
I have not to much experience configuring and managing VPN´s and at this moment I am facing a bit issue. I've got a remote site which is connected to the headquarters via VPN site to site IP Sec tunnel. When I am in my office I have no problem to reach the remote network, but, when I try to connect to the remote network via VPN client, I can't reach it.
in the remote office I've hot a Router 3800 (Cisco IOS Software, 3800 Software (C3845-ADVENTERPRISEK9-M), Version 12.4(13c), RELEASE SOFTWARE (fc2)) in the headquarters I've got an ASA 5520 Version 8.0(3) I've chequed access-list, and network objects and it seems everythink ok.
local network: 10.30.0.0 0.0.0.0
remote network 10.31.0.0 0.0.0.0
ASA
object-group network remote-network
network-object 172.16.27.0 255.255.255.0
network-object 10.31.0.0 255.255.0.0
object-group network network-local
network-object 0.0.0.0 0.0.0.0
access-list VPN_Remote_Access_splitTunnelAcl standard permit 10.31.0.0 255.255.0.0
Router 3800
ip access-list extended vpn
permit ip 10.31.0.0 0.0.255.255 any
Can someone guide me about what is missing in the config? no problem if you need more "sho run" lines.
Regards and Thanks very much!!Hi Ankur, thanks very much for your reply!
this is the "sho run" in my remote router:
I do not undesrtand well your first question, but if it is usefull, I loggin to headquerters "headquerters public ip address"
this is a simple diagram of where I want to connect to:
REMOTE_SITE --------------------------( vpn site to site IP sec tunnel )-------------------------HEADQUERTERS
(10.31.0.0/24 network) (10.30.0.0/16network)
|
|
|
|
REMOTE USER
(10.30.23.130/25)
REMOTESITE#sho run
Building configuration...
Current configuration : 10834 bytes
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
hostname PYASU1ROU01
boot-start-marker
boot-end-marker
logging buffered 64000 debugging
no logging console
aaa new-model
aaa authentication login default group tac-auth local
aaa authentication enable default group tac-auth enable
aaa authorization console
aaa authorization exec default group tac-auth local if-authenticated
aaa authorization network default local
aaa accounting exec default start-stop group tac-auth
aaa session-id common
clock timezone PR -3
ip cef
voice-card 0
no dspfarm
crypto pki trustpoint TP-self-signed-4112391703
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-4112391703
revocation-check none
rsakeypair TP-self-signed-4112391703
crypto pki certificate chain TP-self-signed-4112391703
certificate self-signed 01
30820243 308201AC A0030201 02020101 300D0609 2A864886 F70D0101 04050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
69666963 6174652D 34313132 33393137 3033301E 170D3131 31313234 30323430
34335A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D34 31313233
39313730 3330819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100A09B 8740E68A 0C5BB452 D4D26D1B C91E4B5A 71FF0E11 411D70DB ED09EE4C
95C67911 0DFB9557 EB17CE79 9A3AF1C8 3B4DC1C0 75F6B938 F3431C4D 6DEAB793
A560C0AE 88007146 4312FBDF F979476B AB55CACD 9EE00DAC B3227CD6 9861DE87
DD462212 6E8FDA90 7BEA7967 26FCF6B6 6DDDBD5A A6E3D7F8 12AE4F5E 71BDDEE3
D5130203 010001A3 6B306930 0F060355 1D130101 FF040530 030101FF 30160603
551D1104 0F300D82 0B505941 53553152 4F553031 301F0603 551D2304 18301680
14C86D3D 3AF1854B 977D5BD8 A9ABAF33 4E7483BC 3B301D06 03551D0E 04160414
C86D3D3A F1854B97 7D5BD8A9 ABAF334E 7483BC3B 300D0609 2A864886 F70D0101
04050003 8181005A 5A20ACB9 EE50A66C 054B5449 62A98E5F B42E5193 6D3D71A8
B0949BE2 70BE6F3C 2FAD7E2D AA0FCF6C 4D8E8344 035A33D6 6538EF32 33F8C746
31119E9C F08091A2 9F8DCF8F 1B779D90 82F3366C D0F84D6B AB7E3248 E532E224
91E404E9 608ECF11 5525D52B A02C3D9C 7BC1C1EF 496D1246 1125086B 54EEF4A2
94350AFF EA7CB2
quit
username admin privilege 15 secret 5 $1$P3xv$e99l3YcRWgFPEp/m6uXZg1
username cwuser privilege 15 secret 5 $1$Ir9X$CZgLaFy7XKsmT9avFHTTk/
ip tcp synwait-time 10
ip ssh time-out 60
ip ssh authentication-retries 2
ip ssh version 2
crypto keyring apex
pre-shared-key address "headquerters public ip address"
key apex
crypto isakmp policy 10
encr 3des
authentication pre-share
group 2
crypto isakmp profile companyname
keyring apex
match identity address "headquerters public ip address"
crypto ipsec transform-set esp-aes256-sha esp-aes 256 esp-sha-hmac
crypto ipsec transform-set 3DES esp-3des esp-sha-hmac
crypto map outside 10 ipsec-isakmp
set peer "headquerters public ip address"
set transform-set 3DES
set isakmp-profile companyname
match address vpn-companyname
interface Loopback1
description monitoreo
ip address 10.31.21.255 255.255.255.255
interface GigabitEthernet0/0
description Teysa
ip address public ip address
ip nat outside
no ip virtual-reassembly
load-interval 30
duplex auto
speed auto
media-type rj45
crypto map outside
interface GigabitEthernet0/1
description TO CORE-SW
ip address 192.168.255.249 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
media-type rj45
interface FastEthernet0/0/0
switchport access vlan 2
duplex full
speed 100
interface FastEthernet0/0/1
switchport access vlan 10
shutdown
duplex full
speed 100
interface FastEthernet0/0/2
switchport mode trunk
shutdown
interface FastEthernet0/0/3
switchport access vlan 10
shutdown
duplex full
speed 100
interface Vlan1
no ip address
no ip http server
ip http authentication aaa login-authentication default
ip http authentication aaa exec-authorization default
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat inside source route-map nat interface GigabitEthernet0/0 overload
ip access-list extended nat
deny ip host 172.16.27.236 10.0.0.0 0.255.255.255
deny ip 10.31.0.0 0.0.255.255 10.0.0.0 0.255.255.255
deny ip 172.16.27.0 0.0.0.255 10.0.0.0 0.255.255.255
permit ip 10.31.11.0 0.0.0.255 any
permit ip 10.31.13.0 0.0.0.255 any
permit ip 172.16.27.0 0.0.0.255 host 209.59.188.93
permit ip 172.16.27.0 0.0.0.255 host 190.180.145.46
permit ip 172.16.27.0 0.0.0.255 host 46.51.171.127
permit ip 172.16.27.224 0.0.0.31 any
ip access-list extended vpn-apex
permit ip 10.50.20.0 0.0.1.255 any
permit ip 172.16.27.0 0.0.0.255 any
permit ip 10.31.0.0 0.0.255.255 any
permit ip 10.30.0.0 0.0.255.255 any
route-map nat permit 10
match ip address nat
control-plane
line con 0
password 7 xxxxxxxxxx
stopbits 1
line aux 0
stopbits 1
line vty 0 4
password 7 xxxxxxxxxx
scheduler allocate 20000 1000
ntp server 10.30.5.38
end
REMOTESITE#
Regards! -
Access Remote Webservice via Internet
Hi all,
Iam new to Web Services ...
Could any of u give me an Article or Code ... how could we access a basic webservice from Java ..... which is available remotly.
plz help me .. tks in advance...abp_JavaPrg@mdu wrote:
I got the same error while I trying to connect the server in that port via ssh.I know ssh is "the new telnet", but I did not say telnet to be retro. ssh does encryption stuff, telnet does not. For checking that a port is open and (if the server sends at least the handshake in a human readable format) checking that the server you think is running is running telnet is a better option.
From the sounds of it the application you think is running is not running. -
Trying to access remote switch via VLAN1 (which is shutdown)...
We were trying some things to get multiple VLANs to pass through some wireless bridges. In the confusion, we have misconfigured the port and locked ourselves out of the far switch, lol. The local switch has VLAN1 (default), VLAN2 (data), and VLAN3 (voice). None of the VLANs are shutdown and the switch has an interface for both VLAN2 and VLAN3. The remote switch also has VLAN1, VLAN2, and VLAN3 (and it has an interface for VLAN2 and VLAN3). However, VLAN1 is shutdown. The port used to connect it to the local switch has always been using VLAN2. In the midst of some changes, that port got changed to VLAN1 :( We can no longer access the remote switch at all. It does still show up in cdp neighbors on the local switch (although it says VLAN1 mismatch). Is there anyway we can get back into the remote switch without having someone go on site and perform a power cycle? Thanks.
Here is the email from Planet Networing:
About your inquiry:
I have two WNAP-6305 bridges connecting two Cisco switches. The Cisco switches are configured for trunking, but only one VLAN is being passed through the bridges. Every other bridge that I've worked with will allow all VLANs to pass through. Is there a way to allow that with these units?
Answer:
The WNAP-6305’s SDK didn’t support tagged VLAN, so only the default VLAN can be passed through the WDS bridge.
We’ll suggest you use WNAP-6350. -
Accessing Jini Services via EJB
Does anyone out there have a good link to a website or tutorial where I might find an example of how to talk to Jini via an EJB?
see your jini post
-
Can't access remote speakers through airtunes
I used to be able to access remote speakers via iTunes through my airport express. Now there isn't even a button offering the choice. I have set I tunes to look for remote speakers.
If I connect directly to the PowerMac all is good.
Did a firmware update to the Airport and am running iTunes 6.0.2
Any ideas?i installed AE Firmware 6.3. that did not really help, but didn't cause further problems as well..
i tried deleting preferences files, dit not really help either
i then downloaded the 10.4.4 Combo installer from Apples Website and after that I had my buttons for the remote speakers again.
i had the SAME problem after EVERY upgrade of iTunes in the past!!! VERY annoying -
Can time capsule be accessed remotely
Can time capsule be accessed remotely? Via macbook pri on another wifi network
Just google for this one.. there are loads of video on utube etc..
The answer is yes.. but it depends as all things do..
BTMM and iCloud is designed for remote access to TC and Mac.
http://support.apple.com/kb/HT3486
The TC has to be the main router in the network..
The remote network must not block the protocols required for connection.. -
BC4J, JSP, accesing a remote app module deployed as an 8i EJB session bean
hi everybody,
i am reposting this question since the thread went somewhat off-topic ...
i have successfully deployed my Jdev 3.2 developed app module to my remote 8.1.7 db server as an EJB session bean
i am able to test it via the Business Components Tester ...
i am also able to test it from my wizard-generated Business Components JSP App using DataWebBeans ...
but when i try to access it from a JSP data tag page I get the following error:
Excepcisn:
javax.servlet.jsp.JspException: JBO-28300: Piggyback read error
void periodoswebtags_html.PeriodoView_Browse._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.jsp.app.JspApplication.dispatchRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.doDispatch(oracle.jsp.app.JspRequestContext)
void oracle.jsp.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.lite.web.JupServlet.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
void oracle.lite.web.MimeServletHandler.handle(oracle.lite.web.JupApplication, java.lang.String, int, oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
void oracle.lite.web.JupApplication.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
void oracle.lite.web.JupHandler.handle(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
void oracle.lite.web.HTTPServer.process(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
boolean oracle.lite.web.HTTPServer.handleRequest(oracle.lite.web.JupInputStream, oracle.lite.web.JupOutputStream)
boolean oracle.lite.web.JupServer.handle(oracle.lite.web.JupInputStream, oracle.lite.web.JupOutputStream)
void oracle.lite.web.SocketListener.process(java.net.Socket)
void oracle.lite.web.SocketListener$ReqHandler.run()
and the JBO-28300 error is undocumented ... :(
i have included a library containing the <mybcs>CommonEJB.jar and <myappmodule>EJBClient.jar files into my JSP projects
the JSP data tag page is a wizard-generated trivial browse page
TIA,
phi everybody,
just fixed ... :) ...
i added the following libraries to my JSP data tag project and everythig works fine ...
Oracle XML Parser 2.0
JBO Runtime
SQLJ Runtime
HTH,
p -
SJSAS 9.1 does not expose EJB 3.0 remote Interface via JNDI
I have successfully deployed a simple Stateful EJB 3.0 bean (CartBean, like the one in the Java EE 5 tutorial remote interface Cart) on SJSAS 9.1, located on machine host1.
After I deployed the CartBean, I browsed the SJSAS and noticed the existence of the following JNDI entries:
ejb/Cart
ejb/Cart__3_x_Internal_RemoteBusinessHome__
ejb/Cart#main.Cart
ejb/mgmt
ejb/myOtherEJB_2_x_bean ( +myOtherEJB_2_x_bean+ is a different 2.x bean that I have deployed as well)So, I am trying to access the remote interface of the CartBean from a remote machine, host2. The client application is a Java-standalone client.
I am using the Interoperable Naming Service syntax: corbaname:iiop:host1:3700#<JNDI name>
The problem is that the remote interface of the bean does NOT seem to be available via JNDI. I get the javax.naming.NameNotFoundException when I try to do a lookup like:
corbaname:iiop:host1:3700#ejb/Cart
On the other hand, the following lookups succeed:
corbaname:iiop:host1:3700#ejb/mgmt
corbaname:iiop:host1:3700#myOtherEJB_2_x_bean
and also the following succeeds:
corbaname:iiop:host1:3700#ejb/Cart__3_x_Internal_RemoteBusinessHome__So it seems like the Remote interface is not available via JNDI, rather only some internal SJSAS implementation (the object returned from the ejb/Cart__3_x_Internal_RemoteBusinessHome__ lookup is of type: com.sun.corba.se.impl.corba.CORBAObjectImpl
Why is this happening? I know there used to be a bug in Glassfish, but I thought it had been fixed since 2006.
Many thanks in advance, any help would be greatly appreciated.The EJB 3.0 Remote Business references are not directly stored in CosNaming. EJB 3.0 Remote references do not have the cross-vendor interoperability requirements that the EJB 2.x Remote view had.
You can still access Remote EJB references from a different JVM as long as the client has access to SJSAS naming provider. Please see our EJB FAQ for more details :
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html -
How to access the Remote Appserver thru EJB
hi friends...
How to access the Remote appserver thru EJB from a Portlet.
I've tried but its not working u have any idea Plz help me out...
The scenario is I have my portal running in my machine & appserver(weblogic) running in remote and want to access that appserver
thru Remote EJB from my portal. I have tried with the t3 protocol and iiop but it is not working
The code i have use
Properties props = new Properties();
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
props.put(javax.naming.Context.PROVIDER_URL, "t3://10.1.87.46:7031");
it is giving me a nullpointer exception when i try to access the method in the ejb , it is not able to call that method...
Plz help me out to resolve this situation
Thnx in Advance.....SanjayBala, just so you know that it is possible to create a database link in Oracle to non-Oracle databases in some circumstances. Look up Generic Connectivity aslo know as Heterogenous Services. With 11g Oracle has basically renamed the feature and replaced it with somethinkg named ike DG4ODBC.
I have not spent time studying the details for DB4ODBC but with HS Oracle provided the interface and you had to obtain the necessary ODBC driver on your own. I had Oracle on AIX reading and writing to SQL Server on Windows but the developers chose to write a java program and connect to both via it. On Windows and Linux platforms the necessary ODBC drivers might be available without the requirement to go out and purchase one.
The Oracle Open Gateway product is an advanced version of the above features with drivers for specific non-Oracle databases included like DB2 or Informix.
HTH -- Mark D Powell -- -
Do I need to run DNS on a colo server being accessed remotely via VPN?
My Mac Mini Server is located in a colo site. We generally use it for Web, email and a couple of application-specific services. It has a dedicated IP address. We have a separate DNS service we use to point to the domains on the server located remotely from the server. Forward and reverse lookups work fine from the server, even though the local DNS service is turned off.
However, we now have a couple of things we want to access remotely on the server via VPN (for example, some files via AFP). The firewall blocks remote AFP requests (using the built-in firewall, not a separate box). We can connect via VPN without problems. However, AFP does not work. If I allow AFP in the firewall and try to connect, no problems at all.
Since the Mini is located by itself and will never likely have anything connected to a "local network" (never running DHCP, etc.), there generally doesn't seem to be a need to run DNS on the server.
I suspect the problem is that when you VPN into the server you are on its "local network", whatever that means, so the DNS does not resolve since the local DNS service is not running. However, I am not positive of this.
Must we run local DNS? Does it have to mirror the remote DNS that we currently reference? Can we somehow "reference" the local DNS from VPN clients trying to access local services?
I hope this question makes some sense.Bear with me please....
The Mac Mini is in a data center on a shelf, getting a direct connection to the Internet via ethernet with a fixed IP address (under the covers, I suspect that the data center is using some sort of router or switch, but I am not paying for a hardware firewall or other gateway). There is no local network for the Mini. It is not running DHCP, not handing out NAT addresses, etc. DNS is currently off. Rather than using the local DNS, the Mini is resolving its DNS needs with a DNS server located at another site, over the Internet. This seems to work fine (i.e., changeip confirms it is working and services seem to work).
I am currently using the software firewall built into SLS.
I want to turn on VPN so that remotely located computers can access services on the Mini without having to make the services visible through the firewall.
I am able to connect devices via VPN with little difficulty (iPhones, Macs, etc.). However, when I try to access services (let's use AFP as an example), I cannot access them UNLESS they are allowed through the firewall. This tells me that I am not seeing the services through the VPN, but rather through the Internet directly.
What I meant by "local network" is that the VPN allocates local IP addresses when devices log into the VPN service (10.0.x.x). There is no DHCP allocating these addresses, just VPN.
My question is: why can I not see the services on the Mini blocked by the firewall when successfully logged into VPN on the server? Isn't the whole point of the VPN to gain access to services behind the firewall?
I am guessing (with no particular information to support my thesis) that somehow without DNS running on the Mini, VPN clients are unable to access services on the Mini. I do not know for sure, however, if this is the problem. If it IS a problem, then the question is whether I should completely copy the DNS entries from the remote DNS server to the Mini and start the service. Will that solve the issue? Create conflicts with the DNS (since it is now located on both a remote service and on the Mini)? It certainly will create a maintenance headache since now I will have to maintain the DNS in both places.
I am hesitant to migrate all of my DNS services to the Mini (because I will also have to go to the domain registrars to change where they point, etc.) to eliminate the remote one. And I am not sure it will solve this problem anyway.
Sorry for all of the typing! -
Using service Locator pattern to dynamically access remote EJBs
Hi All,
Please help to guide me how I can use a service locator to retrieve a remote object (residing on another application but on same domain) .
I do not want to use Dependency Injection since I want to dynamically discover them ( there are many implementations of same interface (POJO)). Each EJB implementation implements its own remote/local interface that extends this global POJO interface.
I have two J2ee-Applications on same domain. J2EE-Application 1 has an EJB module (EJB Module 1) that intends to access an EJB Module (EJB Module 2) in J2EE-Application 2. Following observations:
1. Dependency Injection fails if (include the EJB Module 2 jar in J2EE-Application 1). Reason App Server complains the EJB has been deployed (Deployment fails)
2. Dependency Injection works if (exclude the EJB Module 2 jar in J2EE-Application 1) and include the Remote Interface in EJB Module 1(J2EE-Application 1).Positive Observation (Deployment success and DI also success)
3.Using Service Locator to retrieve the remote object if (exclude the EJB Module 2 jar in J2EE-Application 1) and include the Remote Interface in EJB Module 1(J2EE-Application 1). Negative and Positive Observation.
Positive Observation: Using dependency injection I can still retrieve the Remote Object
Another Positive: The Service Locator remote lookup to another Bean in same Application but different EJB Module is successful.
Negative Observation:
The Service Locator lookup to this same remote object with Successful Dependency Injection fails (An Ejb in a different application).
Can't retrieve the Remote Object with Service Locator. Message from Server:.
NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial.
Thanks in advance"I do not want to use Dependency Injection since I want to dynamically discover them ( there are many implementations of same interface (POJO))"
If you're calling ejbs from other ejbs or servlets, the same could probably be acomplished by using dependency injection (@EJB) in a number of instance variables typed with different remote/local interfaces or even with different beanName attributes (for when more than one bean implements the same managed interface in the same app - not sure how it works outside the same jee app...) , and dinamically selecting one of them; or encapsulating those injected variables into a stateless ejb as your service locator to make them accessible from POJOs too (which, due to concurrent acess, wouldn't work for statefull ejbs references...).
Anyway, using the jndi lookup service locator pattern seems ok in this case.
What doesn't seem ok, given the nature of the error for the negative observation - jndi context initialization - is that
Another Positive: The Service Locator remote lookup to another Bean in same Application but different EJB Module is successful.
Can you check your code and reconfirm that you're using the same context initialization code for both the positive and negative observations ? -
Unable to call exported client methods of EJB session bean remote interface
I am unable to call client methods of a BC4J application module deployed as a Session EJB to Oracle 8i at the client side of my multi-tier application. There is no documentation, and I am unable to understand how I should do it.
A business components project has been created. For instance, its application module is called BestdataModule. A few custom methods have been added to BestdataModuleImpl.java file, for instance:
public void doNothingNoArgs() {
public void doNothingOneArg(String astr) {
public void setCertificate(String userName, String userPassword) {
theCertificate = new Certificate(userName, userPassword);
public String getPermission() {
if (theCertificate != null)
{if (theCertificate.getPermission())
{return("Yes");
else return("No, expired");
else return("No, absent");
theCertificate being a protected class variable and Certificate being a class, etc.
The application module has been tested in the local mode, made remotable to be deployed as EJB session bean, methods to appear at the client side have been selected. The application module has been successfully deployed to Oracle 8.1.7 and tested in the remote mode. A custom library containing BestdataModuleEJBClient.jar and BestDataCommonEJB.jar has been created.
Then I try to create a client basing on Example Oracle8i/EJB Client snippet:
package bestclients;
import java.lang.*;
import java.sql.*;
import java.util.*;
import javax.naming.*;
import oracle.aurora.jndi.sess_iiop.*;
import oracle.jbo.*;
import oracle.jbo.client.remote.ejb.*;
import oracle.jbo.common.remote.*;
import oracle.jbo.common.remote.ejb.*;
import oracle.jdeveloper.html.*;
import bestdata.client.ejb.*;
import bestdata.common.ejb.*;
import bestdata.common.*;
import bestdata.client.ejb.BestdataModuleEJBClient;
public class BestClients extends Object {
static Hashtable env = new Hashtable(10);
public static void main(String[] args) {
String ejbUrl = "sess_iiop://localhost:2481:ORCL/test/TESTER/ejb/bestdata.BestdataModule";
String username = "TESTER";
String password = "TESTER";
Hashtable environment = new Hashtable();
environment.put(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
environment.put(Context.SECURITY_PRINCIPAL, username);
environment.put(Context.SECURITY_CREDENTIALS, password);
environment.put(Context.SECURITY_AUTHENTICATION, ServiceCtx.NON_SSL_LOGIN);
BestdataModuleHome homeInterface = null;
try {
Context ic = new InitialContext(environment);
homeInterface = (BestdataModuleHome)ic.lookup(ejbUrl);
catch (ActivationException e) {
System.out.println(e.getMessage());
e.printStackTrace();
System.exit(1);
catch (CommunicationException e) {
System.out.println(e.getMessage());
e.printStackTrace();
System.exit(1);
catch (NamingException e) {
System.out.println(e.getMessage());
e.printStackTrace();
System.exit(1);
try {
System.out.println("Creating a new EJB instance");
RemoteBestdataModule remoteInterface = homeInterface.create();
// Method calls go here!
// e.g.
// System.out.println(remoteInterface.foo());
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
It doesnt cause any errors. However, how must I call methods? The public interface RemoteBestdataModule has no such methods:
void doNothingNoArgs();
void doNothingOneArg(java.lang.String astr);
void setCertificate(java.lang.String userName, java.lang.String userPassword);
java.lang.String getPermission();
Instead of that it has the following methods:
oracle.jbo.common.remote.PiggybackReturn doNothingNoArgs(byte[] _pb) throws oracle.jbo.common.remote.ejb.RemoteJboException, java.rmi.RemoteException;
oracle.jbo.common.remote.PiggybackReturn doNothingOneArg(byte[] _pb, java.lang.String astr) throws oracle.jbo.common.remote.ejb.RemoteJboException, java.rmi.RemoteException;
oracle.jbo.common.remote.PiggybackReturn customQueryExec(byte[] _pb, java.lang.String aQuery) throws oracle.jbo.common.remote.ejb.RemoteJboException, java.rmi.RemoteException;
oracle.jbo.common.remote.PiggybackReturn setCertificate(byte[] _pb, java.lang.String userName, java.lang.String userPassword) throws oracle.jbo.common.remote.ejb.RemoteJboException, java.rmi.RemoteException;
oracle.jbo.common.remote.PiggybackReturn getPermission(byte[] _pb) throws oracle.jbo.common.remote.ejb.RemoteJboException, java.rmi.RemoteException;
I cannot call those methods. I can see how they are called in BestdataModuleEJBClient.java file:
public void doNothingNoArgs() throws oracle.jbo.JboException {
try {
oracle.jbo.common.remote.PiggybackReturn _pbRet = mRemoteAM.doNothingNoArgs(getPiggyback());
processPiggyback(_pbRet.mPiggyback);
if (_pbRet.isReturnStreamValid()) {
return;
catch (oracle.jbo.common.remote.ejb.RemoteJboException ex) {
processRemoteJboException(ex);
catch (java.rmi.RemoteException ex) {
processRemoteJboException(ex);
throw new oracle.jbo.JboException("Marshall error");
However, I cannot call getPiggyback() function! It is a protected method, it is available to the class BestdataModuleEJBClient which extends EJBApplicationModuleImpl, but it is unavailable to my class BestClients which extends Object and is intended to extend oracle.jdeveloper.html.WebBeanImpl!
It seems to me that I mustnt use RemoteBestdataModule interface directly. Instead of that I must use the public class BestdataModuleEJBClient that extends EJBApplicationModuleImpl and implements BestdataModule interface. It contains all methods required without additional arguments (see just above). However, how must I create an object of BestdataModuleEJBClient class? That is a puzzle. Besides my custom methods the class has only two methods:
protected bestdata.common.ejb.RemoteBestdataModule mRemoteAM;
/*This is the default constructor (do not remove)*/
public BestdataModuleEJBClient(RemoteApplicationModule remoteAM) {
super(remoteAM);
mRemoteAM = (bestdata.common.ejb.RemoteBestdataModule)remoteAM;
public bestdata.common.ejb.RemoteBestdataModule getRemoteBestdataModule() {
return mRemoteAM;
It looks like the remote application module must already exist! In despair I tried to put down something of the kind at the client side:
RemoteBestdataModule remoteInterface = homeInterface.create();
BestdataModuleEJBClient dm = new BestdataModuleEJBClient(remoteInterface);
dm.doNothingNoArgs();
Of course, it results in an error.
System Output: null
System Error: java.lang.NullPointerException
System Error: oracle.jbo.common.PiggybackOutput oracle.jbo.client.remote.ApplicationModuleImpl.getPiggyForRemovedObjects(oracle.jbo.common.PiggybackOutput) (ApplicationModuleImpl.java:3017)
System Error: byte[] oracle.jbo.client.remote.ApplicationModuleImpl.getPiggyfront(boolea
System Error: n) (ApplicationModuleImpl.java:3059)
System Error: byte[] oracle.jbo.client.remote.ApplicationModuleImpl.getPiggyback() (ApplicationModuleImpl.java:3195)
System Error: void bestdata.client.ejb.BestdataModuleEJBClient.doNothingNoArgs() (BestdataModuleEJBClient.java:33)
System Error: void bes
System Error: tclients.BestClients.main(java.lang.String[]) (BestClients.java:76)
I have studied a lot of documents in vain. I have found only various senseless discourses:
"Use the Application Module Wizard to make the Application Module remotable and export the method. This will generate an interface for HrAppmodule (HrAppmodule.java in the Common package) which contains the signature for the exported method promoteAllEmps(). Then, deploy the Application Module. Once the Application Module has been deployed, you can use the promoteAllEmps() method in your client-side programs. Calls to the promoteAllEmps() method in client-side programs will result in calls to the promote() method in the application tier."
However, I have failed to find a single line of code explaining how it should be called.
Can anybody help me?
Best regards,
Svyatoslav Konovaltsev,
[email protected]
nullDear Steven,
1. Thank you very much. It seems to me that the problem is solved.
2. "I logged into Metalink but it wants me to put in both a tar number and a country name to see your issue." It was the United Kingdom, neither the US nor Russia if you mean my issue.
I reproduce the text to be written by everyone who encounters the same problem:
package bestclients;
import java.util.Hashtable;
import javax.naming.*;
import oracle.jbo.*;
public class BestdataHelper {
public static ApplicationModule createEJB()
throws ApplicationModuleCreateException {
ApplicationModule applicationModule = null;
try {
Hashtable environment = new Hashtable(8);
environment.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
environment.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_EJB);
environment.put(Context.SECURITY_PRINCIPAL, "TESTER");
environment.put(Context.SECURITY_CREDENTIALS, "TESTER");
environment.put(JboContext.HOST_NAME, "localhost");
environment.put(JboContext.CONNECTION_PORT, new Integer("2481"));
environment.put(JboContext.ORACLE_SID, "ORCL");
environment.put(JboContext.APPLICATION_PATH, "/test/TESTER/ejb");
Context ic = new InitialContext(environment);
ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup("bestdata.BestdataModule");
applicationModule = home.create();
applicationModule.getTransaction().connect("jdbc:oracle:kprb:@");
applicationModule.setSyncMode(ApplicationModule.SYNC_IMMEDIATE);
catch (NamingException namingException) {
throw new ApplicationModuleCreateException(namingException);
return applicationModule;
package bestclients;
import bestdata.common.*;
import certificate.*;
public class BestClients extends Object {
public static void main(String[] args) {
BestdataModule bestdataModule = (BestdataModule)BestdataHelper.createEJB();
Certificate aCertificate = new Certificate("TESTER", "TESTER");
//calling a custom method!!
bestdataModule.passCertificate(aCertificate);
Thank you very much,
Best regards,
Svyatoslav Konovaltsev.
[email protected]
null -
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my web
service with a declarative security model by implementing steps provided in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. When prompted
to accept the digital certificate, click Yes, when prompted for network
authentication information, enter username and password, navigate to the
Test Form tab of Test View, invoke the method by clicking the button and I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I tested my
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order to get
that working. Has anyone seen similar behavior? Is there a known resolution?
Or a suggested way to work around the problem?
Thank you.
AndreAndre,
It would be best if this issue is handled as an Eval Support case. Please
BEA Customer Support at http://support.beasys.com along with the required
files, and request that an Eval support case be created for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Anurag,
I removed "t3", still get an error but a different one (Unable to create
InitialContext:null):
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
.jws:67) </jwErrorDetail>
</detail>
</error>
Note: inter-domain communication is configured properly. The Web Service to
remote EJB works fine without a declarative security.
Any other ideas?
Thank you for your help.
Andre
"Anurag" <[email protected]> wrote in message
news:[email protected]...
Andre,
It seems you are using the URL
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
whereas you should not be specifying the "t3:" protocol.
The URL should be like
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
Please do let me know if you see any issues with this.
Note that this will only allow you to access remote EJBs in the same WLS
domain. For accessing EJBs on another domain, you need to configure
inter-domain communication by
following a few simple steps as mentioned at
http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
been provided in the EJB Control Workshop documentation.
Regards,
Anurag
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Raj,
I tried that before, it didn't help. I got similar error message:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
ing>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
Anything else should I try?
P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
restricted.
I hope there is a solution.
Thanks,
Andre
"Raj Alagumalai" <[email protected]> wrote in message
news:[email protected]...
Andre,
Can you try using the following url with username and password
jndi://username:password@host:7001/my.resource.jndi.object ?
once you add webapp level security, the authenticated is the user who
invokes the EJB.
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
CreatingANewEJBControl.html?skipReload=true
has more info on using remote EJB's.
Hope this helps.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Alla Resnik" <[email protected]> wrote in message
news:[email protected]...
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my
web
service with a declarative security model by implementing steps
provided
in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. Whenprompted
to accept the digital certificate, click Yes, when prompted for
network
authentication information, enter username and password, navigate tothe
Test Form tab of Test View, invoke the method by clicking the buttonand
I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during
JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I testedmy
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order
to
get
that working. Has anyone seen similar behavior? Is there a knownresolution?
Or a suggested way to work around the problem?
Thank you.
Andre -
Access directory in remote server via SAP GUI
Dear experts:
My servers are with windows server 2003 OS, I want to access directories in a remote server via SAP GUI(in tcode AL11).
I have shared the directory in the remote server, and grant full control authrization to everyone. Then I map a driver to the shared diretory on SAP server,and I can open the diretory successfully. But when I add this diretory to SAP-directories(through tcode AL11), I can't open it in SAP GUI, when I doudle click on this directory, the error message occurs on the status bar:"Wrong order of calls <- CALL opendir: Not a directory(,,..)"
How can I fix this problem? Thanks!> I have shared the directory in the remote server, and grant full control authrization to everyone. Then I map a driver to the shared diretory on SAP server,and I can open the diretory successfully.
Please note:
Driver letters are user dependent. So if you map the drive as administrator or <sid>adm it's not available for user SAPService<SID> (the user running the SAP system).
So the best thing to access directory is using UNC names like
\\<servername>\<share>
not drive letters.
Markus
Maybe you are looking for
-
Processo de recebimento de mercadorias em consignação industrial
Bom dia amigos, Alguém tem o processo de entrada de mercadorias em consignação industrial implementado e funcionando no SAP ? Pelo que vimos, ele trata tudo na mesma conta de estoque da empresa, e também não tem um processo standard para devolução si
-
Playlists grouped in folders not showing up in iTunes Match
Is this for real? Do I really have to give up years of curation, because iTunes Match can't open a folder of grouped playlists? I'm loving how the cloud side works, but this would be completely lame.
-
So i forgot the pass code to my Ipod and have fully disabled my Ipod, it is telling me to connect to Itunes to unlock it but i no longer own the computer that i first connected it to, what do i do?
-
Multiple message types for an idoc type
Hi all, I created one custom idoc type with six segments. I heard that one idoc type can have any number of message types if it is so pls tell me how to assign these two message types for my idoc . i want to create multiple message types because i wa
-
Hi Enhancing an APEX v3 App. The Report export to CSV link on a number formatted with FML999G999G999G999G990D00 format produces output prefixed with £ instead of £ Any suggestions? Ade