Re: Deploy OJB in WebLogic Server - HELP!?!

2003-04-02 Thread Jem McCombe
Phew!

Have just fiugured this out.

The repository username/password must be the **weblogic** permissioned 
user, not Oracle user.

Sonow I have a functioning PBSessionBean, but when I try and commit an 
abject it isn't persisted to Oracle (gr!)

Here's the relevant method in PBSessionBean  whcih runs fine without errors 
BUT the object doesn't get persisted -

public Object storeObject(Object object)
{
PersistenceBroker broker = null;
try
{
System.out.println("getting broker");
broker = getBroker();
if (broker!=null) {
System.out.println("GOT broker");
} else {
System.out.println("NOT got  broker");
}
System.out.println("storing obj");
broker.beginTransaction();
broker.store(object);
broker.commitTransaction();
System.out.println("object stored!!!");
}
catch (Exception e) {
e.printStackTrace(System.out);
System.out.println("yikes and ojb error");
}
finally
{
if (broker != null) broker.close();
}
return object;
}


Help! (again)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Deploy OJB in WebLogic Server - HELP!?!

2003-04-02 Thread Jem McCombe
At 22:36 18/03/2003 +0100, Christophe Lombart wrote:
Just to complete the information provided by Lucy, you can find here how 
to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
I think  Thomas should be interested to receive this small install guide 
for weblogic (Tested only on Weblogic 7):
I'm getting close to my wits end with problems using OJB PB 1.0 rc1 in 
Weblogic 7 against Oracle 8.1.7 via Type 4 Oracle jdbc driver. If anyone 
could help shed some light on this, it would be very much appreciated!

I've followed Christophe/Lucy's instructions, tweaked the existing jboss 
samples but am getting a weird error message :

SQLException thrown while trying to get Connection from Datasource 
(prodConnectionPool) User: system, failed to be authenticated.

In WL 7, I've adapted the fileRealm.properties to allow everyone 
reset/reserve access on this datasource on this host (everything's running 
locally). The same datasource also works just fine when called via my JNDI 
test harness. And I can connect using the users credentials below via plain 
JDBC.

But accessing the datasource via OJB causes a huge stack trace (at very 
bottom).

Fyi, the repository file looks like this -


jcd-alias="default"
default-connection="true"
platform="Oracle"
jdbc-level="2.0"
jndi-datasource-name="prodConnectionPool"
username="system"
password="manager"
eager-release="false"
batch-mode="false"
useAutoCommit="0"
ignoreAutoCommitExceptions="false"
   >
   
   
   
  

<02-Apr-03 18:55:08 BST>   <000360> 
UNNING mode>
ejbCreate was called
[org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR: 
SQLException thrown while trying to get Connection from Datasource 
(prodConnectionPool) User: system, failed to be authenticated.
java.sql.SQLException: User: system, failed to be authenticated.
at 
weblogic.jdbc.common.internal.RmiDataSource.getSubject(RmiDataSource.
java:224)
at 
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:150)
at 
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newCo
nnectionFromDataSource(Unknown Source)
at 
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.looku
pConnection(Unknown Source)
at 
org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl.lookup
Connection(Unknown Source)
at 
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection
(Unknown Source)
at 
org.apache.ojb.broker.accesslayer.StatementManager.getSelectByPKState
ment(Unknown Source)
at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.materializeObject(Un
known Source)
at 
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown So
urce)
at 
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.store(Unkn
own Source)
at 
org.apache.ojb.ejb.PBSessionBean.storeObjects(PBSessionBean.java:184)

at 
org.apache.ojb.ejb.PBSessionBean.storeObjects(PBSessionBean.java:225)

at 
org.apache.ojb.ejb.PBSessionBean_2i5o70_EOImpl.storeObjects(PBSession
Bean_2i5o70_EOImpl.java:149)
at 
org.apache.ojb.ejb.PBSessionBean_2i5o70_EOImpl_WLSkel.invoke(Unknown
Source)
at 
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at 
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at 
weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:821)
at 
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:308)
at 
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189

Many thanks!
Jem


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Deploy OJB in WebLogic Server

