[Resin-interest] resin:set and resin-web.xml

2011-05-21 Thread Hontvári József Levente
I define an EL variable using resin:set in resin.conf (under the host 
element). Then this EL variable is referenced from the resin-web.xml 
file of a webapp. This used to work in 4.0.10 and 4.0.15, but it does 
not work in 4.0.18. For example a resin:message after resin:set displays 
the variable correctly, but the same resin:message in in resin-web.xml 
displays an empty value . Should this still work or something has 
changed in the meantime?

By the way the documentation at 
http://www.caucho.com/resin-4.0/admin/config-el-ref.xtp#resinset refers 
to both var and name attributes. Out of these two, only var works.


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Changes page does not work

2011-05-20 Thread Hontvári József Levente
It is not obvious where to report this, but the changelog page does not 
seem to be working:


http://www.caucho.com/resin-4.0/changes/changes.xtp


 500 Servlet Exception

||

/var/www/hosts/www.caucho.com/webapps/resin-4.0/changes/changes.xtp:17:
expected `/T' at `/li' (open at 17)
15:ul
16:liasync/comet: with Resin comet API, check for complete on suspend
(#4534, rep by Brent Plump)/li
17:liejb: with generics ClassT  as argument and return (#4551, rep
by dicr)/li
18:liservlet: finally handling for request needs to check for null 
(#4545)/li
19:liaccess-log: add rollover-check-time configuration (#4533, rep by
peng yao)/li


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] How to make this simplest CanDI work ?

2010-03-20 Thread Hontvári József
 BTW , Is META-INF/beans.xml defined in the JavaEE spec ?  What's the 
relation with beans.xml and resin-web.xml ?


yes, beans.xml is part of JSR-299.
resin-web.xml has the same role as web.xml, it is processed by Resin 
after web.xml. You can place resin specific / non-standard configuration 
into resin-web.xml.




smallufo írta:
I am new to CanDI , I want to migrate my spring app to JavaEE6 , but 
having a lot of troubles in Resin (4.0.5) CanDI :


There is no working sample in the resin site , most are outdated ...

Here is my very basic sample , just JPA 2 and a Servlet :

public interface PersonDao {
  public Person get(long id);
}

public class PersonDaoImpl implements PersonDao , Serializable {
  @PersistenceContext(unitName = mining, type = 
PersistenceContextType.EXTENDED)

  EntityManager em;

  @Override
  public Person get(long id)  {
return em.find(Person.class , id);
  }
}

public class HelloServlet extends HttpServlet {
  @javax.inject.Inject
  private PersonDao personDao;
  
  @Override
  protected void doGet(HttpServletRequest hreq, HttpServletResponse 
hres) throws ServletException, IOException  {

PrintWriter out = hres.getWriter();
System.out.println(personDao =  + personDao); // outputs Null
Person p = personDao.get(1L); //NPE , personDao is not injected
out.println(Hello, world! , person =  + p);
out.close();
  }  
}


persistence.xml
?xml version=1.0 encoding=UTF-8?
persistence xmlns=http://java.sun.com/xml/ns/persistence; version=1.0

  persistence-unit name=mining transaction-type=RESOURCE_LOCAL
providerorg.hibernate.ejb.HibernatePersistence/provider
classfoo.Person/class
properties
  property name=hibernate.dialect 
value=org.hibernate.dialect.MySQLDialect /
  property name=hibernate.cache.provider_class 
value=org.hibernate.cache.EhCacheProvider /

  property name=hibernate.show_sql value=true /
  property name=hibernate.format_sql value=true /

  property name=javax.persistence.jdbc.driver 
value=com.mysql.jdbc.Driver /

  property name=javax.persistence.jdbc.user value=adm /
  property name=javax.persistence.jdbc.password value=pwd /
  property name=javax.persistence.jdbc.url 
value=jdbc:mysql://db/mining?useUnicode=trueamp;characterEncoding=UTF8 
/

/properties
  /persistence-unit
/persistence

META-INF/beans.xml
beans xmlns=http://java.sun.com/xml/ns/javaee;
/beans


my environment :

dependency
 groupIdorg.hibernate/groupId
 artifactIdhibernate-core/artifactId
 version3.5.0-CR-2/version
/dependency
dependency
  groupIdorg.hibernate.javax.persistence/groupId
  artifactIdhibernate-jpa-2.0-api/artifactId
  version1.0.0-CR-1/version
  scopeprovided/scope
/dependency


This is a very basic Dao + JPA pattern , but I cannot find how to 
inject the PersonDaoImpl to the Dao in the Servlet , 
Can somebody give me a hint ? Thanks in advenced !


BTW , Is META-INF/beans.xml defined in the JavaEE spec ?  What's the 
relation with beans.xml and resin-web.xml ? 



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] CanDI java.lang.StackOverflowError

