ORMI problem

2001-08-29 Thread Joni Suominen

Hi all,
I've noticed a strange bug in our latest production environment relating
to the behaviour of Orion's RMI protocol (ORMI). I'm running Orion's web
containers in different network segment than Orion's ejb containers. So,
the RMI traffic is going through a firewall which is between these
segments. When there has been lots of idle time, the front-end web
container loses the RMI connection and hangs on it without ever trying
to make a new connection.

Has any of you noticed similar behaviour or do you have any guesses what
might be going on? Otherwise I have to set up a stupid ping
application which periodically makes HTTP requests and keeps the
connection alive ;)

-- 
Joni
[EMAIL PROTECTED]





Upload files

2001-08-29 Thread Rudi . Fagermo

I try to upload file from a jsp-page with the code below. The code retrieve
the file path with in.getFileName() but in.avaiable() is always returning 0.
I can not understand why? Can any of you help me with this problem or have
any of you done this?
Thanks in advance,
Rudi.

Enumeration enumeration = new
FilePostParser(request.getInputStream(),
 
request.getContentLength());
while(enumeration.hasMoreElements()){
Object element = enumeration.nextElement();

  if(element instanceof Map.Entry){
Map.Entry entry = (Map.Entry) element;
String param = (String)entry.getKey();
.
.
.
.
} else if (element instanceof PostFileInputStream){
in = (PostFileInputStream)element;
originFileName = in.getFileName();
}

boolean isReading = true;
BufferedInputStream buffIn = new BufferedInputStream(in);
byte[] buf = new byte[4 * 1024];  
while (isReading) {
int readByte =  buffIn.read(buf);
out.print( +readByte);
isReading = readByte != (-1);
}
out.println(br);
buffIn.close();

and the form:
form name=mainform  action=submitdata.jsp enctype=multipart/form-data
method=post 
input type=file name=file value=Browse...
input type=submit value=Register
/form




Resource Adapter (Connector API) - JNDI?

2001-08-29 Thread Markus Holmberg

How (if possible), can a Resource Adapter (through the Connector API)
be mapped into JNDI, in Orion?

I might have overlooked something, in that case, bear with me.

Markus

-- 

Markus Holmberg |   Give me Unix or give me a typewriter.
[EMAIL PROTECTED]  |   http://www.freebsd.org/




Re: TranSaction RequiresNew PROBLEM (follow up)

2001-08-29 Thread Eddie

Noc noc ...

Please some help/adivce on the question I posted last week ?

Eddie :(

- Original Message -
From: Eddie Post [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 9:13 AM
Subject: TranSaction RequiresNew PROBLEM (follow up)


 Hellu,

 I have two methods A and B, and want that the Database action in method B
 are rolled back when an error occures, while the database actions in
method
 A are commited.

 I tried this to work, but don't have much success, please some help ?

 I am running on RedHat 7.0, Orion 1.5.1, Postgres 7.0

 What I did:
 - All methods in the EJB Session manager, have the transaction attribute
set
 to RequiresNew (see below). I am using CMPG by the way.
 - I throw a RemoteExcption in method B that I catch in method A, such that
 the DB activities in B should be rolled-back, but not the ones in method
A.
 Result: all db activities are commited !!! Also in case I throw a
 EJBException instead of a RemoteException (see the test code below).
 - I tried to force the roll-back in B by using the method setRollbackOnly
of
 the SessionContext, just before I throw a RemoteExcption. However this
 forces that ALL database activities are rolld-back.
 - I tried to monitor the Orion transactions with
Dtransaction.log=console,
 but this doesn't make any sense.
 - Could it be that Postgres doesn't support nested transaction over the
same
 connection, and that Orion uses the same connection for both transactions
??

 Please some help ??

 The files:
 The ejb-jar.xml part:
 -
 container-transaction
   method
descriptionTransaction-handling for the
 SmsManager/description
ejb-namenl.unwired.sgs.sms.SmsManager/ejb-name
method-intfRemote/method-intf
method-name*/method-name
   /method
   trans-attributeRequiresNew/trans-attribute
 /container-transaction
 -

 The test code:
 
 public void A() throws RemoteException {
 ...
 DB activity
 ...
 try {
 B()
 }
 catch (RemoteExcption er) {
 }

 public void B() throws RemoteException {
 ...
 DB activity
 ...
 new throw RemoteExcption (Testing roll-back);
 }

 ---


 Eddie

 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp







RE: binding error

2001-08-29 Thread Shlomo Rothschild

You should set the namespace-accesswrite-access  in the
home/config/application.xml


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Pazhyvilka, Yury
Sent: Wednesday, August 29, 2001 10:39 AM
To: Orion-Interest
Subject: binding error


Dear all,

when I try to bind an object to the InitialContext inside EJB code
  initCtx.rebind( name, ctx.getEJBObject().getHandle()); 
I always receive an error:

Error binding to server: java.lang.SecurityException: User does not have a
bind-
permission for BEAN_NAME

does someone have any idea what I do wrong?

thank you,
Yury.


-Original Message-
From: Teddy Rice [mailto:[EMAIL PROTECTED]]
Sent: 29 August 2001 07:31
To: Orion-Interest
Subject: Class Reloading


i have read, and re-read, all
of the postings on class
(re)loading in relation to deployed
applications inside orion. yet, i still
have some unanswered questions.

in my past experience, compiling classes
to the ./WEB-INF/classes directory and
touching either the web.xml or application.xml
file will cause the new classes to be
picked up and used. all objects that are
in session are serialized and available
after the application is re-deployed without
having to re-start orion.

however, i am now experiencing a situation
wherein i'm losing my session information and
being forced to re-login to my application to
continue development.

is there a set of criteria or implemenation details
i'm missing. all objects are obviously serializable
or they would not be able to be stored in a session.
yet, my latest encounters with class reloading makes
me doubt this assertion.

any ideas/paths i can explore to making my
development life less hell-like?

thanks,

ted rice







ejb calling a remote ejb

2001-08-29 Thread Farzad Yazdi



From my Orion application server I'm trying to use 
one ejb to call another ejb contained in a second  orion container 
onanother machine. In all the documentations I have read that you should 
only sepcify the remote ejb in your ejb-jar.xml file in the tag ejb-ref. 
The documentation says that you should give the fully qualified name. This is 
persumably of the form:

machine_name.sub_domain.domain/x/

What I don't know ishow x/ will be 
understood?  How would the rmi server know wherethe starting point on the 
remote machine will be from which to go to x/?

It seems that somewhere on the local machine (in 
one of the xml files) we should tell rmi where the starting point is on the 
remote machine. Any ideas? If you have a code and descriptor file snippet that 
would be appreciated.

Many thanks


Re: Does anyone know how to get working Netbeans 3.2 with orion 1.5.2 todebug JSP's?

2001-08-29 Thread Robert L Gause


I run pretty much the same setup as you. What I've found, is that it is easier
to compile the JSP under NetBeans and let it gripe about errors. Servlets and
other classes are easy to debug remotely, but JSP's get compiled to servlets
and then run. I have had a much tougher time debugging them interactively, and
discovered by accident the JSP compile in NetBeans. I believe it uses the
Tomcat JSP handler internally. I have not had any problems with it since.

My initial experience was debugging JSP via IBM's VAJ environment. It was ok
for debugging JSP, but it would blow up occassionally and I would have to
uninstall  reinstall (VAJ). I find NetBeans much more stable and reliable,
even though I can not debug the JSP's directly.

There may be some other way that I am missing - I keep finding neat new feature
under NetBeans.

Bob



From: Dmitriy Serebryakov [EMAIL PROTECTED]@orionserver.com on 08/29/2001
  12:59 AM AST

Please respond to Orion-Interest [EMAIL PROTECTED]

Sent by:  [EMAIL PROTECTED]


To:   Orion-Interest [EMAIL PROTECTED]
cc:
Subject:  Does anyone know how to get working Netbeans 3.2 with orion 1.5.2 to
  debug JSP's?


Hi, Everyone

Might be it is simple, but I have tried, no luck, no use of FAQ from
orionserver.com neither docs for both orion and Netbeans. I could not find
clear explanation what to do to get JSP's debugged.
Any suggestions about best (or better) way to do that, may be another IDE?

Running JDK 1.3 SE on Win2K Pro on Intel Pentium, Orionserver 1.5.2,
NetBeans 3.2.1

Thanks,
D.S.











RE: Problem in message driven beans.

2001-08-29 Thread David Libke

Parul,

For sending a message to a MessageDrivenBean you should only need this 
entry in the application-client.xml

  resource-ref
res-ref-namejms/theQueueConnectionFactory/res-ref-name
res-typejavax.jms.QueueConnectionFactory/res-type
res-authContainer/res-auth
  /resource-ref
  resource-ref
resource-ref-namejms/theQueueINamed/resource-ref-name
resource-ref-typejavax.jms.Queue/resource-ref-type
  /resource-ref

and in the ejb-jar.xml add the following

message-bean
  ejb-nameMyBean/ejb-name
  ejb-classMyPackage.MYBean/ejb-class
  transaction-typeContainer/transaction-type
  acknowledge-modeauto-acknowledge/acknowledge-mode

  message-driven-destination
destination-typejavax.jms.Queue/destination-type
subscription-durabilitydurable/subscription-durability
  /message-driven-destination

  resource-ref
res-ref-namejms/theQueueConnectionFactory/res-ref-name
res-typejavax.jms.QueueConnectionFactory/res-type
res-authContainer/res-auth
  /resource-ref

  resource-env-ref
resource-env-ref-namejms/theQueueINamed/resource-env-ref-name
resource-env-ref-typejavax.jms.Queue/resource-env-ref-type
  /resource-env-ref
  resource-env-ref
/message-bean

See if this helps. One caveat: in the application-client.xml the
'theQueueINamed' resource might need to be resource-env-ref if it does not
work as resource-ref.

Dave 



-Original Message-
From: Parul Verma [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 9:37 AM
To: Orion-Interest
Subject: Problem in message driven beans.



Hi,
I am facing trouble in message driven bean . What should be entered in
the application-client.xml tags :-

1)ejb-ref
2)ejb-ref-name
3)ejb-ref-type
4)home
5)remote