2003-03-29 Thread Christophe Lombart
Is it not the same code ? Check in the bea doc,  the weblogic packages 
used for a startup class. I think it is the same.

Christophe

Jem McCombe wrote:

Hi,

At 22:36 18/03/2003 +0100, you wrote:

Just to complete the information provided by Lucy, you can find here 
how to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
I think  Thomas should be interested to receive this small install 
guide for weblogic (Tested only on Weblogic 7):


Has anyone successfully adapted Christophe/Lucy's WebLogic 7 approach 
fro WebLogic 6.1?

Tks,
Jem


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Deploy OJB in WebLogic Server

2003-03-28 Thread Jem McCombe
Hi,

At 22:36 18/03/2003 +0100, you wrote:
Just to complete the information provided by Lucy, you can find here how 
to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
I think  Thomas should be interested to receive this small install guide 
for weblogic (Tested only on Weblogic 7):


Has anyone successfully adapted Christophe/Lucy's WebLogic 7 approach fro 
WebLogic 6.1?

Tks,
Jem


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Deploy OJB in WebLogic Server

2003-03-24 Thread Chiah Tong Kiat
Hi 

I've read the deploy guide in the CVS. I've 1 question, does it mean
that I could only deploy 1 version ojb in the same weblogic instance?

Is there any way I could deploy multiple version of OJB (0.97, 0.99,
1.0rc1, etc) in the same weblogic instance if I'm hosting multiple
application running on the same weblogic instance.

Thanks
Tong kiat

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 21, 2003 7:52 PM
To: OJB Users List
Subject: Re: Deploy OJB in WebLogic Server

Hi Christophe and Lucy,

I add your guide with minor modifications to OJB deployment doc.
Could you please review the doc?
Find it on CVS
http://cvs.apache.org/viewcvs.cgi/db-ojb/xdocs/deployment.xml

regards,
Armin

- Original Message -
From: "Christophe Lombart" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 10:36 PM
Subject: Re: Deploy OJB in WebLogic Server


> Just to complete the information provided by Lucy, you can find here
how
> to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
> I think  Thomas should be interested to receive this small install
guide
> for weblogic (Tested only on Weblogic 7):
>
> 1. Add the OJB jar files and depedencies into the Weblogic classpath.
> 2. Compile the following classes (see at the end of this mail) and add
> them to the weblogic classpath.
> 3. Register via the weblogic console the startup class (OjbPbStartup).
> The JNDI name and the OJB.properties file path can be specified as
> parameters in this startup class (see the code).
> 4. As usual create the connection pool and the datasource.
> 5. Check the following entries in the OJB.properties :
>
>
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
ryManagedImpl
> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>
>
JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.Weblog
icTransactionManagerFactory
>
> 6. Modify the connection information in the repository.xml  (specify
the
> datasource name):
>
>  jcd-alias="default"
> default-connection="true"
>platform="Hsqldb"
>jdbc-level="2.0"
>jndi-datasource-name="datasource_demodb"
> eager-release="false"
> batch-mode="false"
> useAutoCommit="0"
> ignoreAutoCommitExceptions="false"
>>
> 
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l">
> 
> 
>
>
>
> 7. Write a session bean similar to thoses provided for the JBOSS
samples.
>
>
> I'm interesting to know if someone make a small comparaison between
EJB
> CMP 2.0 and OJB in term of performance, development cost, lifecycle,
> cache management... It should interesting for my current project.
>
>
> Thanks,
> Christophe
>
>
>
>
> --

> OjbPbFactory
> --

> package org.apache.ojb.weblogic;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
>
> public interface OjbPbFactory
> {
>
> public static String DEFAULT_JNDI_NAME = "PBFactory";
> public PersistenceBrokerFactoryIF getInstance();
>
> }
>
>
> --

> OjbPbFactoryImpl
> --

> package org.apache.ojb.weblogic;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
>
> /**
>  * PB Factory wrapper class for weblogic
>  *
>  */
> public class OjbPbFactoryImpl implements OjbPbFactory
>

