Identity propagation with EJB

How to propagation identity to Remote EJB if client application is not deployed on WLS, but just standalone application.
I found some document on the web in regards to identity propagation with remote EJB ( EJB security mechanisms)
I follow it and have the following code:
package oracle.bpel.services.workflow.samples;
import java.security.Principal;
import java.security.PrivilegedExceptionAction;
import java.util.List;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginContext;
import weblogic.security.auth.callback.URLCallback;
import oracle.bpel.services.workflow.client.WorkflowServiceClientFactory;
import oracle.security.jps.util.SubjectUtil;
public class RemoteWFClientWithIdentityPropagationSample {
public void runRemoteClient() {
try {
PrivilegedExceptionAction<List> privilegedExceptionAction = new PrivilegedExceptionAction<List>() {
public List run() throws Exception {
for (Principal pr : SubjectUtil.getCurrentSubject().getPrincipals()) {
System.out.println("Current Principals: " + pr.getName());
return RemoteWFClientSample.runWithUserPropagation(WorkflowServiceClientFactory.REMOTE_CLIENT); // it calls Remote EJB
SampleCallbackHandler handler = new SampleCallbackHandler("jcooper", "welcome1", "t3://stapj73.us.oracle.com:7001");
LoginContext loginContext = new LoginContext("Sample",handler);
loginContext.login();
Subject subject = loginContext.getSubject();
List result = (List) Subject.doAs(subject, privilegedExceptionAction);
System.out.println("runRemoteClient is " + result);
} catch (Exception e) {
System.out.println("Error occur");
e.printStackTrace();
class SampleCallbackHandler implements CallbackHandler {
private String uname = null;
private String passwd = null;
private String url = null;
public SampleCallbackHandler(String uname, String passwd, String url) {
this.uname = uname;
this.passwd = passwd;
this.url = url;
public void handle(Callback[] callbacks) throws
java.io.IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof NameCallback) {
NameCallback nc = (NameCallback) callbacks;
nc.setName(uname);
} else if (callbacks[i] instanceof URLCallback) {
URLCallback uc = (URLCallback) callbacks[i];
uc.setURL(url);
} else if (callbacks[i] instanceof PasswordCallback) {
PasswordCallback pc = (PasswordCallback) callbacks[i];
pc.setPassword(passwd.toCharArray());
} // for
} // handle()
public static void main(String args[]) {
RemoteWFClientWithIdentityPropagationSample sample = new RemoteWFClientWithIdentityPropagationSample();
sample.runRemoteClient();
I run test with JVM system option : -Djava.security.auth.login.config=C:\Work\JavaTry\login.conf
where C:\Work\JavaTry\login.conf has the following lines:
Sample {
weblogic.security.auth.login.UsernamePasswordLoginModule required
debug=false;
Client shows pincipals in the Subject:
But still, on server side sessionContext.getCallerPrincipal() returns '<anonymous>' instead of 'jcooper'
What is wrong now?

OK I have got a little further.
code snippetString contextServiceURL = "corbaloc:iiop:10.230.180.69:7002/NameService";
Hashtable table = new Hashtable();
table.put(InitialContext.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
table.put(InitialContext.PROVIDER_URL, contextServiceURL);
InitialContext context = new InitialContext(table);
Object ref = context.lookup("ejb.myejbRemoteHome");
myejbRemoteHome home = (myejbRemoteHome)PortableRemoteObject.narrow(ref, myejbRemoteHome.class);
myejbRemote obj = home.create();
obj.testUnsecureMethod();
obj.testSecureMethod();
<<<<<<<<
The unsecure call works fine, the secure call gives me:
java.rmi.AccessException: CORBA NO_PERMISSION 0 Maybe; nested exception is:
     org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: Maybe
If i set defaultiiop username and password in WebLogic under Environment -> Server -> protocals -> IIOP to weblogic/password then the secure call works. This makes me think that the Subject is not propagating properly.
In the request in Tomcat I have a GenericPrincipal with user and group info. In the Session i have a Subject with only WLSUserImpl, but not the WLSGroupImpl's that I expect. They are there when the login happes, I see the weblogic Authenticate method populate the subject with the groups okay.
Any help much appreicated.
Edited by lnoton at 04/24/2008 2:56 AM
Edited by lnoton at 04/24/2008 2:57 AM

Similar Messages

  • Error when run page with EJB + ADF

    hello
    when i run one page with EJB+ ADF give me this error:
    <15/Set/2009 17H35m WEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1253032513131' for task '0'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(Application-EJBModel-ejb)
    weblogic.application.ModuleException: Exception preparing module: EJBModule(Application-EJBModel-ejb)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class valtex.java.ejb.entities.Team] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         Truncated. see log file for complete stacktrace
    >
    <15/Set/2009 17H35m WEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'Application'.>
    <15/Set/2009 17H35m WEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Exception preparing module: EJBModule(Application-EJBModel-ejb)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class valtex.java.ejb.entities.Team] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         Truncated. see log file for complete stacktrace
    >
    weblogic.application.ModuleException: Exception preparing module: EJBModule(Application-EJBModel-ejb)
    #### Deployment incomplete. #### Sep 15, 2009 5:35:14 PM
    oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
    Caused by: oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
         ... 12 more
    #### Cannot run application Application due to error deploying to DefaultServer.
    [Application Application stopped and undeployed from Server Instance DefaultServer]
    <15/Set/2009 17H43m WEST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=HomePage1.>
    what's means this error???
    thanks
    Miguel Teixeira

    I have a problem when running
    the following is the error report
    *** Using port 7101 ***
    C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
    PATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\native;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\Oracle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Nero\Lib\;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -da -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.07\DEFAUL~1 -Doracle.home=C:\Oracle\MIDDLE~1\JDEVEL~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\Oracle\MIDDLE~1\JDEVEL~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.security.jps.config=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.07\DEFAUL~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.alternateTypesDirectory=C:\Oracle\MIDDLE~1\JDEVEL~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\JDEVEL~1\modules\oracle.oamprovider_11.1.1 -Dsso.filter.enable=true -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic.Server
    <23/09/2009 05:20:57 PM COT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar>
    <23/09/2009 05:20:58 PM COT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 11.0-b16 from Sun Microsystems Inc.>
    <23/09/2009 05:20:59 PM COT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.1.0 Wed Jun 10 22:24:41 MDT 2009 1227385 >
    <23/09/2009 05:21:03 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <23/09/2009 05:21:03 PM COT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <23/09/2009 05:21:03 PM COT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <23/09/2009 05:21:03 PM COT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log00007. Log messages will continue to be logged in C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log.>
    <23/09/2009 05:21:03 PM COT> <Notice> <Log Management> <BEA-170019> <The server log file C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <23/09/2009 05:21:11 PM COT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <23/09/2009 05:21:13 PM COT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\access.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <23/09/2009 05:21:13 PM COT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\access.log00003. Log messages will continue to be logged in C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\access.log.>
    <23/09/2009 05:21:17 PM COT> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddi was not deployed. Error: [Deployer:149158]No application files exist at 'C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddi.war'.>
    <23/09/2009 05:21:17 PM COT> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddiexplorer was not deployed. Error: [Deployer:149158]No application files exist at 'C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddiexplorer.war'.>
    <23/09/2009 05:21:20 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <23/09/2009 05:21:20 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <23/09/2009 05:21:23 PM COT> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application HR_EJB_JPA_App is not versioned.>
    23/09/2009 05:21:23 PM oracle.mds.internal.lcm.logging.MDSLCMLogger info
    INFO: Identificador de Aplicación : HR_EJB_JPA_App
    23/09/2009 05:21:23 PM oracle.mds.internal.lcm.logging.MDSLCMLogger info
    INFO: "Servicios de Metadatos: Archivo de metadatos (MAR) no encontrado."
    23/09/2009 05:21:23 PM JpsApplicationLifecycleListener Migrate Application Credential Store
    ADVERTENCIA: Overwriting credentials is allowed in application credential store migration with Weblogic server running in Development Mode and system property 'jps.app.credential.overwrite.allowed' set to true
    [EL Finer]: 2009-09-23 17:21:26.427--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Searching for default mapping file in file:/C:/Users/Administrador/AppData/Roaming/JDeveloper/system11.1.1.1.33.54.07/o.j2ee/drs/HR_EJB_JPA_App/HR_EJB_JPA_App-EJBModel-ejb/
    [EL Finer]: 2009-09-23 17:21:26.481--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Searching for default mapping file in file:/C:/Users/Administrador/AppData/Roaming/JDeveloper/system11.1.1.1.33.54.07/o.j2ee/drs/HR_EJB_JPA_App/HR_EJB_JPA_App-EJBModel-ejb/
    [EL Config]: 2009-09-23 17:21:26.53--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The access type for the persistent class [class oracle.Departments] is set to [FIELD].
    [EL Config]: 2009-09-23 17:21:26.531--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The alias name for the entity class [class oracle.Departments] is being defaulted to: Departments.
    [EL Config]: 2009-09-23 17:21:26.531--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The table name for entity [class oracle.Departments] is being defaulted to: DEPARTMENTS.
    [EL Config]: 2009-09-23 17:21:26.534--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The access type for the persistent class [class oracle.Employees] is set to [FIELD].
    [EL Config]: 2009-09-23 17:21:26.535--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The alias name for the entity class [class oracle.Employees] is being defaulted to: Employees.
    [EL Config]: 2009-09-23 17:21:26.535--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The table name for entity [class oracle.Employees] is being defaulted to: EMPLOYEES.
    [EL Config]: 2009-09-23 17:21:26.543--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The column name for element [private java.lang.String oracle.Employees.email] is being defaulted to: EMAIL.
    [EL Config]: 2009-09-23 17:21:26.544--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The column name for element [private java.lang.Double oracle.Employees.salary] is being defaulted to: SALARY.
    [EL Config]: 2009-09-23 17:21:26.544--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the one to many mapping element [private java.util.List oracle.Departments.employeesList] is being defaulted to: class oracle.Employees.
    [EL Config]: 2009-09-23 17:21:26.544--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the many to one mapping element [private oracle.Departments oracle.Employees.departments] is being defaulted to: class oracle.Departments.
    [EL Config]: 2009-09-23 17:21:26.545--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The primary key column name for the mapping element [private oracle.Departments oracle.Employees.departments] is being defaulted to: DEPARTMENT_ID.
    [EL Config]: 2009-09-23 17:21:26.545--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the many to one mapping element [private oracle.Employees oracle.Departments.employees] is being defaulted to: class oracle.Employees.
    [EL Config]: 2009-09-23 17:21:26.545--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The primary key column name for the mapping element [private oracle.Employees oracle.Departments.employees] is being defaulted to: EMPLOYEE_ID.
    [EL Config]: 2009-09-23 17:21:26.545--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the one to many mapping element [private java.util.List oracle.Employees.departmentsList] is being defaulted to: class oracle.Departments.
    [EL Config]: 2009-09-23 17:21:26.546--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the many to one mapping element [private oracle.Employees oracle.Employees.employees] is being defaulted to: class oracle.Employees.
    [EL Config]: 2009-09-23 17:21:26.546--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The primary key column name for the mapping element [private oracle.Employees oracle.Employees.employees] is being defaulted to: EMPLOYEE_ID.
    [EL Config]: 2009-09-23 17:21:26.546--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--The target entity (reference) class for the one to many mapping element [private java.util.List oracle.Employees.employeesList] is being defaulted to: class oracle.Employees.
    [EL Finer]: 2009-09-23 17:21:26.547--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Class [oracle.Departments] registered to be processed by weaver.
    [EL Finer]: 2009-09-23 17:21:26.547--ServerSession(30842787)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Class [oracle.Employees] registered to be processed by weaver.
    23/09/2009 05:21:34 PM oracle.mds.internal.lcm.logging.MDSLCMLogger info
    INFO: Identificador de Aplicación : wsm-pm
    23/09/2009 05:21:34 PM oracle.mds.internal.lcm.logging.MDSLCMLogger info
    INFO: "Servicios de Metadatos: Archivo de metadatos (MAR) no encontrado."
    23/09/2009 05:21:38 PM oracle.adf.share.config.ADFConfigFactory getInstance
    INFO: ADF Config instance implementation in use is : oracle.adf.share.config.MDSConfigFactory
    23/09/2009 05:21:46 PM oracle.adf.mbean.share.connection.ConnectionsRuntimeMXBeanImpl getNonCachedConnectionsContext
    INFO: Registering Connection Runtime MBean
    23/09/2009 05:21:46 PM oracle.adf.share.jndi.MDSBackingStore isReadOnlyMDSStore
    INFO: Read only backing store
    23/09/2009 05:21:47 PM oracle.adf.share.jndi.MDSBackingStore isReadOnlyMDSStore
    INFO: Read only backing store
    23/09/2009 05:21:47 PM oracle.adf.share.jndi.MDSBackingStore isReadOnlyMDSStore
    INFO: Read only backing store
    <23/09/2009 05:21:50 PM COT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <23/09/2009 05:21:50 PM COT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log00006. Log messages will continue to be logged in C:\Users\Administrador\AppData\Roaming\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log.>
    <23/09/2009 05:21:50 PM COT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    23/09/2009 05:21:51 PM oracle.wsm.audit.Auditor <init>
    INFO: Created J2EE application auditor for componentType=oracle.security.jps.internal.audit.AuditServiceImpl$Auditor@213b6e
    23/09/2009 05:21:55 PM oracle.adf.share.config.ADFMDSConfig parseADFConfiguration
    INFO: Configuration file:/META-INF/adf-config.xmlcannot not be read by MDS. Reading directly from the classpath
    <23/09/2009 05:21:55 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <23/09/2009 05:21:55 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[6]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:246d:98bd:32fc:bf08:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:790b:d0ee:a329:57db:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[5]" is now listening on 0:0:0:0:0:0:0:1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on fe80:0:0:0:28a5:117:3611:5367:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on fe80:0:0:0:0:5efe:c0a8:66:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.0.102:7101 for protocols iiop, t3, ldap, snmp, http.>
    <23/09/2009 05:21:55 PM COT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <23/09/2009 05:21:55 PM COT> <Warning> <Server> <BEA-002611> <Hostname "Crht-PC", maps to multiple IP addresses: 192.168.0.102, fe80:0:0:0:246d:98bd:32fc:bf08%12, fe80:0:0:0:28a5:117:3611:5367%13>
    <23/09/2009 05:21:56 PM COT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <23/09/2009 05:21:56 PM COT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    [Running application Application9 on Server Instance DefaultServer...]
    DefaultServer startup time: 64580 ms.
    DefaultServer started.
    <23/09/2009 05:22:08 PM COT> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application Application9 is not versioned.>
    23/09/2009 05:22:08 PM JpsApplicationLifecycleListener Migrate Application Credential Store
    ADVERTENCIA: Overwriting credentials is allowed in application credential store migration with Weblogic server running in Development Mode and system property 'jps.app.credential.overwrite.allowed' set to true
    <23/09/2009 05:22:09 PM COT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1253744528059' for task '0'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(Application9-Project1-ejb)
    weblogic.application.ModuleException: Exception preparing module: EJBModule(Application9-Project1-ejb)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    Exception [EclipseLink-28010] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: PersistenceUnitInfo Project1 has transactionType JTA, but doesnt have jtaDataSource.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.jtaPersistenceUnitInfoMissingJtaDataSource(EntityManagerSetupException.java:154)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:798)
         at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:216)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:343)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:323)
         Truncated. see log file for complete stacktrace
    >
    <23/09/2009 05:22:09 PM COT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'Application9'.>
    <23/09/2009 05:22:09 PM COT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Exception preparing module: EJBModule(Application9-Project1-ejb)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    Exception [EclipseLink-28010] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: PersistenceUnitInfo Project1 has transactionType JTA, but doesnt have jtaDataSource.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.jtaPersistenceUnitInfoMissingJtaDataSource(EntityManagerSetupException.java:154)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:798)
         at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:216)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:343)
         at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:323)
         Truncated. see log file for complete stacktrace
    >
    [05:22:09 PM] Weblogic Server Exception: weblogic.application.ModuleException: Exception preparing module: EJBModule(Application9-Project1-ejb)
    [05:22:09 PM] Caused by: java.lang.Throwable: Substituted for missing class Exception [EclipseLink-28010] (Eclipse Persistence Services - 1.1.1.v20090430-r4097) - org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: PersistenceUnitInfo Project1 has transactionType JTA, but doesnt have jtaDataSource.
    [05:22:09 PM] See server logs or server console for more details.
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed[05:22:10 PM] #### Deployment incomplete. ####
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:341)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:235)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:442)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$6$1.run(AdrsStarter.java:1469)
    Caused by: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:483)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:332)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:465)
         ... 12 more
    #### Cannot run application Application9 due to error deploying to DefaultServer.
    [Application Application9 stopped and undeployed from Server Instance DefaultServer]
    Please help me!!
    thnks!!

  • Can I have two identical PCs with clones of the same hard drive?

    This all started when I had a problem with my first pc, a gateway laptop, would not wake up from sleep due to, supposedly, a driver problem. I didn't want to send it off for my free, under-warrantee, repair and be without a computer for however long that
    would take. So I bought another one and took it to a local dealer to clone the hard drive of the first one to put on the new one.
    This created a number of odd problems which eventually I figured out had something to do, it seemed, with Microsoft not allowing two identical machines to exist like that. I only plan to use one, the other one being exclusively for backup or in case something
    happened to the first. But I think the problems occurred when I tried to switch back and forth, to do some texting.
    Is there a way I can accomplish this?
    Thanks.

    Until Windows 7, it was possible to use two identical PCs with same clone. Provided, both the PCs must be legally licensed to use the Windows operating system (version as well as edition) and of same OEM, model and spec. This is possible because, the product
    keys are common for all the PCs of same OEM build (if preinstalled, and the installed product key is different from the one mentioned in COA). This made OEM builders to distribute to more PCs than the license agreement, which is impossible for Microsoft to
    find out. To solve this issue, Microsoft changed the licensing structure from Windows 8 - embedding the product key in BIOS. So, here, only the installation is provided and the product keys are not common for all the PCs even if they are of the same OEM build.
    Therefore, cloning fails here. And naturally, as Team Zigzag and EC Ltd say, same product key can't be used for more than one PC.
    As to restore the PC in case of an emergency, you can perform a backup of the existing installed software and user files, which can be restored later (File History in Windows 8). The following links may be helpful:
    http://windows.microsoft.com/en-us/windows-8/what-happened-to-backup-restore
    http://blogs.technet.com/b/keithmayer/archive/2013/09/17/backup-amp-recovery-of-windows-8-windows8-itpro-tipoftheday.aspx#.UkC-hmLrbIU
    Balaji Kundalam

  • How to use ADF Query search with EJB 3.0

    Hi,
    In ADF guide http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_search_bc.htm#CIHIJABA
    The steps to create query search with ADF Business Components says:
    "+From the Data Controls panel, select the data collection and expand the Named Criteria node to display a list of named view criteria.+"
    But with EJB, I'm not able to find Named Criteria node. Can we use ADF query search component with EJB? If yes, can you please show me some example, tutorial etc.?
    Thanks
    BJ

    For EJBs you'll need to implement the query model on your own.
    An example of how the model should look like is in the ADF Faces components demo.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/query.jspx
    Code here:
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html

  • Bean-managed transaction with EJB 3.0

    Hi,
    I try to get a bean-managed transaction example running with EJB 3.0 under GlassFish v2ur2.
    In order to demarcate the scenario I have to get me the UserTransaction which I get from the SessionContext. I would like to use it then like: UserTransaction ut = context.getUserTransaction();
    I tried to get the SessionContext with the help of the EJB method setSessionContext which should be called by the container after instance creation.
    However, setting a log output into that method does not show any call of this method.
    So, how can I get this method called or is there another way to get the SessionContext for the UserTransaction to work ?
    Are there any good and fully implemented examples for bean-managed transactions ?
    Thanks for your help.
    Regards

    I found the solution for that my SessionContext was NULL and I could not use the UserTransaction.
    The reason for it is that I injected the EJB with @EJB into my servlet and did a MyBean mybean = new MyBean();
    That leads to a SessionContext which is NULL within my EJB.
    If I use it without instantiating it it works fine.
    Again, thanks for your help. At least it pointed me into the right direction.
    Regards

  • Problem with EJB skeleton classloader

    Hi
    We have been migrating an enterprise application from Weblogic 7 to 9.2 and experienced strange problem with EJBs. Our EAR contains (beside the other elements) an EJB module with EJBs and some common POJO classes inside. At the deploy and run phase everything seems working fine, but when the remote client invokes a method which receives one of the common classes as a parameter we get ClassNotFoundException on the server side (talking precisely, the exception is thrown from the EJB skeleton, trying to unmarshall the parameter).
    It seems that our EJB's skeletons do not see the classes from EAR. We have tried moving the common classes to the APP-INF/lib directory or placing them at the root of EAR archive and adding reference in Manifest file of EJB module and it won't help.
    The only workaround we've found is to add the missing classes to the server classpath but this is unacceptable (however, it works).
    We are not using any custom classloader hierarchy.
    The other JARs have no problem loading the content of our EJB module (including the common classes, which cause the problem).
    So, why is the RMI classloader ommiting our application contents?

    The problem was fixed by upgrading to version 9.2.1

  • How to master good design with EJB and JSP?

    I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?

    You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.

  • JSF combined with EJB, how??

    Hi @ll,
    I have been trying for some days to combine my JSF pages with EJB Session Beans, but I haven't really found a working way to do it.
    First, I had my session bean directly as the backing bean for the JSF page, but I read somewhere that this isn't "allowed", so I created a helper bean as managed bean. This is now the backing bean for the jsf page and has as attribute the session bean.
    My helper bean:
    public class ManagedHelperBean {
    @EJB private JDDACReaderBeanRemote reader;
    public JDDACReaderBeanRemote getReader() {
         return reader;
    public void setReader(JDDACReaderBeanRemote reader) {
         this.reader = reader;
    }Part of my faces-config.xml
    <managed-bean>
    <managed-bean-name>helper</managed-bean-name>
    <managed-bean-class>com.company.ManagedHelperBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>Part of my jsp page:
    <h:outputText value="#{helper}"/>
    <h:outputText value="#{helper.reader}"/>Now, the first output in the jsp page works, the second one doesn't. Why can't the property reader be accessed?? What is the correct way to combine JSF with EJB?
    Kind regards,
    Wiebke

    Hello,
    I faced the same problem, but on a Weblogic 10 server.
    The problem with Weblogic 10 is, even if it's "supposed" to be a EE5 compliant server, it is not.
    As described here http://e-docs.bea.com/wls/docs100/webapp/annotateservlet.html , there is no Dependency Injection in JSF managed beans:
    The web container will not process annotations on classes like Java Beans and other helper classes.
    But, WL 10 offers DI on Servlets, Filters and Listeners.
    Here is how I solved it (probably not the best way, but it works for me):
    - created a filter with a list of EJB injected (as it works). For every filtered request, set a list of known (enum) as request attributes mapped each to a EJB service:
    public class EJBInjectFilter implements Filter {
    @EJB
    private MyEJBService ejbRef;
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException,
                   ServletException {
    log.debug("Setting EJB ref into request as attribute ");
              req.setAttribute(ServiceEnum.MY_EJB_SERVICE.toString(), ejbRef);
              chain.doFilter(req, resp);     
    - for every managed bean who needs a service you can do something like:
    (MyEJBService) ((HttpServletRequest) FacesContext.getCurrentInstance().
                   getExternalContext().getRequest()).getAttribute(ServiceEnum.MY_EJB_SERVICE.toString())
    to get a reference to service.
    I agree it is a totally not elegant solution. But why does WL 10 say it's a full JEE5 compliant server, and though does not provide DI for managed beans?
    A drawbacks I could think of is performance slow-down (for every request, apply filter, set list of attributes + references into request) - probably it does take some time.
    Let me know your thoughts.
    Edited by: cosminj on Nov 20, 2007 8:16 AM

  • Creating library file with ejb

    Can anyone suggest me the process by which we can create a library file with ejb? I am new to the ejb environment and i need some guidance regarding this.

    Could you be more specific about what you mean by library file? Are you asking about how to package classes used by ejb components outside of the ejb-jar itself?
    --ken                                                                                                                                                                                                                                                                                                                                                       

  • Do i have to use JNDI with EJBS?

    Hi
    I want to use JNDI to lookup a system which i will send messages to using JMS. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JNDI it is always in relation to EJBs. Can i only use JNDI with EJBS?
    If i can use JNDI is there anything important i need to know about.
    Thanks in advance!
    San H.

    You can definitely use JNDI outside of EJB's - in particular, it's a great interface for dealing with LDAP servers, even securely, and can also be used for DNS interfacing, COS, RMI registries, etc.
    While JNDI was chosen as the method by which J2EE components can locate other components in a distributed environment, it's by no means limited to that task :) It's a wonderful API, and in terms of things you need to know, most everything is covered fairly well at the JNDI tutorial in the various trails that are mapped out there.
    http://java.sun.com/products/jndi/tutorial/
    Good luck!
    James
    James Manning | Principal Engineer
    Porivo Technologies, Inc.
    919.806.0566 | [email protected]
    http://www.porivo.com/
    Measuring end-to-end Web performance.
    Register for a FREE Performance appraisal:
    http://www.porivo.com/peerReview/eval.html

  • Do i have to use JMS with EJBS?

    Hi
    I want to use JMS as a messaging system (a queue) between my system and someone elses. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JMS i always hear it in relation to EJBs. Can i only use JMS with EJBS?
    If i can use JMS is there anything important i need to know about.
    Thanks in advance!
    San H.

    As far as I understand you are use JNDI and JMS is not bound with EJB's. These are java API's which are independent. Like JDBC you can use with Servlets, Applets, standalone applications, EJB, JMS etc etc.......
    In the same way you can use JNDI and JMS with diferent API. And the important feature of Java is that all java API interact with each other when these are independent. I would appricate comments of everyone......................Thanks

  • How to use Java WebStart with EJB ?

    hi forum...
    how to use Java WebStart with EJB ? examples ?
    thanks
    mindu

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • EJBs with .ejb extension

    Please let me know when/how/where can i have EJBs with .ejb extension?

    It's a Weblogic thing. The tool mentioned in the linked post, EJBgen, is similar to XDoclet in that you use special annotations in a single file that is parsed to generate all of the EJB interfaces. The .ejb suffix is commonly used for these files.

  • How integrate JAAS with EJB Server?

    I want to use JAAS to create a security Handler for an open source EJB Server. Does anyone have some suggestions on how best to integrate this with EJB's (using EJB 1.1 for now)?
    Any ideas, or problems you might see, or things to be careful of are all welcome!

    Weblogic 6 actually provides this as an example. They use JAAS login modules for authentication purposes. I don't think this integration is too difficult. In integrating authorization I believe they just delegate to one of their security realms.

  • How update with EJB

    Hi all,
    is it possible to update with EJB CMP?? If yes... how?
    Thanks,
    Vito

    Hi Vito,
    Why not, we can do that. Please refer some of the awesome links as i am listing below,
    Concepts of CMP:
    http://www.caucho.com/resin-3.0/cmp/tutorial/index.xtp
    http://java.sun.com/products/jdo/JDOCMPFAQ.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d5db590-0201-0010-dd93-9ec216811b9e
    Some examples and source code :
    http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/CMP-RI.html
    http://java.sun.com/developer/technicalArticles/ebeans/EJB20CMP/index.html
    I hope these will be good enough clear your doubts, if feel necessary reply back.
    Regards,
    Guru.

Maybe you are looking for

  • Background/ broweser fill not showing up in preview

    In the website I am currenlt building I tried adding a picture as the browser fill, it shows the result in the workspace but when I press preview or even preview in browser the background does not show up it is just the default grey. Even if I take t

  • ALDSP 3.2 - How to create JMS message from ALDSP

    Is there a way to write a jms message from ALDSP? I want to be able to perform database updates to a database and also write a message to queue in a transaction. Thanks

  • Kernal Panic & Immediate shutdown

    Hello. I have had my Macbook Pro shut down on me 3 times now. A gray screen appears and a power down button appears in the middle of my screen and in about 5 different languages says something like, "You must shut down the computer". I can't do anyth

  • Word 2008 probs

    I am trying to save a word doc that I have to submit as a TAFE assignment and I am having problems freezing everything in its place. For instance pictures and themes when re opened on a different computer to the one it was created on seem to shift, m

  • Plant and fi

    hi, we understand that plant is not needed in fi. may i know what is the reason? thanks rgds