RE: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread Ivan Bolcina
Title: RE: AW: [JBoss-user] How can I use a background process with JBos s






Hi.


Interesting question, i dont have clean answer.


How about that you write a entry in database table after order processing with status. Now every struts action should check it and if order id matches order id of current user, it can notify him. This is server-pull, since you pull data from server and its only checked on clicks. You can simulate server push, in this way that client constanty checks throug .do -> ejb-> db for order processing status. After status is ok, it writes javascript message or redirects or something. For this you need frame or iframe and there javascript which every 15 seconds or something refreshes itself - to .do action of course.

There is a way with JMS, but this only removes DB and introduces topics.


-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED]] 
Sent: 14. februar 2002 0:46
To: [EMAIL PROTECTED]
Subject: Re: AW: [JBoss-user] How can I use a background process with JBos s


On 2002.02.13 16:55:34 -0500 David Ward wrote:
> I would love to see your javaspace adapter.


I posted it as a patch, 517252


I'd sure like some help finding out if it works, if anyone knows how to get
jini services started.  I was thinking running the other jini services as
mbeans might be appropriate in jboss.
> 
> Man, just read that line out loud; it sounds almost sexy.
> Are we geeks or what!?
> 
> If you think about it, the core of database systems is how they are able 
> to keep those data files clean and proper in a transactional, secure 
> fashion.  It still ends up being files.  So theoretically, if they can 
> do it, so could we.


Yes, but what goes in the files?  I'm not sure what the idea behind a "file
system adapter" is: if it accesses content based on file name, it is
difficult for me to see how it would be transactional.  If it stores
arbitrary content in an arbitrary way in the filesystem, transactional
behavior wouldn't depend on the filesystem being transactional.


david jencks
> 
> --
> 
> David Jencks wrote:
> > I think the only useful thing you can impelement with a file system
> > connector is serialization: keep connections from accessing the same
> file
> > at the same time. Transactions without versioning would be very
> difficult. 
> > I don't really see any place for security.
> > 
> > If you are interested in an example that is only a little more
> complicated
> > than what would be necessary for a filesystem connector, I can send you
> my
> > javaspace adapter.  I haven't been able to test it, however based on
> the
> > other (3) adapters I've written I think everything important is
> > implemented.  I'd also be happy to answer questions and review code.
> > 
> > Aside from the spec, the recent jca book is somewhat informative, but
> > copying an existing adapter will be much easier.
> > 
> > david jencks
> > 
> > On 2002.02.13 13:42:06 -0500 Edward Q. Bridges wrote:
> > 
> >>my curiosity has been piqued.  what's involved in making a .rar?
> >>is there someone that would be interested in helping me spec it out?
> >>
> >>--e--
> >>
> >>
> >>On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
> >>
> >>>it could be a good tutorial for .rar developement...
> >>>any volunteer ?
> >>>
> >>>
> >>
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





RE: [JBoss-user] Streams

2002-02-13 Thread Sacha Labourey

Hello,

> on user's requirements).  A user may choose to upload a file (as
> large as 20
> or 30 megabytes) to the servlet engine.  Another user may choose
> to download
> one of these uploaded files.  On the backend this is also done

Just a small note on this...

During one project, we had to manage the upload of files through a servlet
and as in your situation, file could be very big. While searching for a file
upload library to be used from the servlet engine, I've found that some of
these library do not correctly handle "stream" but instead load the entire
file in a byte array before giving back the hand to the servlet code. So, I
suggest you also check how your particular file upload library work.

Cheers,


Sacha


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Streams

2002-02-13 Thread Dmitri Colebatch

Hi,



> On the backend this is also done for new mail,
> using Javamail (I might decide to use something else...Javamail is turning
> out to be painfully slow...especially using the Sun JVM.)

What alternatives to Javamail do you see?   Whilst we haven't really put it under any 
pressure yet, we also plan to use javamail, or
at least to have mail functionality from the jvm I'd be interested to hear more on 
this.

cheesr
dim


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Streams

2002-02-13 Thread Daniel Bruce Lynes