>
> public PersistenceBrokerFactoryIF getInstance()
> {
> return PersistenceBrokerFactoryFactory.instance();
> }
>
> }
>
> --

> OjbStartup
> --

> package org.apache.ojb.weblogic;
>
> import javax.naming.*;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
> import weblogic.common.T3ServicesDef;
> import weblogic.common.T3StartupDef;
> import java.util.Hashtable;
>
> /**
>  * This startup class created and binds an instance of a
>  * PersistenceBrokerFactoryIF into JNDI.
&g

Re: Deploy OJB in WebLogic Server

2003-03-21 Thread Christophe Lombart
For me, that's ok.

Regards,
Christophe
Armin Waibel wrote:

Hi Christophe and Lucy,

I add your guide with minor modifications to OJB deployment doc.
Could you please review the doc?
Find it on CVS
http://cvs.apache.org/viewcvs.cgi/db-ojb/xdocs/deployment.xml
regards,
Armin
- Original Message -
From: "Christophe Lombart" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 10:36 PM
Subject: Re: Deploy OJB in WebLogic Server
 

Just to complete the information provided by Lucy, you can find here
   

how
 

to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
I think  Thomas should be interested to receive this small install
   

guide
 

for weblogic (Tested only on Weblogic 7):

1. Add the OJB jar files and depedencies into the Weblogic classpath.
2. Compile the following classes (see at the end of this mail) and add
them to the weblogic classpath.
3. Register via the weblogic console the startup class (OjbPbStartup).
The JNDI name and the OJB.properties file path can be specified as
parameters in this startup class (see the code).
4. As usual create the connection pool and the datasource.
5. Check the following entries in the OJB.properties :
   

ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
ryManagedImpl
 

   OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager

   

JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.Weblog
icTransactionManagerFactory
 

6. Modify the connection information in the repository.xml  (specify
   

the
 

datasource name):

   
   
   

className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l">
 

   
   

attribute-value="20"/>
 

   

  

7. Write a session bean similar to thoses provided for the JBOSS
   

samples.
 

I'm interesting to know if someone make a small comparaison between
   

EJB
 

CMP 2.0 and OJB in term of performance, development cost, lifecycle,
cache management... It should interesting for my current project.
Thanks,
Christophe


--
   


 

OjbPbFactory
--
   


 

package org.apache.ojb.weblogic;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;

public interface OjbPbFactory
{
   public static String DEFAULT_JNDI_NAME = "PBFactory";
   public PersistenceBrokerFactoryIF getInstance();
}

--
   


 

OjbPbFactoryImpl
--
   


 

package org.apache.ojb.weblogic;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
/**
* PB Factory wrapper class for weblogic
*
*/
public class OjbPbFactoryImpl implements OjbPbFactory
   

 

   public PersistenceBrokerFactoryIF getInstance()
   {
   return PersistenceBrokerFactoryFactory.instance();
   }
}

--
   


 

OjbStartup
--
   


 

package org.apache.ojb.weblogic;

import javax.naming.*;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
import weblogic.common.T3ServicesDef;
import weblogic.common.T3StartupDef;
import java.util.Hashtable;
/**
* This startup class created and binds an instance of a
* PersistenceBrokerFactoryIF into JNDI.
*/
public class OjbPbStartup
   implements T3StartupDef, OjbPbFactory
   

 

   private String defaultPropsFile =
"org/apache/ojb/weblogic/OJB.properties";
   private T3ServicesDef services;

   public void setServices (T3ServicesDef services)
   {
   this.services = services;
   }
   public PersistenceBrokerFactoryIF getInstance()
   {
   return PersistenceBrokerFactoryFactory.instance();
   }
   public String startup (String name, Hashtable args)
   throws Exception
   {
   try

   

 

   String jndiName = (String)args.get ("jndiname");
   if (jndiName == null || jndiName.length () == 0)
   jndiName = OjbPbFactory.DEFAULT_JNDI_NAME;
   String propsFile = (String)args.get ("propsfile");
   if (propsFile == null || propsFile.length () == 0)
   

 

   System.setProperty("OJB.properties",
   

efaultPropsFile  );
 

   }
   else
   {
   System.setProperty("OJB.properties", propsFile  );
   }
   InitialContext ctx = new InitialContext ();
   OjbPbFactory factory = new OjbPbFactoryImpl();
   bind (ctx, jndiName, factory);
   // return a message