For configuring  the message driven bean .

Regards,
Parul Verma
Software Engg.
Mahindra British Telecom.
Pune-411004.
Tel :- 91-20-4018100 (Ext :- 4015).
E-Mail :- [EMAIL PROTECTED]


*
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*
Visit us at http://www.mahindrabt.com




RE: Upload files

2001-08-29 Thread SAURUGGER,PETER (A-PaloAlto,ex2)

Works fine for me. Only difference is that as in the example I read directly
from the PostFileInputStream - to rehash it here:

int character;
PostFileInputStream in = (PostFileInputStream)element;

while ( (character = in.read())  -1 ) 
{
out.write( character );
}

Your input buffering code in the snippet you show is not correct

--peter

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 29, 2001 12:27 AM
To: Orion-Interest
Subject: Upload files


I try to upload file from a jsp-page with the code below. The code retrieve
the file path with in.getFileName() but in.avaiable() is always returning 0.
I can not understand why? Can any of you help me with this problem or have
any of you done this?
Thanks in advance,
Rudi.

Enumeration enumeration = new
FilePostParser(request.getInputStream(),
 
request.getContentLength());
while(enumeration.hasMoreElements()){
Object element = enumeration.nextElement();

  if(element instanceof Map.Entry){
Map.Entry entry = (Map.Entry) element;
String param = (String)entry.getKey();
.
.
.
.
} else if (element instanceof PostFileInputStream){
in = (PostFileInputStream)element;
originFileName = in.getFileName();
}

boolean isReading = true;
BufferedInputStream buffIn = new BufferedInputStream(in);
byte[] buf = new byte[4 * 1024];  
while (isReading) {
int readByte =  buffIn.read(buf);
out.print( +readByte);
isReading = readByte != (-1);
}
out.println(br);
buffIn.close();

and the form:
form name=mainform  action=submitdata.jsp enctype=multipart/form-data
method=post 
input type=file name=file value=Browse...
input type=submit value=Register
/form




RE: Class Reloading

2001-08-29 Thread Juan Lorandi (Chile)

switch to BASIC auth for development only. it's easy to do, just change FORM
to BASIC (don't even have to remove the form-login and form-login-error
tags). The browser caches any auth that fulfills the Web server's challenge.
Therefore, it auto-logins you every-time the web server challenges for auth.
It's made my life easier

HTH,

Juan Pablo

 -Original Message-
 From: Teddy Rice [mailto:[EMAIL PROTECTED]]
 Sent: MiƩrcoles, 29 de Agosto de 2001 1:31
 To: Orion-Interest
 Subject: Class Reloading
 
 
 i have read, and re-read, all
 of the postings on class 
 (re)loading in relation to deployed
 applications inside orion. yet, i still
 have some unanswered questions.
 
 in my past experience, compiling classes
 to the ./WEB-INF/classes directory and
 touching either the web.xml or application.xml
 file will cause the new classes to be
 picked up and used. all objects that are
 in session are serialized and available
 after the application is re-deployed without
 having to re-start orion.
 
 however, i am now experiencing a situation
 wherein i'm losing my session information and
 being forced to re-login to my application to
 continue development.
 
 is there a set of criteria or implemenation details
 i'm missing. all objects are obviously serializable
 or they would not be able to be stored in a session. 
 yet, my latest encounters with class reloading makes
 me doubt this assertion.
 
 any ideas/paths i can explore to making my
 development life less hell-like?
 
 thanks,
 
 ted rice
 
 




Orion and MS Access for Demonstration

2001-08-29 Thread Bernard Briggs



I've seen two problems that exist with using 
Orion/EJBs with MS Access. We're trying to use Access for a small 
pilot as it is easy to move around.


1) MS Access orJDBC-ODBCbridge 
doesn't support the primitive type long

2)  MS Access or JDBC-ODBC bridge has a low limit 
on the size of it's "records"


For the lack of long support, I map longs to 
ints.

For the size issue, I map String types to char(128) 
instead of the default char(256)

My question:

Does anyone know of a more "elegant" way to use 
Access and get around these limitations? I'd rather not have to tiptoe 
around these issues in theway described here if there is a better 
alternative.





Orion and JNI

2001-08-29 Thread Etienne Bernard

Hi,

I am trying to use a native class in a servlet. The library containing
the implementation of the native methods is loaded at the servlet
initialization (static { ... } block), and everything works fine.

However, when my application gets redeployed, the next time I try to
access my servlet I get an exception:

java.lang.UnsatisfiedLinkError: Native Library libsipssubscription.so already loaded 
in another classloader
  at java.lang.Error.init(Error.java:52)
  at java.lang.LinkageError.init(LinkageError.java:45)
  at java.lang.UnsatisfiedLinkError.init(UnsatisfiedLinkError.java:44)
  at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1434)
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1315)
  at java.lang.Runtime.load0(Runtime.java:715)
  at java.lang.System.load(System.java:826)
  at com.ecompil.sipswrapper.SIPSApiSub.clinit(SIPSApiSub.java:68)
  at 
com.ecompil.web.SIPSSubscriptionRequest.processSubscription(SIPSSubscriptionRequest.java:60)

Is there a way to avoid such an error ?

Thanks in advance.
-- 
Etienne Bernard [EMAIL PROTECTED]
Senior Software Engineer - FullSIX - http://www.fullsix.com/




Re: Does anyone know how to get working Netbeans 3.2 with orion 1.5.2 to debug JSP's?

2001-08-29 Thread Chris Callaghan

Hi Dmitriy

You need to start Orion with:
java -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -jar orion.jar

then in NetBeans, go to Debug menu  Attach,
change the Debugger Type to Default debugger (JPDA),
Connector to SocketAttach,
Host to the hostname of the machine running Orion (localhost if its yours)
and Port to 8000 (or whatever you specify in the address argument in 
-Xrenjdwp when starting Orion)

Dmitriy Serebryakov wrote:

Hi, Everyone

Might be it is simple, but I have tried, no luck, no use of FAQ from
orionserver.com neither docs for both orion and Netbeans. I could not find
clear explanation what to do to get JSP's debugged.
Any suggestions about best (or better) way to do that, may be another IDE?

Running JDK 1.3 SE on Win2K Pro on Intel Pentium, Orionserver 1.5.2,
NetBeans 3.2.1

Thanks,
D.S.









RE: Orion and JNI

2001-08-29 Thread Andre Vanha

I think its a limitation of java, it appears you can't load a native library
from more than one class loader at a time.

To work around it, I have a class that wraps the native library, and load
the native library inside a static block as you say.  I then make this class
available to a higher level class loader.  Since the web-app class loaders
are children of the the orion top level class loader, and there is only one
top level class loader, the library is only loaded once, but available to
all web-apps.  You can make the wrapper class available at the default
application level, by adding library tags to application.xml, or at the
system classpath level by starting orion using java -cp
orion.jar;myJNIwrapperClass.jar com.evermind.server.ApplicationServer.

Hope this helps,
Andre

-Original Message-
From: Etienne Bernard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 29, 2001 4:24 PM
To: Orion-Interest
Subject: Orion and JNI


Hi,

I am trying to use a native class in a servlet. The library containing
the implementation of the native methods is loaded at the servlet
initialization (static { ... } block), and everything works fine.

However, when my application gets redeployed, the next time I try to
access my servlet I get an exception:

java.lang.UnsatisfiedLinkError: Native Library libsipssubscription.so
already loaded in another classloader
  at java.lang.Error.init(Error.java:52)
  at java.lang.LinkageError.init(LinkageError.java:45)
  at java.lang.UnsatisfiedLinkError.init(UnsatisfiedLinkError.java:44)
  at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1434)
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1315)
  at java.lang.Runtime.load0(Runtime.java:715)
  at java.lang.System.load(System.java:826)
  at com.ecompil.sipswrapper.SIPSApiSub.clinit(SIPSApiSub.java:68)
  at
com.ecompil.web.SIPSSubscriptionRequest.processSubscription(SIPSSubscription
Request.java:60)

Is there a way to avoid such an error ?

Thanks in advance.
-- 
Etienne Bernard [EMAIL PROTECTED]
Senior Software Engineer - FullSIX - http://www.fullsix.com/




Re: Orion and JNI

2001-08-29 Thread Biswajit Nayak

Hi , 
 I think your library path is not properly set when you redeploy your application . I was facing the same problem . 

Lets say you are accessing your native code in /private1/oracle/mycode directory . Lets say the variable name is xyz . So before starting the orion server , Explicitly set the path to export xyz=/private1/oracle/mycode and then start the orion server . 
Thanks 
Biswajit

From: Etienne Bernard <[EMAIL PROTECTED]>
Reply-To: Orion-Interest <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Subject: Orion and JNI 
Date: Thu, 30 Aug 2001 00:24:08 +0200 
 
Hi, 
 
I am trying to use a native class in a servlet. The library containing 
the implementation of the native methods is loaded at the servlet 
initialization (static { ... } block), and everything works fine. 
 
However, when my application gets redeployed, the next time I try to 
access my servlet I get an exception: 
 
java.lang.UnsatisfiedLinkError: Native Library libsipssubscription.so already loaded in another classloader 
 at java.lang.Error.(Error.java:52) 
 at java.lang.LinkageError.(LinkageError.java:45) 
 at java.lang.UnsatisfiedLinkError.(UnsatisfiedLinkError.java:44) 
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1434) 
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1315) 
 at java.lang.Runtime.load0(Runtime.java:715) 
 at java.lang.System.load(System.java:826) 
 at com.ecompil.sipswrapper.SIPSApiSub.(SIPSApiSub.java:68) 
 at com.ecompil.web.SIPSSubscriptionRequest.processSubscription(SIPSSubscriptionRequest.java:60) 
 
Is there a way to avoid such an error ? 
 
Thanks in advance. 
-- 
Etienne Bernard <[EMAIL PROTECTED]>
Senior Software Engineer - FullSIX - http://www.fullsix.com/ 
 
Get your FREE download of MSN Explorer at http://explorer.msn.com



Re: Problem in message driven beans.

2001-08-29 Thread Parul Verma

Thanks Sir for your kind guidance .

Regards,
Parul Verma
Software Engg.
Mahindra British Telecom.
Pune-411004.
Tel :- 91-20-4018100 (Ext :- 4015).
E-Mail :- [EMAIL PROTECTED]

- Original Message -
From: David Libke [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 8:09 PM
Subject: RE: Problem in message driven beans.


 Parul,

 For sending a message to a MessageDrivenBean you should only need this
 entry in the application-client.xml

   resource-ref
 res-ref-namejms/theQueueConnectionFactory/res-ref-name
 res-typejavax.jms.QueueConnectionFactory/res-type
 res-authContainer/res-auth
   /resource-ref
   resource-ref
 resource-ref-namejms/theQueueINamed/resource-ref-name
 resource-ref-typejavax.jms.Queue/resource-ref-type
   /resource-ref

 and in the ejb-jar.xml add the following

 message-bean
   ejb-nameMyBean/ejb-name
   ejb-classMyPackage.MYBean/ejb-class
   transaction-typeContainer/transaction-type
   acknowledge-modeauto-acknowledge/acknowledge-mode

   message-driven-destination
 destination-typejavax.jms.Queue/destination-type
 subscription-durabilitydurable/subscription-durability
   /message-driven-destination

   resource-ref
 res-ref-namejms/theQueueConnectionFactory/res-ref-name
 res-typejavax.jms.QueueConnectionFactory/res-type
 res-authContainer/res-auth
   /resource-ref

   resource-env-ref
 resource-env-ref-namejms/theQueueINamed/resource-env-ref-name
 resource-env-ref-typejavax.jms.Queue/resource-env-ref-type
   /resource-env-ref
   resource-env-ref
 /message-bean

 See if this helps. One caveat: in the application-client.xml the
 'theQueueINamed' resource might need to be resource-env-ref if it does
not
 work as resource-ref.

 Dave



 -Original Message-
 From: Parul Verma [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 28, 2001 9:37 AM
 To: Orion-Interest
 Subject: Problem in message driven beans.



 Hi,
 I am facing trouble in message driven bean . What should be entered in
 the application-client.xml tags :-

 1)ejb-ref
 2)ejb-ref-name
 3)ejb-ref-type
 4)home
 5)remote

 For configuring  the message driven bean .

 Regards,
 Parul Verma
 Software Engg.
 Mahindra British Telecom.
 Pune-411004.
 Tel :- 91-20-4018100 (Ext :- 4015).
 E-Mail :- [EMAIL PROTECTED]


 *
 Disclaimer

 This message (including any attachments) contains
 confidential information intended for a specific
 individual and purpose, and is protected by law.
 If you are not the intended recipient, you should
 delete this message and are hereby notified that
 any disclosure, copying, or distribution of this
 message, or the taking of any action based on it,
 is strictly prohibited.

 *
 Visit us at http://www.mahindrabt.com


*
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*
Visit us at http://www.mahindrabt.com