Sorry for the late reply everyone...I thought I was resubscribed (my @Home 
account was discontinued, and I kept procrastinating about updating my email 
addresses)...as it turned out, I missed the request for confirmation I had to 
reply to :(

Peter Levart wrote the following excerpt on Feb 13, 2002:

> There is a java.sql.Blob type that allows you to read/write binary data 
> from/to a BLOB field via InputStream/OutputStream without buffering the
> whole 
> chunk and to read/write parts of the BLOB field.

Yes, exactly the reason I want to use streams.

> Daniel probably wants to solve the problem of transporting a big chunk of 
> data from the client to the server and store this into a BLOB field in the 
> database.

Yes, because allocating memory for 20MB's of data would be processing 
prohibitive.

> What I would probably do in this case is something like that:

> 1. Open a transaction on the client side
> 2. Organize big data into byte[] packets of some length and send them to
> the 
> server via multiple calls to EJB. On the server side write each packet into 
> the appropriate offset of the BLOB field via java.sql.Blob type.
> 3. Commit transaction on the client side.

Aha!   Thanks, very much.  I didn't know you could update the LOBs via 
offsets.  Can you also do this for CLOBs and NCLOBs?

> Peter

Guy Rouillier wrote the following excerpt on Feb 12, 2002:

> Are you attempting to put a 20 MB file into a BLOB column in a database

Yes.

> table?  If so, I'd suggest you consider just leaving the file in the file
> system and putting a reference to it in a small character column.  What
> benefit are you deriving from putting a file into the database?

I'm not.  The specification requires it.

Dain Sundstrom wrote the following excerpt on Feb 12, 2002:

> Two things come to mind here.  First, values passed over local 
> interfaces don't have to be serializable. Second, EJBs are forbidden 

Nothing is passing over a local interface here.  JBoss is on one machine; 
Tomcat is on another.

> from performing IO, because IO can block forever (you can cheat of 

If this is the case, why does it allow me to perform LOB input/output within 
the context of a database statement?  I'm not doing any kind of a special 
hack to do it, but I'm certainly not using CMP, either.  I have to use 
Oracle's BLOB and CLOB datatypes.

> course).  How are you planning on getting this into the database?  You 
> can't create a CMP field of type Stream.

I'm not using CMP.  I'm accessing the datasource directly.

Paul Cody wrote the following excerpt on Feb 12, 2002:

> The notion of a serializable stream is not trivial.  At first glance, it
> suggests that your design may need reconsideration.  Can you expand on your
> overall requirements and the properties you expect from a serializable
> stream?

The project specification states that the information be stored in the 
database, not as a local file; this is supposedly to ensure that the data is 
not easily modifiable (I'm guessing here).  The servlet engine may or may not 
be on the same machine as the ejb engine.  The servlet engine will more than 
likely rest inside of a DMZ, and the ejb engine (as well as the database) 
will reside on an internal LAN or intranet, inside of a second firewall.  The 
operating system employed may be Solaris, Windows, HP/UX, or Linux (depends 
on user's requirements).  A user may choose to upload a file (as large as 20 
or 30 megabytes) to the servlet engine.  Another user may choose to download 
one of these uploaded files.  On the backend this is also done for new mail, 
using Javamail (I might decide to use something else...Javamail is turning 
out to be painfully slow...especially using the Sun JVM.)

The properties I expect to be able to receive from serialization is that the 
the port to the database remain secured from the DMZ; i.e. no access to the 
database from the DMZ.

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] RE: Nightly Snapshots still not available.

2002-02-13 Thread Shamis, Leonid

Hi,

I haven't got any feedback on the issue raised in the original mail, but
I've noticed that the Nightly Snapshots are available again:

Directory: /snapshots/
jboss-all.tgz   17572458 bytes  Jan 15, 2002 9:29:26 AM 
jboss-all.zip   19199973 bytes  Jan 15, 2002 9:29:06 AM 
jboss-mq.tgz13071588 bytes  Jan 15, 2002 9:29:50 AM 
jboss-mq.zip13874665 bytes  Jan 15, 2002 9:29:38 AM 
jboss-plugins.tgz   9709382 bytes  Jan 15, 2002 9:30:02 AM 
jboss-plugins.zip   9949040 bytes  Jan 15, 2002 9:29:56 AM 
META-INF0 bytes  Feb 12, 2002 9:46:13 AM 
WEB-INF 0 bytes  Feb 12, 2002 9:46:13 AM 

Thank you very much.

> -Original Message-
> From: Shamis, Leonid 
> Sent: Wednesday, February 06, 2002 10:45 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  Nightly Snapshots still not available.
> 
> Hello,
> 
> Does someone know whether the Nightly Snapshots will be available again
> sometime? I check http://www.jboss.org/snapshots and
> http://www.jboss.org/snapshots/jboss-all.zip every day since the HARDWARE
> CRASH but I still get HTTP ERROR: 404 Not Found error.
> 
> Thank you.

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread David Jencks

On 2002.02.13 16:55:34 -0500 David Ward wrote:
> I would love to see your javaspace adapter.

I posted it as a patch, 517252

I'd sure like some help finding out if it works, if anyone knows how to get
jini services started.  I was thinking running the other jini services as
mbeans might be appropriate in jboss.
> 
> Man, just read that line out loud; it sounds almost sexy.
> Are we geeks or what!?
> 
> If you think about it, the core of database systems is how they are able 
> to keep those data files clean and proper in a transactional, secure 
> fashion.  It still ends up being files.  So theoretically, if they can 
> do it, so could we.

Yes, but what goes in the files?  I'm not sure what the idea behind a "file
system adapter" is: if it accesses content based on file name, it is
difficult for me to see how it would be transactional.  If it stores
arbitrary content in an arbitrary way in the filesystem, transactional
behavior wouldn't depend on the filesystem being transactional.

david jencks
> 
> --
> 
> David Jencks wrote:
> > I think the only useful thing you can impelement with a file system
> > connector is serialization: keep connections from accessing the same
> file
> > at the same time. Transactions without versioning would be very
> difficult. 
> > I don't really see any place for security.
> > 
> > If you are interested in an example that is only a little more
> complicated
> > than what would be necessary for a filesystem connector, I can send you
> my
> > javaspace adapter.  I haven't been able to test it, however based on
> the
> > other (3) adapters I've written I think everything important is
> > implemented.  I'd also be happy to answer questions and review code.
> > 
> > Aside from the spec, the recent jca book is somewhat informative, but
> > copying an existing adapter will be much easier.
> > 
> > david jencks
> > 
> > On 2002.02.13 13:42:06 -0500 Edward Q. Bridges wrote:
> > 
> >>my curiosity has been piqued.  what's involved in making a .rar?
> >>is there someone that would be interested in helping me spec it out?
> >>
> >>--e--
> >>
> >>
> >>On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
> >>
> >>>it could be a good tutorial for .rar developement...
> >>>any volunteer ?
> >>>
> >>>
> >>
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss-MQ

2002-02-13 Thread Kotamraju, Srinivas, BmS- NY1540

Hi all,
when I run this code..I get the error
Could not lookup topic/testTopic
java.lang.ClassCastException: javax.naming.Reference 

does anybody now what is the reason?
thanks
srini

public static Context getInitialContext() throws NamingException{

  // Populate with needed propertis
  Hashtable props = new Hashtable();
  props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
  props.put(Context.PROVIDER_URL, "localhost:1099");
  props.put("java.naming.rmi.security.manager", "yes");
  props.put(Context.URL_PKG_PREFIXES,  "org.jboss.naming");

  // Get initial context with given properties
  return new InitialContext(props);

   }

   /**
* Test looking up a known topic, if no errors JNDI works.
*/
   public static void main(String[] args) {
  try {
 // Get the manually configured initial context
 Context context = ManualJNDI.getInitialContext();
Logger.log("a");
 // Do the lookup
 Topic t = (Topic)context.lookup("topic/testTopic");
 Logger.log("b");
 System.out.println("Looing up topic/testTopic worked fine");
  }catch (Exception ex) {
 System.err.println("Could not lookup topic/testTopic");
 ex.printStackTrace();
  }
   }

} // ManualJNDI

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread David Ward

I would love to see your javaspace adapter.

Man, just read that line out loud; it sounds almost sexy.
Are we geeks or what!?

If you think about it, the core of database systems is how they are able 
to keep those data files clean and proper in a transactional, secure 
fashion.  It still ends up being files.  So theoretically, if they can 
do it, so could we.

--

David Jencks wrote:
> I think the only useful thing you can impelement with a file system
> connector is serialization: keep connections from accessing the same file
> at the same time. Transactions without versioning would be very difficult. 
> I don't really see any place for security.
> 
> If you are interested in an example that is only a little more complicated
> than what would be necessary for a filesystem connector, I can send you my
> javaspace adapter.  I haven't been able to test it, however based on the
> other (3) adapters I've written I think everything important is
> implemented.  I'd also be happy to answer questions and review code.
> 
> Aside from the spec, the recent jca book is somewhat informative, but
> copying an existing adapter will be much easier.
> 
> david jencks
> 
> On 2002.02.13 13:42:06 -0500 Edward Q. Bridges wrote:
> 
>>my curiosity has been piqued.  what's involved in making a .rar?
>>is there someone that would be interested in helping me spec it out?
>>
>>--e--
>>
>>
>>On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
>>
>>>it could be a good tutorial for .rar developement...
>>>any volunteer ?
>>>
>>>
>>


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Dmitri Colebatch

We've had experience similar to yours with the collections types, where
we've had to create a new collection each tx, but I would hope that isn't
required.