2010-02-11 Thread Hontvári József
The name of the first class is misleading (maybe Scheduled... would have 
been better, it is executing scheduled tasks itself), Resin's scheduler 
hasn't been involved in the configuration. But the issue is either the 
same or we have two independent issues. If I remove the constructor 
initialization by creating an empty constructor and use setter instead 
of it, then the CanDI initialization does completes. However, if I add 
@Startup annotation, so a class instance is actually created, then I 
again receive StackOverflow.




Wesley Wu írta:
 This could be a lazy init problem I think.

 The scheduled tasks would be inited before some of other beans which
 the tasks need.

 I've met this before.

 The workaround:
 Inject the Injector into your task, no other webbeans.
 When the task starts (run()), create webbeans instances via the injector.

 -Wesley

 2010/2/11 Hontvári József hontv...@flyordie.com:
   
 I reduced the configuration to the minimum. It consists of a circular setter
 dependency, and then a separate third constructor initialization which
 refers to one of circular items. Both have to be present, otherwise
 StackOverflow doesn't happen. I attached a configuration sample and a part
 of the log file, logged on finer level.

 Scott Ferguson írta:

 Hontvári József wrote:


 I receive java.lang.StackOverflowError when Resin tries to read the
 configuration file:

 [10-02-10 10:31:56.929] {resin-37}
 C:/Progra~1/mireka-1.2/conf/mireka.xml:325: com.caucho.confi
 g.core.ResinIf.init(): java.lang.StackOverflowError

 I believe there is no circular constructor dependency in the file. To be
 sure I replaced almost all constructor initialisation blocks with setter
 initialization. Is there a way to debug this error? There is no stack
 trace or anything else in the log.



 Can you send that section of the configuration file? It looks like it's
 something to do with the resin:if like the test EL expression,
 although it could also be the contents of the if.

 Also, it's possible that adding a logger name= level=finer/ in the
 resin section will show the stack trace.

 -- Scott
 




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] CanDI java.lang.StackOverflowError

2010-02-10 Thread Hontvári József
I receive java.lang.StackOverflowError when Resin tries to read the 
configuration file:

[10-02-10 10:31:56.929] {resin-37} 
C:/Progra~1/mireka-1.2/conf/mireka.xml:325: com.caucho.confi
g.core.ResinIf.init(): java.lang.StackOverflowError

I believe there is no circular constructor dependency in the file. To be 
sure I replaced almost all constructor initialisation blocks with setter 
initialization. Is there a way to debug this error? There is no stack 
trace or anything else in the log.




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] CanDI java.lang.StackOverflowError

2010-02-10 Thread Hontvári József
I reduced the configuration to the minimum. It consists of a circular 
setter dependency, and then a separate third constructor initialization 
which refers to one of circular items. Both have to be present, 
otherwise StackOverflow doesn't happen. I attached a configuration 
sample and a part of the log file, logged on finer level.


Scott Ferguson írta:

Hontvári József wrote:
  
I receive java.lang.StackOverflowError when Resin tries to read the 
configuration file:


[10-02-10 10:31:56.929] {resin-37} 
C:/Progra~1/mireka-1.2/conf/mireka.xml:325: com.caucho.confi

g.core.ResinIf.init(): java.lang.StackOverflowError

I believe there is no circular constructor dependency in the file. To be 
sure I replaced almost all constructor initialisation blocks with setter 
initialization. Is there a way to debug this error? There is no stack 
trace or anything else in the log.
  

Can you send that section of the configuration file? It looks like it's 
something to do with the resin:if like the test EL expression, 
although it could also be the contents of the if.


Also, it's possible that adding a logger name= level=finer/ in the 
resin section will show the stack trace.


-- Scott
  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  



mireka:ScheduleFileDirQueue
NamedsubmittedMailQueue/Named
mireka:mailProcessorFactory
#{primaryTransmitter}
/mireka:mailProcessorFactory
/mireka:ScheduleFileDirQueue


mireka:QueuingTransmitter
NamedprimaryTransmitter/Named
mireka:queue
#{submittedMailQueue}
/mireka:queue
/mireka:QueuingTransmitter

mireka:Dummy
new
#{primaryTransmitter}
/new
/mireka:Dummy

Resin-4.0.3 (built Tue, 05 Jan 2010 09:09:02 PST)
Copyright(c) 1998-2008 Caucho Technology.  All rights reserved.

  Using Resin(R) Open Source under the GNU Public License (GPL).

  See http://www.caucho.com for information on Resin Professional,
  including caching, clustering, JNI acceleration, and OpenSSL integration.

Starting Resin on Wed, 10 Feb 2010 20:39:23 +0100 (CET)