Re: Deploy OJB in WebLogic Server

2003-03-21 Thread Armin Waibel
Hi Christophe and Lucy,

I add your guide with minor modifications to OJB deployment doc.
Could you please review the doc?
Find it on CVS
http://cvs.apache.org/viewcvs.cgi/db-ojb/xdocs/deployment.xml

regards,
Armin

- Original Message -
From: "Christophe Lombart" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 10:36 PM
Subject: Re: Deploy OJB in WebLogic Server


> Just to complete the information provided by Lucy, you can find here
how
> to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
> I think  Thomas should be interested to receive this small install
guide
> for weblogic (Tested only on Weblogic 7):
>
> 1. Add the OJB jar files and depedencies into the Weblogic classpath.
> 2. Compile the following classes (see at the end of this mail) and add
> them to the weblogic classpath.
> 3. Register via the weblogic console the startup class (OjbPbStartup).
> The JNDI name and the OJB.properties file path can be specified as
> parameters in this startup class (see the code).
> 4. As usual create the connection pool and the datasource.
> 5. Check the following entries in the OJB.properties :
>
>
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
ryManagedImpl
> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>
>
JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.Weblog
icTransactionManagerFactory
>
> 6. Modify the connection information in the repository.xml  (specify
the
> datasource name):
>
>  jcd-alias="default"
> default-connection="true"
>platform="Hsqldb"
>jdbc-level="2.0"
>jndi-datasource-name="datasource_demodb"
> eager-release="false"
> batch-mode="false"
> useAutoCommit="0"
> ignoreAutoCommitExceptions="false"
>>
> 
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l">
> 
> 
>
>
>
> 7. Write a session bean similar to thoses provided for the JBOSS
samples.
>
>
> I'm interesting to know if someone make a small comparaison between
EJB
> CMP 2.0 and OJB in term of performance, development cost, lifecycle,
> cache management... It should interesting for my current project.
>
>
> Thanks,
> Christophe
>
>
>
>
> --

> OjbPbFactory
> --

> package org.apache.ojb.weblogic;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
>
> public interface OjbPbFactory
> {
>
> public static String DEFAULT_JNDI_NAME = "PBFactory";
> public PersistenceBrokerFactoryIF getInstance();
>
> }
>
>
> --

> OjbPbFactoryImpl
> --

> package org.apache.ojb.weblogic;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
>
> /**
>  * PB Factory wrapper class for weblogic
>  *
>  */
> public class OjbPbFactoryImpl implements OjbPbFactory
>

>
> public PersistenceBrokerFactoryIF getInstance()
> {
> return PersistenceBrokerFactoryFactory.instance();
> }
>
> }
>
> --

> OjbStartup
> --

> package org.apache.ojb.weblogic;
>
> import javax.naming.*;
>
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
> import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;
>
> import weblogic.common.T3ServicesDef;
> import weblogic.common.T3StartupDef;
> import java.util.Hashtable;
>
> /**
>  * This startup class created and binds an instance of a
>  * PersistenceBrokerFactoryIF into JNDI.
>  */
> public class OjbPbStartup
> implements T3StartupDef, OjbPbFactory
>

>
>
> private String defaultPropsFile =
> "org/apache/ojb/weblogic/OJB.properties";
>
> private T3ServicesDef services;
>
> public void setServices (T3ServicesDef services)
> {
> this.services = services;
> }
>
>
> public PersistenceBrokerFactoryIF getInstance()
> {
> return PersistenceBrokerFactoryFactory.instance();
> 

RE: Deploy OJB in WebLogic Server

2003-03-18 Thread Lucy Zhao
Christophe:

I started my prototype with CMP. With the help of xdoclet, it still takes
much longer time to create and maintain a CMP than OJB. The line of code for
CMP (with xdoclet) is twice as much as OJB. Also the developer must know how
CMP behaves under different configuration in different application servers.
CMP doesn't give the enough power of SQL, for example, there is no "like"
for EJBQL. For OJB, I'm using Torque to generate repository.xml, VO object
and ojb code. 

About performance, I used Grinder for load testing. The HTTP
request/response time is very minimal under 25 simulated users who are doing
CRUD functions. I can give you the data if you want. My only concern is that
the "select all" call is quite slow and I'm wondering if there is any mothed
in OJB API that will return a configurable amount of records. But for
create, update, delete and select by calls, performance is very good.

Cheers,
Lucy

-Original Message-
From: Christophe Lombart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 4:37 PM
To: OJB Users List
Subject: Re: Deploy OJB in WebLogic Server


Just to complete the information provided by Lucy, you can find here how 
to deploy OJB (PB) on weblogic. It is quite similar to Jboss.
I think  Thomas should be interested to receive this small install guide 
for weblogic (Tested only on Weblogic 7):

1. Add the OJB jar files and depedencies into the Weblogic classpath.
2. Compile the following classes (see at the end of this mail) and add 
them to the weblogic classpath.
3. Register via the weblogic console the startup class (OjbPbStartup). 
The JNDI name and the OJB.properties file path can be specified as 
parameters in this startup class (see the code).
4. As usual create the connection pool and the datasource.
5. Check the following entries in the OJB.properties :

ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryMa
nagedImpl
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager

JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.WeblogicTr
ansactionManagerFactory

6. Modify the connection information in the repository.xml  (specify the 
datasource name):






   

7. Write a session bean similar to thoses provided for the JBOSS samples.


I'm interesting to know if someone make a small comparaison between EJB 
CMP 2.0 and OJB in term of performance, development cost, lifecycle, 
cache management... It should interesting for my current project.


Thanks,
Christophe





--
OjbPbFactory

--
package org.apache.ojb.weblogic;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;


public interface OjbPbFactory
{
   
public static String DEFAULT_JNDI_NAME = "PBFactory";
public PersistenceBrokerFactoryIF getInstance();

}



--
OjbPbFactoryImpl

--
package org.apache.ojb.weblogic;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;


/**
 * PB Factory wrapper class for weblogic
 *
 */
public class OjbPbFactoryImpl implements OjbPbFactory
{  
   
public PersistenceBrokerFactoryIF getInstance()
{
return PersistenceBrokerFactoryFactory.instance();
}
   
}


--
OjbStartup

--
package org.apache.ojb.weblogic;

import javax.naming.*;

import org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory;
import org.apache.ojb.broker.ta.PersistenceBrokerFactoryIF;

import weblogic.common.T3ServicesDef;
import weblogic.common.T3StartupDef;
import java.util.Hashtable;

/**
 * This startup class created and binds an instance of a
 * PersistenceBrokerFactoryIF into JNDI.
 */
public class OjbPbStartup
implements T3StartupDef, OjbPbFactory
{  
   
   
private String defaultPropsFile = 
"org/apache/ojb/weblogic/OJB.properties";
   
private T3ServicesDef services;

public void setServices (T3ServicesDef services)
{
this.services = services;
}


public PersistenceBrokerFactoryIF getInstance()
{
return PersistenceBrokerFactoryFactory.instance();
}


public String startup (String name, Hashtable args)
throws Exception
{
   
try
{   
String jndiName = (String)args.get ("jndiname");
if (jndiName == null || jndiName.length () == 0)
jndiName = OjbPbFactory.DEFAULT_JNDI_NAME;
   
String

Re: Deploy OJB in WebLogic Server

2003-03-18 Thread Christophe Lombart
 impossible to bind OJB PB 
factory";
   }
  
   }
  
   private void bind(Context ctx, String name, Object val)
   throws NamingException
   {
   Name n;
   for (n = ctx.getNameParser("").parse(name); n.size() > 1; n = 
n.getSuffix(1))
   {
   String ctxName = n.get(0);
   try
   {
   ctx = (Context) ctx.lookup(ctxName);
   }
   catch (NameNotFoundException namenotfoundexception)
   {
   ctx = ctx.createSubcontext(ctxName);
   }
   }
   ctx.bind(n.get(0), val);
   }
  
}

Lucy Zhao wrote:

Christophe:

I'm able to deploy OJB in WebLogic Server. My approach is quite the same as
yours: created a weblogic startup class and bind the PBFactoryIF to JNDI
tree. Here are the issues I've experienced:
1) WebLogic server seems not like the "java:/" prefix added to the JNDI
name. It throws "javax.naming.OperationNotSupportedException: bind not
allowed in a ReadOnlyContext; remaining name '/ojb/PBAPI'" . The problem
went away if remove "java:/" from jndi name. In the session EJB, the code
will be like this:
pbf = ((PBFactoryIF) context.lookup("ojb.PBAPI")).getInstance();
2) In repository-database.xml, change the user id and password to :
	username="system"
 password="weblogic"
  I guess a new user ( resembles database user id and password) could be