Of course JBoss does support Dependant Value Objects
(http://www.jboss.org/online-manual/HTML/ch06s14.html) that might solve your
problem.

hth
dim

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Jboss-User" <[EMAIL PROTECTED]>
Cc: "Dmitri Colebatch" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 12:59 AM
Subject: Re: [JBoss-user] Objects in entity beans are not updated


> > Have you implemented equals() and hashCode() in your
> > objects?
>
> Great idea, but it doesn't seem to help :-(
>
>
> --
> Eric Jain
>


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Ricardo Argüello

> AFAIK, "they" don't want you to do io because 1) io can block forever, 
> and 2) the filesystem isn't transactionally managed

I don't know if you can do this with EJB:
http://www.onjava.com/pub/a/onjava/2002/02/06/atomic.html




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread David Jencks

I think the only useful thing you can impelement with a file system
connector is serialization: keep connections from accessing the same file
at the same time. Transactions without versioning would be very difficult. 
I don't really see any place for security.

If you are interested in an example that is only a little more complicated
than what would be necessary for a filesystem connector, I can send you my
javaspace adapter.  I haven't been able to test it, however based on the
other (3) adapters I've written I think everything important is
implemented.  I'd also be happy to answer questions and review code.

Aside from the spec, the recent jca book is somewhat informative, but
copying an existing adapter will be much easier.

david jencks

On 2002.02.13 13:42:06 -0500 Edward Q. Bridges wrote:
> 
> my curiosity has been piqued.  what's involved in making a .rar?
> is there someone that would be interested in helping me spec it out?
> 
> --e--
> 
> 
> On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
> >
> >it could be a good tutorial for .rar developement...
> >any volunteer ?
> >
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread Dain Sundstrom

There is a good article in this month's JavaPro.  It is online at:

http://www.fawcette.com/javapro/2002_02/magazine/features/tmodi/

-dain

Edward Q. Bridges wrote:

> my curiosity has been piqued.  what's involved in making a .rar?
> is there someone that would be interested in helping me spec it out?
> 
> --e--
> 
> 
> On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
> 
>>it could be a good tutorial for .rar developement...
>>any volunteer ?
>>
>>
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] How to update hsqldb

2002-02-13 Thread Eric Jain

Problem: I need to be able to store large objects inside entity beans.
Unfortunately, the version of hsqldb provided with JBoss 3.0.0 alpha only
supports fields of up to 32KB. Apparently this has been fixed in the newest
version of hsqldb, 1.6.1.

Simply replacing the hsqldb.jar in lib/ext results in hundreds of error
messages.
Does anyone have any experience with updating the database?


--
Eric Jain


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Eric . Jain

> Don't know if this helps.  If you can't figure it out 
> in the source, can you post to source forge a small 
> test case that demonstrates this behavior.

Thanks, I'll try to reproduce this behavior with a 
simple test case, as soon as I get the time. Just 
wanted to be sure this wasn't a known (and perhaps 
fixed) bug.


--
Eric Jain

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: AW: [JBoss-user] How can I use a background process with JBos s

2002-02-13 Thread Edward Q. Bridges


my curiosity has been piqued.  what's involved in making a .rar?
is there someone that would be interested in helping me spec it out?

--e--


On Wed, 13 Feb 2002 18:15:37 +0100, Coetmeur, Alain wrote:
>
>it could be a good tutorial for .rar developement...
>any volunteer ?
>



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Dain Sundstrom

Here is the code I use when you set a 2.x cmp field:

public void setInstanceValue(EntityEnterpriseContext ctx, Object value) {
FieldState fieldState = getFieldState(ctx);

// short-circuit to avoid repetive comparisons
// if it is not currently loaded or it is already dirty or
// if it has changed
fieldState.isDirty = !fieldState.isLoaded || fieldState.isDirty ||
  changed(fieldState.value, value);

// we are loading the field right now so it isLoaded
fieldState.isLoaded = true;

// update current value
fieldState.value = value;
}

Don't know if this helps.  If you can't figure it out in the source, can 
you post to source forge a small test case that demonstrates this behavior.

Thanks,

-dain


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Coetmeur, Alain



> -Message d'origine-
> some ClassLoader or security magic to keep you from using anything in 
> java.io, but in practice I doubt anybody does that.
the java.policy and the security manage should do that job

> AFAIK, "they" don't want you to do io because 1) io can block 
> forever, 
> and 2) the filesystem isn't transactionally managed.  I'm not sure if 
> there's stuff in JDK 1.4's new nio package that can address the first 
> point.  There might also be a 3rd party product to address 
> the second. 
> Probably (as I think someone else already mentioned) as a .rar.

that is only an idea ...
in a perfect J2EE world, all that is ner to the system,
should be a JCA component (a .rar)...

it could be a good tutorial for .rar developement...
any volunteer ?

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Re: Message Delivery Error

2002-02-13 Thread David Ward

I get this every time I send a mail to jboss-user.  I'm assuming 
everyone else does too.  Can someone with the power remove the offending 
email from the list?


[EMAIL PROTECTED] wrote:
> The following mail of yours could not be forwarded as per recipient's settings due 
>to looping in mail delivery.
> 
>  Date : Wed, 13 Feb 2002 11:52:15 -0500
>  To : [EMAIL PROTECTED]
>  Subject : Re: AW: [JBoss-user] How can I use a background process with JBoss
> 
> 



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread David Ward

Dirk Storck wrote:
> But I must have access to the filesystem for copying purpose.
> How about using MBean's for that ? Can they be access as normal Beans ?

As much as the spec says you shouldn't do io from EJBs, technically you 
still can (though I'm not advocating it ;) ).  I tried it once and both 
JBoss and WebLogic didn't stop me.  I'm guessing there would have to be 
some ClassLoader or security magic to keep you from using anything in 
java.io, but in practice I doubt anybody does that.

AFAIK, "they" don't want you to do io because 1) io can block forever, 
and 2) the filesystem isn't transactionally managed.  I'm not sure if 
there's stuff in JDK 1.4's new nio package that can address the first 
point.  There might also be a 3rd party product to address the second. 
Probably (as I think someone else already mentioned) as a .rar.

David


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Eric . Jain

> Are your sure that you imlemented equals correctly?  

Pretty sure:

public class Queue
  implements java.io.Serializable
{
  static final long serialVersionUID = 554203L;  

  private java.util.LinkedList list = 
new java.util.LinkedList();
  
  // some methods...
  
  public boolean equals(Object that)
  {
return that instanceof Queue 
  && ((Queue) that).list.equals(list);
  }

  public int hashCode()
  {
return list.hashCode();
  }
}


My jbosscmp-jdbc.xml:

  
true
true
false
true
true
  



In my jboss.xml, the configuration-name for the bean 
containing the queue field is "Standard CMP 2.x 
EntityBean".

In my ejb-jar.xml the field is listed along with other 
fields within a bean as: 

  input



--
Eric Jain

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Dirk Storck

But I must have access to the filesystem for copying purpose.
How about using MBean's for that ? Can they be access as normal Beans ?