[10-02-10 20:39:24.288] {main} resin:import 'C:\Program 
Files\resin-4.0.3\conf\app-default.xml'
[10-02-10 20:39:24.429] {main} Resin[] init
[10-02-10 20:39:24.429] {main} Resin[] active
[10-02-10 20:39:24.538] {main} InjectManager[server:app-tier:main] add bean 
SingletonBean[InjectManager, {...@default()}]
[10-02-10 20:39:24.601] {main} InjectManager[server:app-tier:main] add bean 
XmlBean[DeployService, {...@default()}, @Singleton]
[10-02-10 20:39:24.632] {main} 'select-manager' requires Resin Professional.  
See http://www.caucho.com for information and licensing.
[10-02-10 20:39:24.648] {main} Server[id=,cluster=app-tier] starting
[10-02-10 20:39:24.648] {main} 
[10-02-10 20:39:24.648] {main} Windows XP 5.1 x86
[10-02-10 20:39:24.648] {main} Java(TM) SE Runtime Environment 1.6.0_18-b07, 
Cp1250, hu
[10-02-10 20:39:24.648] {main} Java HotSpot(TM) Client VM 16.0-b13, 32, mixed 
mode, sharing, Sun Microsystems Inc.
[10-02-10 20:39:24.648] {main} 
[10-02-10 20:39:24.648] {main} resin.home = C:\Program Files\resin-4.0.3\
[10-02-10 20:39:24.648] {main} resin.root = C:\Program Files\resin-4.0.3\
[10-02-10 20:39:24.648] {main} resin.conf = /C:/Program 
Files/resin-4.0.3/conf/resin.xml
[10-02-10 20:39:24.648] {main} 
[10-02-10 20:39:24.648] {main} server = 127.0.0.1:6800 (app-tier:)
[10-02-10 20:39:24.648] {main} stage  = default
[10-02-10 20:39:24.648] {main} 
[10-02-10 20:39:24.648] {main} java.io.IOException: Socket JNI is not available 
because JNI support has not been compiled.
[10-02-10 20:39:24.648] {main}   On Unix, run ./configure; make; make install.  
On Windows, check for resin.dll.
[10-02-10 20:39:24.648] {main}   java.lang.UnsatisfiedLinkError: no resin_os in 
java.library.path
[10-02-10 20:39:24.648] {main}  at 
com.caucho.vfs.JniServerSocketImpl.checkJni(JniServerSocketImpl.java:121)
[10-02-10 20:39:24.648] {main}  at 
com.caucho.vfs.JniServerSocketImpl.create(JniServerSocketImpl.java:104)
[10-02-10 20:39:24.648] {main}  at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10-02-10 20:39:24.648] {main}  at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[10-02-10 20:39:24.648] {main}  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[10-02-10 20:39:24.648] {main}  at java.lang.reflect.Method.invoke(Unknown 
Source)
[10-02-10 20:39:24.648] {main}  at 
com.caucho.vfs.QJniServerSocket.createJNI(QJniServerSocket.java:135)
[10-02-10 20:39:24.648] {main

[Resin-interest] bean tag and JMX

2009-10-01 Thread Hontvári József
The doc for 4.0.x says that the resource tag is deprecated in favor of 
bean. If I try to setup  JMX bean with bean then it doesn't work. It 
is registered as a CanDI object, but it is not registered in the MBean 
server. However, if I replace bean with resource then everything is 
correct, the JMX bean is shown by JConsole and the resin log also shows 
that it was registered.

bean name=trafficSummary mbean-name=mireka:type=TrafficSummary
type=mireka.filter.builtin.TrafficSummary /




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] prologue

2009-09-30 Thread Hontvári József
I have included a prologue section in resin-web.xml, but it is not 
accepted by Resin, see the log extract below.

I have't find a section dedicated to the prologue element in the 
documentation, there are only indirect references to it. On the other 
hand it is included in the default resin-xml (host-default / webapp) so 
it mustn't be deprecated. This reference page contains almost the same 
code as an example (prologue in resin-web.xml):
http://www.caucho.com/resin/reference/env-tags.xtp#class-loader

Where is prologue valid? Or where can I find this myself? For the 3.1 
there is a Relax NG section in the configuration part of the 
documentation, but not for 4.0.


WEB-INF/resin-web.xml:8: 'prologue' is an unknown property of 
'com.caucho.server.webapp.WebApp'.

 

6: 
   


7:  


8: 
prologue  
 

9: 
class-loader  
 

10:compiling-loader 
path=${mirekaHome}/classes/





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] How to set checking interval for war redeploy?

2009-08-28 Thread Hontvári József
I changed the following line of the original configuration but it still 
doesn't have any effect:


 web-app-deploy path=webapps/