created in weblogic security domain and assign it to a certain group may
also work. But haven't tried. 

Please let me know if this helps.

Cheers!
Lucy Zhao
-Original Message-
From: Christophe Lombart [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:44 PM
To: OJB Users List
Subject: Re: Deploy OJB in WebLogic Server
I'm trying to do this via a weblogic startup class. Via this startup 
class,  I'm putting the PB factory into a JNDI tree. This part is 
working but I got an exception whith the datasource and I don't 
understand why : SecurityPrivilegeActionException.
In a session bean, I lookup to the PB facotry and try to execute a 
query. At this time, I got this exception.

Christophe

Lucy Zhao wrote:

 

Have anybody deployed OJB in a WebLogic Server? And wrote an MBean for
WebLogic Server?
Thanks!

Lucy Zhao



   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Deploy OJB in WebLogic Server

2003-03-17 Thread Lucy Zhao
Christophe:

I'm able to deploy OJB in WebLogic Server. My approach is quite the same as
yours: created a weblogic startup class and bind the PBFactoryIF to JNDI
tree. Here are the issues I've experienced:
1) WebLogic server seems not like the "java:/" prefix added to the JNDI
name. It throws "javax.naming.OperationNotSupportedException: bind not
allowed in a ReadOnlyContext; remaining name '/ojb/PBAPI'" . The problem
went away if remove "java:/" from jndi name. In the session EJB, the code
will be like this:
pbf = ((PBFactoryIF) context.lookup("ojb.PBAPI")).getInstance();

2) In repository-database.xml, change the user id and password to :
username="system"
  password="weblogic"
   I guess a new user ( resembles database user id and password) could be
created in weblogic security domain and assign it to a certain group may
also work. But haven't tried. 

Please let me know if this helps.

Cheers!
Lucy Zhao

-Original Message-
From: Christophe Lombart [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:44 PM
To: OJB Users List
Subject: Re: Deploy OJB in WebLogic Server


I'm trying to do this via a weblogic startup class. Via this startup 
class,  I'm putting the PB factory into a JNDI tree. This part is 
working but I got an exception whith the datasource and I don't 
understand why : SecurityPrivilegeActionException.
In a session bean, I lookup to the PB facotry and try to execute a 
query. At this time, I got this exception.

Christophe


Lucy Zhao wrote:

>Have anybody deployed OJB in a WebLogic Server? And wrote an MBean for
>WebLogic Server?
> 
>Thanks!
> 
>Lucy Zhao
>
>  
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Deploy OJB in WebLogic Server

2003-03-12 Thread Christophe Lombart
I'm trying to do this via a weblogic startup class. Via this startup 
class,  I'm putting the PB factory into a JNDI tree. This part is 
working but I got an exception whith the datasource and I don't 
understand why : SecurityPrivilegeActionException.
In a session bean, I lookup to the PB facotry and try to execute a 
query. At this time, I got this exception.

Christophe

Lucy Zhao wrote:

Have anybody deployed OJB in a WebLogic Server? And wrote an MBean for
WebLogic Server?
Thanks!

Lucy Zhao

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]