-Ursprüngliche Nachricht-
Von: Rajeshwar Rao V [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 13. Februar 2002 16:23
An: Ricardo Argüello; [EMAIL PROTECTED]; Jboss User (E-Mail)
Betreff: RE: [JBoss-user] How can I use a background process with JBoss


Message Beans are the best option...
If not use Scheduler in JBoss.

-Original Message-
From: Ricardo Argüello [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 7:39 PM
To: [EMAIL PROTECTED]; Jboss User (E-Mail)
Subject: Re: [JBoss-user] How can I use a background process with JBoss


It looks like you would need Message Driven Beans.

Read O'Reilly's Enterprise JavaBeans 3rd. Edition.

And check JBoss 3.0.0alpha documentation:
http://www.jboss.org/online-manual/HTML/ch08s20.html


Greetings,

Ricardo Arguello


- Original Message -
From: "Dirk Storck" <[EMAIL PROTECTED]>
To: "Jboss User (E-Mail)" <[EMAIL PROTECTED]>; "Struts User
(E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 8:16 AM
Subject: [JBoss-user] How can I use a background process with JBoss


> Hi,
>
> I want to do the following:
>
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
>
> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
>
> How can I achieve this with JBoss and Struts ? What would be the best way
to
> implement this
>
> Many thanks any any suggestions are welcome!!!
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Help : problem with ejb-jar.xml

2002-02-13 Thread Sanjay Gupta

Hi Michael,
Thanx for ur answer, but the url
http://java.sun.com/j2ee/dtd/application_1_3.dtd
doesnot exist on sun's site.
So i guess problem is somewhere else... :(
Ny more comments from ne one else...
Thanx in advance,
Sanjay

>>> "Michael Schulz" <[EMAIL PROTECTED]> 02/13/02 08:37PM >>>
Perhaps if you changed the first reference (to the V 1.3 dtd) to match
the
second reference, it would work.

Change
http://java.sun.com/dtd/application_1_3.dtd'>

To:
http://java.sun.com/j2ee/dtd/application_1_3.dtd'>

(I think you are missing the "/j2ee" section of the URL)

-Mike

[Michael Schulz]  -Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of Sanjay
Gupta
Sent: Wednesday, February 13, 2002 12:21 AM
To: [EMAIL PROTECTED] 
Subject: [JBoss-user] Help : problem with ejb-jar.xml


  Hi All,
  I have two ear files. In one of the ear file, i use

  http://java.sun.com/dtd/application_1_3.dtd'>

  and in another i use

  http://java.sun.com/j2ee/dtds/application_1_2.dtd'>

  Now my problem is when i try to deploy my first ear, i get a message
"External entity http://java.sun.com,"; not found.
  Java.net.socket exception, connection times out.

  But my second ear file, with
http://java.sun.com/j2ee/dtds/application_1_2.dtd 
  deplpys fine. What can be the possible cause for this error. I read
in
jboss doc tha we can add url for checking dtd's statically or
dynamically.

  Thanx in advance.
  Regards,
  Sanjay


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread David Ward

JBoss 2.4.4 is EJB 1.1 but also has MessageDrivenBeans.

--

Dirk Storck wrote:
> I can't use MessageDrivenBeans cause we have to use EJB1.1
> 
> -Ursprüngliche Nachricht-
> Von: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 13. Februar 2002 14:54
> An: [EMAIL PROTECTED]; Jboss User (E-Mail)
> Betreff: Re: [JBoss-user] How can I use a background process with JBoss
> 
> 
> 
> why not just send the user an email after the order has been processed?
> 
> you could process the order using a message-driven bean that sends an email
> when completed, since you won't know if the user is still available after
> processing the order.
> 
> HTH
> 
> 
> 
> 
> On Wed, 13 Feb 2002 14:16:36 +0100, Dirk Storck wrote:
> 
> 
>>How can I achieve this with JBoss and Struts ? What would be the best way
>>
> to
> 
>>implement this
>>
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Rajeshwar Rao V

Message Beans are the best option...
If not use Scheduler in JBoss.

-Original Message-
From: Ricardo Argüello [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 7:39 PM
To: [EMAIL PROTECTED]; Jboss User (E-Mail)
Subject: Re: [JBoss-user] How can I use a background process with JBoss


It looks like you would need Message Driven Beans.

Read O'Reilly's Enterprise JavaBeans 3rd. Edition.

And check JBoss 3.0.0alpha documentation:
http://www.jboss.org/online-manual/HTML/ch08s20.html


Greetings,

Ricardo Arguello


- Original Message - 
From: "Dirk Storck" <[EMAIL PROTECTED]>
To: "Jboss User (E-Mail)" <[EMAIL PROTECTED]>; "Struts User
(E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 8:16 AM
Subject: [JBoss-user] How can I use a background process with JBoss


> Hi,
> 
> I want to do the following:
> 
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
> 
> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
> 
> How can I achieve this with JBoss and Struts ? What would be the best way
to
> implement this
> 
> Many thanks any any suggestions are welcome!!!
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Dirk Storck

CAN I use JBoss 2.2.2 with MDB ?


-Ursprüngliche Nachricht-
Von: Coetmeur, Alain [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 13. Februar 2002 14:45
An: '[EMAIL PROTECTED]'
Cc: Jboss User (E-Mail); Struts User (E-Mail)
Betreff: RE: [JBoss-user] How can I use a background process with JBoss



a message bean can be a good idea...
send an XML or text message to your message EJB,
which will process the request in it's own thread...

by the way, for long transactions, if you can avoid transactions
(by default they timeout in 30 seconds. you can change
 that somewhere in the transaction config, but
 anyway this is costly for the DB)

check the transaction mode used for the EJB...
using NotSupported for is interesting if their is no risk of
incoherence. note that such a non transactional bean
can call transactional EJB (Required TX mode for example).
each independent method call will be either Commit'ed or Rollback'ed...

If you don't have Message EJB, you can try to add a Thread'able object
in the Servlet context. I did it on Websphere
to scan mail...

then, either use the "load-on-startup" elemnt in web.xml
or explicitly start and stop...

as far as I understand servler context guaranty that
only one instance of the thread is used

you may also look about non HTTP servlet
which may respond to any protocol...
or even to soap clients...

> -Message d'origine-
> De: Dirk Storck [mailto:[EMAIL PROTECTED]]
> Date: mercredi 13 février 2002 14:17
> À: Jboss User (E-Mail); Struts User (E-Mail)
> Objet: [JBoss-user] How can I use a background process with JBoss
>
>
> Hi,
>
> I want to do the following:
>
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart
> are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
>
> Now it comes to the problem. The order must be proccessed in
> background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
>
> How can I achieve this with JBoss and Struts ? What would be
> the best way to
> implement this

package fr.cdc.idt.receivemail;

/**
 * Insérez la description du type ici.
 * Date de création : (04/01/02 12:10:45)
 * @author:
 */
import java.util.Date;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;

import javax.mail.*;
import javax.mail.internet.*;
import fr.cdc.idt.sendmail.*;

public class ReceiveMailServlet extends javax.servlet.http.HttpServlet {
/**
 * Free any resources the servlet has acquired
 * that will not be garbage collected.
 */
public void destroy() {
System.out.println(getClass().getName()+"#destroy()");
ServletContext cnt=getServletContext();
Object cobj=cnt.getAttribute("mailPollBean");
if(cobj!=null){
  ReceiveMailPollBean
mailPollBean=(ReceiveMailPollBean)cobj;
System.out.println(getClass().getName()+"#destroy() bean stop");
  mailPollBean.stop();
System.out.println(getClass().getName()+"#destroy()
removeattribute");
  cnt.removeAttribute("mailPollBean");
}
super.destroy();
}
/**
 * Process incoming HTTP GET requests
 *
 * @param request Object that encapsulates the request to the servlet
 * @param response Object that encapsulates the response from the servlet
 */
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) throws
javax.servlet.ServletException, java.io.IOException {

performTask(request, response);

}
/**
 * Process incoming HTTP POST requests
 *
 * @param request Object that encapsulates the request to the servlet
 * @param response Object that encapsulates the response from the servlet
 */
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) throws
javax.servlet.ServletException, java.io.IOException {

performTask(request, response);

}
/**
 * Returns the servlet info string.
 */
public String getServletInfo() {

return super.getServletInfo();

}
/**
 * Initializes the servlet.
 */
public void init() {
// insert code to initialize the servlet here

}
/**
* Initializes the servlet.
*/
public void init(ServletConfig cnf) throws ServletException {
// insert code to initialize the servlet here
super.init(cnf);

ServletContext cnt = cnf.getServletContext();

//String mailhostParm = cfg.getInitParameter("mailhost");

ReceiveMailPollBean mailPollBean = new ReceiveMailPollBean();
ReceiveMailBean receiveBean = mailPollBean.getReceiveMailBean();
receiveBean.setUserName("testportail");
receiveBean.setPassword("testportail");
receiveBean.setStoreType("imap");
receiveBean.setFolderName("INBOX");
receiveBean.setHostName("tsexchange.idt.cdc.fr");
AttachmentAdapter attachementListener = new AttachmentAdapter() {
public void onAttachement(AttachmentEvent event)

Re: [JBoss-user] JBoss Temp File Problem

2002-02-13 Thread Yong T. Kim

I think your problem is when you create the temp directory.
You used:
pdfFile = File.createTempFile( "HelloWorld", ".pdf", new File(
"/temp" ) );

Why don't you try following line without the "/":
pdfFile = File.createTempFile( "HelloWorld", ".pdf", new File(
"temp" ) );

When you use "/", that means you creating the directory in the root
directory which is c:

Yong T. Kim

- Original Message -
From: "Tim Sheridan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 9:39 AM
Subject: [JBoss-user] JBoss Temp File Problem


> Has anyone had problems creating temp files inside the container? Below is
> the source code snippet and the resulting message from JBoss when I
attempt
> save a file created with the File.createTempFile() method. It appears that
> the JBoss 'bin' folder is prepended to the path I give as a parameter on
> this method. Is the a bug in JBoss or am missing something like setting a
> property? I'm running on Win2K, JBoss 2.4.4 w/Tomcat.
>
> Thanks,
> Tim Sheridan
>
> Source:
>  try
>  {
>  // create the file
>  pdfFile = File.createTempFile( "HelloWorld", ".pdf", new
File(
> "/temp" ) );
>
>  // log debugging statement
>  LOG.debug( pdfFile );
>
>  // save the pdf
>  document.savePDF( pdfFile.getAbsolutePath() );
>  }
>  catch( IOException exception )
>  {
>  throw( new CommandException( exception ) );
>  }
>
> JBoss:
>   [java] [INFO,Default] java.io.FileNotFoundException:
> C:\develop\jboss\bin\C:\temp\HelloWorld1360.pdf (The filenam
> e, directory name, or volume label syntax is incorrect)
>   [java] [INFO,ServiceProxy] deleting service proxy
>   [java] [ERROR,RenderService] BEAN EXCEPTION:
>   [java] javax.ejb.EJBException: null
>   [java] Embedded Exception
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Help : problem with ejb-jar.xml

2002-02-13 Thread Michael Schulz




Perhaps if you changed the 
first reference (to the V 1.3 dtd) to match the second reference, it would 
work.
 

Change


To:
/j2ee/dtd/application_1_3.dtd'>
 
(I think you are missing the "/j2ee" section of the 
URL)
 
-Mike
[Michael 
Schulz]  -Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of Sanjay 
GuptaSent: Wednesday, February 13, 2002 12:21 AMTo: 
[EMAIL PROTECTED]Subject: [JBoss-user] Help : problem 
with ejb-jar.xml

  Hi All,
  I have two ear files. In one of the ear file, i use 
  
   
  
  and in another i use
   
  
   
  Now my problem is when i try to deploy my first ear, i get a 
  message "External entity http://java.sun.com," not 
  found.
  Java.net.socket exception, connection times 
out.
   
  But my second ear file, with http://java.sun.com/j2ee/dtds/application_1_2.dtd
  deplpys fine. What can be the possible cause for this error. 
  I read in jboss doc tha we can add url for checking dtd's statically or 
  dynamically.
   
  Thanx in advance.
  Regards,
  Sanjay
   


RE: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Eric Kaplan

why don't you essentially roll your own message driven bean?  have a process
sitting out there (not ejb) listening to a jms queue.  as it gets orders off
the queue, it processes them by synchronously calling an ejb, getting the
result, and notifying the client via another queue.  the process, since its
not ejb, could be multi-threaded to support simultaneous processing of
multiple orders.

eric

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Edward Q.
Bridges
Sent: Wednesday, February 13, 2002 9:08 AM
To: [EMAIL PROTECTED]; Jboss User (E-Mail)
Subject: Re: AW: [JBoss-user] How can I use a background process with
JBoss



you could write a cron-job which selects all unacknowledged orders,
processes them, and then acknowledges each order within a transaction.

it doesn't rely on jboss (or ejb for that matter), but there is no way
(that i know of) to do asynchronous processing in ejb 1.1.  (that's why
message beans were introduced in 2.0 AFAIK).

--e--




On Wed, 13 Feb 2002 15:02:19 +0100, Dirk Storck wrote:

>I can't use MessageDrivenBeans cause we have to use EJB1.1
>
>-Ursprüngliche Nachricht-
>Von: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 13. Februar 2002 14:54
>An: [EMAIL PROTECTED]; Jboss User (E-Mail)
>Betreff: Re: [JBoss-user] How can I use a background process with JBoss
>
>
>
>why not just send the user an email after the order has been processed?
>
>you could process the order using a message-driven bean that sends an
email
>when completed, since you won't know if the user is still available
after
>processing the order.
>
>HTH
>
>
>
>
>On Wed, 13 Feb 2002 14:16:36 +0100, Dirk Storck wrote:
>
>>How can I achieve this with JBoss and Struts ? What would be the best
way
>to
>>implement this




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] JBoss Temp File Problem

2002-02-13 Thread Coetmeur, Alain

I think that file creation (and probably also file read)
is forbidden as-is in EJB, servlets and most J2EE components

however you may create a .RAR with a "TempFileFactory"
and a "TempFileConnection"... this JCA component
may even already exists...

I've never played with .RAR and JCA but it seems not
to be high level wizardry...





> -Message d'origine-
> De: Tim Sheridan [mailto:[EMAIL PROTECTED]]
> Date: mercredi 13 février 2002 15:40
> À: '[EMAIL PROTECTED]'
> Objet: [JBoss-user] JBoss Temp File Problem
> 
> 
> Has anyone had problems creating temp files inside the 
> container? Below is
> the source code snippet and the resulting message from JBoss 
> when I attempt
> save a file created with the File.createTempFile() method. It 
> appears that
> the JBoss 'bin' folder is prepended to the path I give as a 
> parameter on
> this method. Is the a bug in JBoss or am missing something 
> like setting a
> property? I'm running on Win2K, JBoss 2.4.4 w/Tomcat.
> 
> Thanks,
> Tim Sheridan
> 
> Source:
>  try
>  {
>  // create the file
>  pdfFile = File.createTempFile( "HelloWorld", 
> ".pdf", new File( 
> "/temp" ) );
> 
>  // log debugging statement
>  LOG.debug( pdfFile );
> 
>  // save the pdf
>  document.savePDF( pdfFile.getAbsolutePath() );
>  }
>  catch( IOException exception )
>  {
>  throw( new CommandException( exception ) );
>  }
> 
> JBoss:
>   [java] [INFO,Default] java.io.FileNotFoundException: 
> C:\develop\jboss\bin\C:\temp\HelloWorld1360.pdf (The filenam
> e, directory name, or volume label syntax is incorrect)
>   [java] [INFO,ServiceProxy] deleting service proxy
>   [java] [ERROR,RenderService] BEAN EXCEPTION:
>   [java] javax.ejb.EJBException: null
>   [java] Embedded Exception
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss Temp File Problem

2002-02-13 Thread Tim Sheridan

Has anyone had problems creating temp files inside the container? Below is
the source code snippet and the resulting message from JBoss when I attempt
save a file created with the File.createTempFile() method. It appears that
the JBoss 'bin' folder is prepended to the path I give as a parameter on
this method. Is the a bug in JBoss or am missing something like setting a
property? I'm running on Win2K, JBoss 2.4.4 w/Tomcat.

Thanks,
Tim Sheridan

Source:
 try
 {
 // create the file
 pdfFile = File.createTempFile( "HelloWorld", ".pdf", new File( 
"/temp" ) );

 // log debugging statement
 LOG.debug( pdfFile );

 // save the pdf
 document.savePDF( pdfFile.getAbsolutePath() );
 }
 catch( IOException exception )
 {
 throw( new CommandException( exception ) );
 }

JBoss:
  [java] [INFO,Default] java.io.FileNotFoundException: 
C:\develop\jboss\bin\C:\temp\HelloWorld1360.pdf (The filenam
e, directory name, or volume label syntax is incorrect)
  [java] [INFO,ServiceProxy] deleting service proxy
  [java] [ERROR,RenderService] BEAN EXCEPTION:
  [java] javax.ejb.EJBException: null
  [java] Embedded Exception

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Dirk Storck

I can't use MessageDrivenBeans cause we have to use EJB1.1

-Ursprüngliche Nachricht-
Von: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 13. Februar 2002 14:54
An: [EMAIL PROTECTED]; Jboss User (E-Mail)
Betreff: Re: [JBoss-user] How can I use a background process with JBoss



why not just send the user an email after the order has been processed?

you could process the order using a message-driven bean that sends an email
when completed, since you won't know if the user is still available after
processing the order.

HTH




On Wed, 13 Feb 2002 14:16:36 +0100, Dirk Storck wrote:

>How can I achieve this with JBoss and Struts ? What would be the best way
to
>implement this


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Joachim Schaaf

Hi,

Am Mittwoch, 13. Februar 2002 14:16 schrieb Dirk Storck:
> Hi,
> I want to do the following:
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.

It's funny to see how everyone is working on similar problems (even the names 
of my classes are the same :) ).

> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.

The EJB spec. doesn't allow threads, so I think you will have to use message 
driven beans (MDB, belongs to EJB 2.0). The notification could be done via 
email.

> How can I achieve this with JBoss and Struts ? What would be the best way
> to implement this

I haven't used MDB's yet, but the trick is to start a time consuming 
operation with a MDB and let it notify you when it's ready; your Struts 
action class would simply start the thing and return.

Joachim
-- 
Dipl.-Ing. Joachim Schaaf | Projektleiter | mailto:[EMAIL PROTECTED]
cataloom AG | Eupener Str. 148 | 50933 Köln | http://cataloom.com/
Tel: +49 221 4851807 | Fax: +49 221 4851907 | Mobil-Tel: +49 170 7667807

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: AW: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Edward Q. Bridges


you could write a cron-job which selects all unacknowledged orders,
processes them, and then acknowledges each order within a transaction.

it doesn't rely on jboss (or ejb for that matter), but there is no way
(that i know of) to do asynchronous processing in ejb 1.1.  (that's why 
message beans were introduced in 2.0 AFAIK).

--e--




On Wed, 13 Feb 2002 15:02:19 +0100, Dirk Storck wrote:

>I can't use MessageDrivenBeans cause we have to use EJB1.1
>
>-Ursprüngliche Nachricht-
>Von: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 13. Februar 2002 14:54
>An: [EMAIL PROTECTED]; Jboss User (E-Mail)
>Betreff: Re: [JBoss-user] How can I use a background process with JBoss
>
>
>
>why not just send the user an email after the order has been processed?
>
>you could process the order using a message-driven bean that sends an
email
>when completed, since you won't know if the user is still available
after
>processing the order.
>
>HTH
>
>
>
>
>On Wed, 13 Feb 2002 14:16:36 +0100, Dirk Storck wrote:
>
>>How can I achieve this with JBoss and Struts ? What would be the best 
way
>to
>>implement this




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Ricardo Argüello

It looks like you would need Message Driven Beans.

Read O'Reilly's Enterprise JavaBeans 3rd. Edition.

And check JBoss 3.0.0alpha documentation:
http://www.jboss.org/online-manual/HTML/ch08s20.html


Greetings,

Ricardo Arguello


- Original Message - 
From: "Dirk Storck" <[EMAIL PROTECTED]>
To: "Jboss User (E-Mail)" <[EMAIL PROTECTED]>; "Struts User (E-Mail)" 
<[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 8:16 AM
Subject: [JBoss-user] How can I use a background process with JBoss


> Hi,
> 
> I want to do the following:
> 
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
> 
> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
> 
> How can I achieve this with JBoss and Struts ? What would be the best way to
> implement this
> 
> Many thanks any any suggestions are welcome!!!
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Edward Q. Bridges


why not just send the user an email after the order has been processed?

you could process the order using a message-driven bean that sends an email 
when completed, since you won't know if the user is still available after 
processing the order.

HTH




On Wed, 13 Feb 2002 14:16:36 +0100, Dirk Storck wrote:

>How can I achieve this with JBoss and Struts ? What would be the best way 
to
>implement this



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Eric . Jain

> Have you implemented equals() and hashCode() in your 
> objects?

Great idea, but it doesn't seem to help :-(


--
Eric Jain

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBosssx & the declarative security model

2002-02-13 Thread Sternagel Annegret (PN-SYS/PE)



Hello,
 
just a 
quick answer, maybe there must be thought more about it:
 
* what 
about creating a role for each method of a bean (or each attribute), these roles 
can be used in the deploymentdescriptor,
* let 
the user create a higher role FINANCE (not named in the 
deploymentdescriptor) and assign several lowlevel roles to 
it,
* in 
the Custom Server LoginModule take the higher role and search for the assigned 
lowlevel roles and put all roles into the rolelist used to validate the 
roles.
 
I hope 
my answer is not to confused and give some help ...
 
Annegret
 
 
 

  -Ursprüngliche Nachricht-Von: Ivanhoe 
  [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 13. Februar 2002 
  11:03An: [EMAIL PROTECTED]Betreff: 
  [JBoss-user] JBosssx & the declarative security model
  
  Hello to all of you Jboss users (especially the 
  ones that can help me)
   
  I am starting to use  Jbosssx for my 
  security. up until now I have had no problem testing it.
   
  My problem though is that I am working on a 
  fairly large system and am confronted with the fact that the end users want to 
  add users AND Roles AND which fields in the database (CMP beans) these roles 
  can access/update at run time. There is no way I can tell up 
  front which roles may access which methods on which bean. 
  
   
  eg. They would like to create a new role 
  'FINANCE' and then assign users to that role as well as indicate the fields 
  that that particular role may access. I have a Custom login module which 
  athenticates against a table which holds a description of all cmp beans and 
  the attributes in them and the roles are then linked to these attributes. 
  
   
  Since in the ejb-xml file I have to say at deploy 
  time which roles can access which methods I have a problem because at deploy 
  time I dont know this.
   
  Is there anybody who can point me in the right 
  direction to solve this problem. Or has dealt with the same issue
  I would appreciate the help
   
  Thanx in advance
  Ivanhoe Abrahams
   
   


Re: [JBoss-user] Streams

2002-02-13 Thread Peter Levart

On Wednesday 13 February 2002 01:36, you wrote:
> Two things come to mind here.  First, values passed over local
> interfaces don't have to be serializable. Second, EJBs are forbidden
> from performing IO, because IO can block forever (you can cheat of
> course).  How are you planning on getting this into the database?  You
> can't create a CMP field of type Stream.
>
> -dain

There is a java.sql.Blob type that allows you to read/write binary data 
from/to a BLOB field via InputStream/OutputStream without buffering the whole 
chunk and to read/write parts of the BLOB field.

Daniel probably wants to solve the problem of transporting a big chunk of 
data from the client to the server and store this into a BLOB field in the 
database.

What I would probably do in this case is something like that:

1. Open a transaction on the client side
2. Organize big data into byte[] packets of some length and send them to the 
server via multiple calls to EJB. On the server side write each packet into 
the appropriate offset of the BLOB field via java.sql.Blob type.
3. Commit transaction on the client side.

Peter

>
> Paul Cody wrote:
> > The notion of a serializable stream is not trivial.  At first glance, it
> > suggests that your design may need reconsideration.  Can you expand on
> > your overall requirements and the properties you expect from a
> > serializable stream?
> >
> > Paul
> >
> >>-Original Message-
> >>From: Daniel Bruce Lynes [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, February 12, 2002 2:56 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: [JBoss-user] Streams
> >>
> >>
> >>I'm curious if there's any way I can get streams to work as a
> >>parameter to an
> >>EJB call.  I've looked through the java.io package, to no
> >>avail, trying to
> >>find a serializable stream.  Is there perhaps a third party source of
> >>serializable streams (open source, preferably)?  Or, is the
> >>only way I'm
> >>going to be able to stream data to the database, is through
> >>the use of a
> >>servlet communicating directly with the database?  This is
> >>for files that
> >>might be as large as 20 megabytes for receiving from Tomcat,
> >>and sending back
> >>to Tomcat.
> >>
> >>Thanks in advance.
> >>
> >>___
> >>JBoss-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Coetmeur, Alain


a message bean can be a good idea...
send an XML or text message to your message EJB,
which will process the request in it's own thread...

by the way, for long transactions, if you can avoid transactions
(by default they timeout in 30 seconds. you can change
 that somewhere in the transaction config, but 
 anyway this is costly for the DB)

check the transaction mode used for the EJB...
using NotSupported for is interesting if their is no risk of
incoherence. note that such a non transactional bean 
can call transactional EJB (Required TX mode for example).
each independent method call will be either Commit'ed or Rollback'ed...

If you don't have Message EJB, you can try to add a Thread'able object
in the Servlet context. I did it on Websphere
to scan mail...

then, either use the "load-on-startup" elemnt in web.xml
or explicitly start and stop...

as far as I understand servler context guaranty that
only one instance of the thread is used

you may also look about non HTTP servlet
which may respond to any protocol...
or even to soap clients...

> -Message d'origine-
> De: Dirk Storck [mailto:[EMAIL PROTECTED]]
> Date: mercredi 13 février 2002 14:17
> À: Jboss User (E-Mail); Struts User (E-Mail)
> Objet: [JBoss-user] How can I use a background process with JBoss
> 
> 
> Hi,
> 
> I want to do the following:
> 
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart 
> are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
> 
> Now it comes to the problem. The order must be proccessed in 
> background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
> 
> How can I achieve this with JBoss and Struts ? What would be 
> the best way to
> implement this

package fr.cdc.idt.receivemail;

/**
 * Insérez la description du type ici.
 * Date de création : (04/01/02 12:10:45)
 * @author: 
 */
import java.util.Date;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;

import javax.mail.*;
import javax.mail.internet.*;
import fr.cdc.idt.sendmail.*;

public class ReceiveMailServlet extends javax.servlet.http.HttpServlet {
/**
 * Free any resources the servlet has acquired
 * that will not be garbage collected.
 */
public void destroy() {
System.out.println(getClass().getName()+"#destroy()");
ServletContext cnt=getServletContext();
Object cobj=cnt.getAttribute("mailPollBean");
if(cobj!=null){
  ReceiveMailPollBean
mailPollBean=(ReceiveMailPollBean)cobj;
System.out.println(getClass().getName()+"#destroy() bean stop");
  mailPollBean.stop();
System.out.println(getClass().getName()+"#destroy()
removeattribute");
  cnt.removeAttribute("mailPollBean");
}
super.destroy();
}
/**
 * Process incoming HTTP GET requests 
 * 
 * @param request Object that encapsulates the request to the servlet 
 * @param response Object that encapsulates the response from the servlet
 */
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) throws
javax.servlet.ServletException, java.io.IOException {

performTask(request, response);

}
/**
 * Process incoming HTTP POST requests 
 * 
 * @param request Object that encapsulates the request to the servlet 
 * @param response Object that encapsulates the response from the servlet
 */
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) throws
javax.servlet.ServletException, java.io.IOException {

performTask(request, response);

}
/**
 * Returns the servlet info string.
 */
public String getServletInfo() {

return super.getServletInfo();

}
/**
 * Initializes the servlet.
 */
public void init() {
// insert code to initialize the servlet here

}
/**
* Initializes the servlet.
*/
public void init(ServletConfig cnf) throws ServletException {
// insert code to initialize the servlet here
super.init(cnf);

ServletContext cnt = cnf.getServletContext();

//String mailhostParm = cfg.getInitParameter("mailhost");

ReceiveMailPollBean mailPollBean = new ReceiveMailPollBean();
ReceiveMailBean receiveBean = mailPollBean.getReceiveMailBean();
receiveBean.setUserName("testportail");
receiveBean.setPassword("testportail");
receiveBean.setStoreType("imap");
receiveBean.setFolderName("INBOX");
receiveBean.setHostName("tsexchange.idt.cdc.fr");
AttachmentAdapter attachementListener = new AttachmentAdapter() {
public void onAttachement(AttachmentEvent event) {
/* do the job  */
}
};
receiveBean.addAttachmentListener(attachementListener);
mailPollBean.setPollingInterval(1000 * 30);

mailPollBean.start();
//  Thread.currentThread().sleep(1000*30);
//mailPollBean.stop();
cnt

Re: [JBoss-user] JBoss JNDI Lookup Code Generation with Forte

2002-02-13 Thread Madock Chiwenda

Did he used Forte? Could you help to send me with the connection parameters?

Madock

09/02/02 19:42:18, "Frans Thamura" <[EMAIL PROTECTED]> wrote:

>my staff success to use JNDI remotely to access to an EJB in JBoss server.
>
>Frans
>- Original Message -
>From: "Madock Chiwenda" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, February 07, 2002 2:25 PM
>Subject: [JBoss-user] JBoss JNDI Lookup Code Generation with Forte
>
>
>> Hi
>>
>> How can someone configure Forte4J to be able to generate JNDI lookup code
>using
>> "org.jnp.interfaces.NamingContextFactory" class and JNP into JBoss Naming
>service.
>>
>> I have been been able register the NamingContextFactory provider but not
>able to connect to the server. What is the
>> "Context root" to be used in the connection?
>>
>> Madock
>>
>>
>>
>>
>>
>>
>> _
>> Do You Yahoo!?
>> Get your free @yahoo.com address at http://mail.yahoo.com
>>
>>
>> ___
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>
>
>_
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user
>




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] How can I use a background process with JBoss

2002-02-13 Thread Dirk Storck

Hi,

I want to do the following:

I have a ShoppingCart.
The users clicks on order and the items from the ShoppingCart are moved to
my OrderBean. ShoppingCart and OrderBean are EJB's.

Now it comes to the problem. The order must be proccessed in background
cause it will have a long durration.
After the order has be proccessed the user should be notived somehow.

How can I achieve this with JBoss and Struts ? What would be the best way to
implement this

Many thanks any any suggestions are welcome!!!


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Dmitri Colebatch

Have you implemented equals() and hashCode() in your objects?  My guess is
that JBoss uses these either explicitly or implicitly to determine if the
object is the same as the stored version, and only re-writes when they
change.  As the Object version of these methods simply refers to memory
address, the same object wont change (I think :)

cheers
dim


- Original Message -
From: "Eric Jain" <[EMAIL PROTECTED]>
To: "Jboss-User" <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 9:58 PM
Subject: [JBoss-user] Objects in entity beans are not updated


> Complex (serializable) objects stored in a single field within a CMP 2.0
> entity bean don't get updated permanently unless I create a new object and
> store that. The log says something about the bean not being dirty. All
> accesses are through local references. Am I doing something wrong, or is
> this a bug (JBoss 3.0.0 alpha, November)?
>
>
> bean.getData().setX(5); // only temporary update!
>
> Data d = bean.getData();
> d.setX(5);
> bean.setData(d); // only temporary update!
>
> Data d = new Data(bean.getData());
> d.setX(5);
> bean.setData(d); // this works
>
>
> --
> Eric Jain
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Objects in entity beans are not updated

2002-02-13 Thread Eric Jain

Complex (serializable) objects stored in a single field within a CMP 2.0
entity bean don't get updated permanently unless I create a new object and
store that. The log says something about the bean not being dirty. All
accesses are through local references. Am I doing something wrong, or is
this a bug (JBoss 3.0.0 alpha, November)?


bean.getData().setX(5); // only temporary update!

Data d = bean.getData();
d.setX(5);
bean.setData(d); // only temporary update!

Data d = new Data(bean.getData());
d.setX(5);
bean.setData(d); // this works


--
Eric Jain


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBosssx & the declarative security model

2002-02-13 Thread Ivanhoe




Hello to all of you Jboss users (especially the 
ones that can help me)
 
I am starting to use  Jbosssx for my security. 
up until now I have had no problem testing it.
 
My problem though is that I am working on a fairly 
large system and am confronted with the fact that the end users want to add 
users AND Roles AND which fields in the database (CMP beans) these roles can 
access/update at run time. There is no way I can tell up front which 
roles may access which methods on which bean. 
 
eg. They would like to create a new role 'FINANCE' 
and then assign users to that role as well as indicate the fields that that 
particular role may access. I have a Custom login module which athenticates 
against a table which holds a description of all cmp beans and the attributes in 
them and the roles are then linked to these attributes. 
 
Since in the ejb-xml file I have to say at deploy 
time which roles can access which methods I have a problem because at deploy 
time I dont know this.
 
Is there anybody who can point me in the right 
direction to solve this problem. Or has dealt with the same issue
I would appreciate the help
 
Thanx in advance
Ivanhoe Abrahams
 
 


Re: [JBoss-user] Directories

2002-02-13 Thread Edward Q. Bridges

if you put myservlet.war in $JBOSS_HOME/deploy you will be able to access 
it via http://localhost:8080/myservlet

at least, that's the way it works with jboss-jetty



On Tue, 12 Feb 2002 15:11:14 -0800 (PST), Dustin Grabau wrote:

>I am still experimenting with servlets and find no use
>in the vauge tutorials I find so I have come to ask if
>anyone knows what directory in
>JBoss-2.2.2_Tomcat-3.2.2 I would need to put my
>servlet to use the link
>Http://localhost:8080/servlet/myservlet (if i need to
>put it in a specific directory at all)
>
>--Dustin
>
>__
>Do You Yahoo!?
>Send FREE Valentine eCards with Yahoo! Greetings!
>http://greetings.yahoo.com
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user