I tried both:
 web-app-deploy path=webapps
   dependency-check-interval5s/dependency-check-interval
 /web-app-deploy
and
 web-app-deploy path=webapps dependency-check-interval=5s/

There is no error message in the log, but war and resin.xml changes are 
still noticed only after 60 s.



Scott Ferguson wrote:

On Aug 27, 2009, at 3:41 PM, Hontvári József wrote:

  
I tried many ways to set dependency-check-interval to 2s in  
resin.xml without any success. Resin 4.0.1 still checks war file  
change by 60 s, which is the default value. I attached a diff file  
about one of the configurations.


ps: The web-app-deploy schema section in the documentation still  
lists this attribute as redeploy-check-interval which is likely an  
obsolete name.

See here: http://caucho.com/resin/reference/webapp-tags.xtp#web-app-deploy
Also the section refers to attributes in the title, but it refers  
to elements in the scheme. I am not sure, but it seems that this  
section lists elements not attributes. Maybe some of them can be  
both attributes and elements.



It's dependency-check-interval in the web-app-deploy.  There is a  
minimum of 5s.


-- Scott

  

--- C:/resin/conf/resin.xml Cs aug. 27 23:59:03 2009
+++ C:/resin/conf/resin.xml.origSze ápr. 29 18:51:48 2009
@@ -38,7 +38,7 @@
 - level='info' for production
 - 'fine' or 'finer' for development and troubleshooting
--
-  logger name=com.caucho level=fine/
+  logger name=com.caucho level=info/

  logger name=com.caucho.java level=config/
  logger name=com.caucho.loader level=config/
@@ -96,9 +96,7 @@
rollover-period=1W/

  !-- creates the webapps directory for .war expansion --
-  web-app-deploy path=webapps dependency-check-interval=2s/
-  dependency-check-interval2s/dependency-check-interval
-   
+  web-app-deploy path=webapps/
/host-default

!--
@@ -143,7 +141,7 @@
  http address=* port=8080/

  !-- SSL port configuration: --
-  http address=* port=8444
+  http address=* port=8443
jsse-ssl self-signed-certificate-name=re...@localhost/
  /http

@@ -169,8 +167,6 @@

!-- the default host, matching any host name --
host id= root-directory=.
-  dependency-check-interval2s/dependency-check-interval
-
  !--
 - configures an explicit root web-app matching the
 - webapp's ROOT
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] specifying implementation class in CanDI XML

2009-08-28 Thread Hontvári József
I try to use the addXXX bean configuration pattern where the parameter 
is an interface. Is there a way to somehow specify the actual class 
which should be added?

Here is an example. Of course this doesn't work, Resin doesn't accept 
the class attribute.
 
m:FilterChain
filter resin:class=m.PostmasterFilter
dirc:/temp/mail/dir
/filter
/m:FilterChain




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] How to set checking interval for war redeploy?

2009-08-27 Thread Hontvári József
I tried many ways to set dependency-check-interval to 2s in resin.xml 
without any success. Resin 4.0.1 still checks war file change by 60 s, 
which is the default value. I attached a diff file about one of the 
configurations.


ps: The web-app-deploy schema section in the documentation still 
lists this attribute as redeploy-check-interval which is likely an 
obsolete name.

See here: http://caucho.com/resin/reference/webapp-tags.xtp#web-app-deploy
Also the section refers to attributes in the title, but it refers to 
elements in the scheme. I am not sure, but it seems that this section 
lists elements not attributes. Maybe some of them can be both attributes 
and elements.
--- C:/resin/conf/resin.xml Cs aug. 27 23:59:03 2009
+++ C:/resin/conf/resin.xml.origSze ápr. 29 18:51:48 2009
@@ -38,7 +38,7 @@
  - level='info' for production
  - 'fine' or 'finer' for development and troubleshooting
 --
-  logger name=com.caucho level=fine/
+  logger name=com.caucho level=info/
 
   logger name=com.caucho.java level=config/
   logger name=com.caucho.loader level=config/
@@ -96,9 +96,7 @@
 rollover-period=1W/
 
   !-- creates the webapps directory for .war expansion --
-  web-app-deploy path=webapps dependency-check-interval=2s/
-  dependency-check-interval2s/dependency-check-interval
-   
+  web-app-deploy path=webapps/
 /host-default
 
 !--
@@ -143,7 +141,7 @@
   http address=* port=8080/
 
   !-- SSL port configuration: --
-  http address=* port=8444
+  http address=* port=8443
 jsse-ssl self-signed-certificate-name=re...@localhost/
   /http
 
@@ -169,8 +167,6 @@
 
 !-- the default host, matching any host name --
 host id= root-directory=.
-  dependency-check-interval2s/dependency-check-interval
-
   !--
  - configures an explicit root web-app matching the
  - webapp's ROOT
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest